View Issue Details

IDProjectCategoryView StatusLast Update
0020105mantisbtfilterspublic2015-12-06 02:45
ReporterdregadAssigned 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.

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)
cproensa

cproensa

2015-10-29 04:31

developer  

Selección_076.png (10,404 bytes)
Selección_076.png (10,404 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 09:31:57

dregad

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

Fixes 0020105
mod - core/filter_api.php Diff File

MantisBT: master 5a496d80

2015-10-29 13:34:36

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
mod - core/filter_api.php Diff File

MantisBT: master b954cc5b

2015-10-29 13:36:57

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
mod - core/filter_api.php Diff File

Issue History

Date Modified Username Field Change
2015-09-11 09:29 dregad New Issue
2015-09-11 09:29 dregad Status new => assigned
2015-09-11 09:29 dregad Assigned To => dregad
2015-09-11 09:34 dregad Relationship added related to 0020087
2015-09-11 09:35 dregad Note Added: 0051451
2015-10-24 18:26 dregad Changeset attached => MantisBT master 5e12bf98
2015-10-24 18:26 dregad Status assigned => resolved
2015-10-24 18:26 dregad Resolution open => fixed
2015-10-24 18:26 dregad Fixed in Version => 1.3.0-rc.1
2015-10-29 04:31 cproensa File Added: Selección_077.png
2015-10-29 04:31 cproensa Note Added: 0051744
2015-10-29 04:31 cproensa File Added: Selección_076.png
2015-10-29 06:06 atrol Note Added: 0051747
2015-10-29 06:06 atrol Status resolved => feedback
2015-10-29 06:06 atrol Resolution fixed => reopened
2015-10-29 08:50 dregad Status feedback => assigned
2015-10-29 08:50 dregad Note Added: 0051754
2015-10-29 12:34 dregad Note Added: 0051755
2015-10-29 15:00 dregad Changeset attached => MantisBT master 5a496d80
2015-10-29 15:00 dregad Changeset attached => MantisBT master b954cc5b
2015-10-29 15:00 dregad Status assigned => resolved
2015-10-30 02:37 atrol Resolution reopened => fixed
2015-12-06 02:45 vboctor Status resolved => closed