trackerlist filterfield on multiple values
- Status
- Closed
- Subject
- trackerlist filterfield on multiple values
- Version
- 11.x
- Category
- Usability
- Feature
- Trackers
Wiki Plugin (extends basic syntax) - Resolution status
- New
- Submitted by
- jcarter
- Lastmod by
- jcarter
- Rating
- Description
UPDATE: I was doing it wrong! 😊
Syntax should look like: {TRACKERLIST(trackerId=1 filterfield="2:1" exactvalue="d2v1:d1v1")}{TRACKERLIST}, with each group of arguments passed as a single string.Also, I'm going to update documentation so it says use ":" instead of "|" like it says to use.
Unable to filter trackerlist on multiple values, or I'm doing it wrong.As per documentation, using plugin trackerlist you need to have arguments for filterfield and filtervalue or exactvalue to filter the trackerlist by a value in a field.
My understanding is that you provide fields for filterfield as filterfield=x:y to filter values for field x and y, and then exactvalue="value to filter x by"|"value to filter y by"
The documentation says you use a pipe to separate the exactvalue parameters, which if true is inconsistent with the use of ":" everywhere else, and also does not seem to be the case based on the code here from
wikiplugin_trackerlist.php/Copy to clipboardif (isset($_REQUEST['reloff']) && empty($_REQUEST['itemId']) && !empty($_REQUEST['trackerId'])) { //coming from a pagination $items = $trklib->list_items( $_REQUEST['trackerId'], $_REQUEST['reloff'], 1, '', '', isset($_REQUEST['filterfield']) ? preg_split('/\s*:\s*/', $_REQUEST['filterfield']) : '', isset($_REQUEST['filtervalue']) ? preg_split('/\s*:\s*/', $_REQUEST['filtervalue']) : '', isset($_REQUEST['status']) ? preg_split('/\s*:\s*/', $_REQUEST['status']) : '', isset($_REQUEST['initial']) ? $_REQUEST['initial'] : '', isset($_REQUEST['exactvalue']) ? preg_split('/\s*:\s*/', $_REQUEST['exactvalue']) : '', $filter );
I don't know much about regular expressions, but I see ":" in there.Anyhow, syntax like
Copy to clipboard{TRACKERLIST(trackerId=5 fields=18:23:22 filterfield=32:32 exactvalue="val"|"val2")}{TRACKERLIST}or
Copy to clipboard{TRACKERLIST(trackerId=5 fields=18:23:22 filterfield=32:32 exactvalue="not(val)"|"not(val2)")}{TRACKERLIST}(using "|" or ":") doesn't seem to work.
I'm going to demonstrate/test to make sure this is the case on 11.1, and update if it is.
- Importance
- 4
- Easy to solve?
- 7
- Priority
- 28
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 4892
- Created
- Thursday 07 November, 2013 20:52:29 UTC
by jcarter - LastModif
- Thursday 07 November, 2013 21:32:24 UTC