Extend Plugin TrackerIf to allow nesting
- Status
- Open
- Subject
- Extend Plugin TrackerIf to allow nesting
- Version
- 12.x
14.x
15.x - Category
- Feature request
- Feature
- Trackers
Wiki Plugin (extends basic syntax) - Resolution status
- New
- Submitted by
- Xavier de Pedro
- Lastmod by
- Xavier de Pedro
- Rating
- Description
Plugin TrackerIf doesn't seem to accept nesting so far, and we need it to allow customization of the interface to edit data with Pretty Trackers.
- If field_1 is A
- if field_2 is not empty, display value of field_2
- if field_3 is not empty, display value of field_3
- if field_4 is not empty, display value of field_4
- ...
- if field_1 is B
- if field_10 is not empty, display value of field_10
- if field_11 is not empty, display value of field_11
- if field_12 is not empty, display value of field_12
- ...
Copy to clipboard{TRACKERIF(test="(f_1='A')", ignore='n')} {TRACKERIF(test="(f_2 ='')", ignore='n')} {ELSE} {$f_2|output} {TRACKERIF} {TRACKERIF(test="(f_3 ='')", ignore='n')} {ELSE} {$f_3|output} {TRACKERIF} {TRACKERIF(test="(f_4 ='')", ignore='n')} {ELSE} {$f_4|output} {TRACKERIF} {TRACKERIF} {TRACKERIF(test="(f_1='B')", ignore='n')} {TRACKERIF(test="(f_10 ='')", ignore='n')} {ELSE} {$f_10|output} {TRACKERIF} {TRACKERIF(test="(f_11 ='')", ignore='n')} {ELSE} {$f_11|output} {TRACKERIF} {TRACKERIF(test="(f_12 ='')", ignore='n')} {ELSE} {$f_12|output} {TRACKERIF} {TRACKERIF}- If field_1 is A
- Workaround
Workarounds:
- use https://doc.tiki.org/PluginTrackerToggle to display the first section only when f_1='A', etc.
- It does work properly when the value to be tested is '0' (zero).
- use https://doc.tiki.org/PluginTrackerItemField to display the first section only when f_1='A', etc.
- It does NOT work properly when the value to be tested is '0' (zero). It displays the content even if the value of the field is NOT zero.
- use https://doc.tiki.org/PluginTrackerToggle to display the first section only when f_1='A', etc.
- Importance
- 5
- Easy to solve?
- 5
- Priority
- 25
- 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
- 5748
- Created
- Monday 26 October, 2015 10:40:01 UTC
by Xavier de Pedro - LastModif
- Monday 26 October, 2015 10:59:48 UTC