View Issue Details

IDProjectCategoryView StatusLast Update
0010992mantisbtfilterspublic2012-09-16 17:21
Reporterbromberg Assigned Torombert  
PriorityurgentSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Product Version1.1.7 
Summary0010992: Filter Bug with CustomFields
Description

Hi,

we've an Version 1.1.7 running.
Here we've an problem with Filter on CustomFields. It does't find all Bugs.

I've looked in the Tables and saw this:

Customfield is "Multiselection list" with Values like: Other|CustomValue1|CustomValue2|

Old value which is found by filter in Table is: |CUSTOMValue|
New values which are not found are: CustomValue <-- seems like new Values are wrong for filterquerys...

Where is the Bug? Is there an workaround?

TagsNo tags attached.

Activities

gaffron

gaffron

2009-10-07 08:09

reporter   ~0023091

Last edited: 2009-10-07 08:10

The Bug is in the file "filter_api.php".
You got the possibility to set customfields as multilist.
The seperator for this multiple values is a pipe(|).

In previous versions -I'm not quite sure in which one was the change- customfields were surrounded with pipes (e.g. |CustomValue|). In the last version singlevalues were saved without any pipes.

The filter function, however, is always looking for an entry with pipes.

SOLUTION (for Mantis 1.1.8, original condition):


  1. open filter_api.php in an editor.
  2. go to line 1210 (starts with: "array_push( $t_filter_array")
  3. remove the pipes, Done!

Old Line:
array_push( $t_filter_array , db_helper_like( "$t_table_name.value", '%|' . db_prepare_string( $t_filter_member ) . '|%' ) );

New Line:
array_push( $t_filter_array , db_helper_like( "$t_table_name.value", '%' . db_prepare_string( $t_filter_member ) . '%' ) );

bromberg

bromberg

2009-10-07 08:19

reporter   ~0023092

Thanks,

this solves the problem. But the Data in Database is with and without pipe... so the bug is at an other location...

rombert

rombert

2012-09-01 14:22

reporter   ~0032760

This works in MantisBT 1.2.x, so closing.