Consider a tracker 1 that has a field with fieldId=2 of type item link, and multiple values are allowed for this field. Assume that the tracker contains an item 3 where field 3 is a set of 2 item links, one to value "A" and one to value "B". The value of field 3 of item 2 in tracker 1 will show as "A,B".
Now make a trackerlist with trackerId="1" filterfield="2" and filtervalue="B". Due to a bug in trackerlib.php item 3 will not be shown. Item 3 should be shown, because value B occurs in field 2.
The problem is that the code does not handle item links with multiple values, and the filtervalue is checked only against the first link in the link item field.
The bug is due to the following piece of code:
INNER JOIN tiki_tracker_item_fields ttif{$i}_remote ON ttif$i.`value` = ttif{$i}_remote.`itemId`
The ON statement should take into account that ttif$i.`value` can be a list of itemIds, not a single value. Replacing this code with the following code resolves the problem:
INNER JOIN tiki_tracker_item_fields ttif{$i}_remote ON FIND_IN_SET(ttif{$i}_remote.`itemId`,ttif$i.`value`) > 0
To help developers solve the bug, we kindly request that you demonstrate your bug on a show2.tiki.org instance. To start, simply select a version and click on "Create show2.tiki.org instance". Once the instance is ready (in a minute or two), as indicated in the status window below, you can then access that instance, login (the initial admin username/password is "admin") and configure the Tiki to demonstrate your bug. Priority will be given to bugs that have been demonstrated on show2.tiki.org.
To help developers solve the bug, we kindly request that you demonstrate your bug on a show.tikiwiki.org instance. To start, simply select a version and click on "Create show.tikiwiki.org instance". Once the instance is ready (in a minute or two), as indicated in the status window below, you can then access that instance, login (the initial admin username/password is "admin") and configure the Tiki to demonstrate your bug. Priority will be given to bugs that have been demonstrated on show.tikiwiki.org.
filename | created | hits | comment | version | filetype | ||
---|---|---|---|---|---|---|---|
No attachments for this item |