View Issue Details

IDProjectCategoryView StatusLast Update
0020105mantisbtfilterspublic2015-12-06 02:45
Reporterdregad Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.3.0-beta.3 
Target Version1.3.0-rc.1Fixed in Version1.3.0-rc.1 
Summary0020105: Filter by "Match Type" throws error
Description

After loading certain saved filters and modifying them to use another "Match Type" filter criteria, Mantis throws error:

APPLICATION ERROR 26 - Data Type mismatch.

Steps To Reproduce

This is reproducible on this tracker, e.g. logged in as myself, loading filter "In Feedback 15 days" (Filter id 9102) and then clicking on "Match Type" in the filters list.

Additional Information

The above-mentioned filter defines the filter_string as

v9#{"_version":"v9", [...] ,"match_type":"0", [...] } -> type 'string'

Other filters (which do not give error) define the filter property as int ("match_type":0).

TagsNo tags attached.
Attached Files
Selección_076.png (10,404 bytes)   
Selección_076.png (10,404 bytes)   

Relationships

related to 0020087 closeddregad Filter by "Fixed in Version" throws error 

Activities

dregad

dregad

2015-09-11 09:35

developer   ~0051451

PR https://github.com/mantisbt/mantisbt/pull/648

cproensa

cproensa

2015-10-29 04:31

developer   ~0051744

I am getting errors with filtering that may be related to this update

1) a warning on displaying match type field
2) an error whenever i do the filter search

can you reproduce?

Selección_077.png (13,726 bytes)   
Selección_077.png (13,726 bytes)   
atrol

atrol

2015-10-29 06:06

developer   ~0051747

can you reproduce?
I can

dregad

dregad

2015-10-29 08:50

developer   ~0051754

I hate this f!%*ing filter api.

dregad

dregad

2015-10-29 12:34

developer   ~0051755

OK I get it, stupid me, commit 5e12bf98 causes the MATCH_TYPE filter property to be considered as a multivalue field, so it's converted to an array by filter_ensure_valid_filter() :-/

I'll revert this and write another (proper) fix.

Related Changesets

MantisBT: master 5e12bf98

2015-09-11 05:31

dregad


Details Diff
Add 'Match type' to list of filter properties to validate

Fixes 0020105
Affected Issues
0020105
mod - core/filter_api.php Diff File

MantisBT: master 5a496d80

2015-10-29 09:34

dregad


Details Diff
Revert "Add 'Match type' to list of filter properties to validate"

This reverts commit 5e12bf9819d923e00020e11083426355f7a3d5f0 which
caused a regression (system notice when displaying the match type filter
criteria, or application error 203 when trying to apply the filter).

The change made match_type a multivalue property, which caused it to be
converted to an array by filter_ensure_valid_filter().

Issue 0020105
Affected Issues
0020105
mod - core/filter_api.php Diff File

MantisBT: master b954cc5b

2015-10-29 09:36

dregad


Details Diff
Ensure FILTER_MATCH_TYPE property is an int

This prevents APPLICATION ERROR 26 (Data Type mismatch) when applying a
filter built based on a saved filter which (for legacy reasons) had the
criteria stored as a string instead of an integer.

Fixes 0020105
Affected Issues
0020105
mod - core/filter_api.php Diff File