Not possible to use 0 as the value for an option of the dropdown tracker field
- Status
- Closed
- Subject
- Not possible to use 0 as the value for an option of the dropdown tracker field
- Version
- 18.x
18.x Regression - Category
- Error
- Regression
- Feature
- Trackers
- Resolution status
- Fixed or Solved
- Submitted by
- Bernard Sfez / Tiki Specialist
- Volunteered to solve
- Roberto Kirschbaum, Jonny Bradley
- Lastmod by
- Bernard Sfez / Tiki Specialist
- Rating
- Description
On Tiki 18.x I have a tracker with a dropdown field to display different values.
By default the value should be 0.
The dropdown doesn’t display an option if the value of the option is 0.I tried:
0,1,2,3,4,50=0,1=1,2=2,3=3,4=4,5=5
0=0,0=0,1=1,2=2,3=3,4=4,5=5
=0,=0,1=1,2=2,3=3,4=4,5=5
0=None,0=None,1=1,2=2,3=3,4=4,5=5
None are working (none=None,none=None,1=1,2=2,3=3,4=4,5=5 is working fine)
I created an instance.
The field time is a dropdown with the following options: 0=0 hours,1=1 hour,2=2 hours,3=3 hours,4=4 hoursGo at: http://bsfez-11581-6744.show.tikiwiki.org/tiki-view_tracker.php?trackerId=1
Create an item, the first value (equal 0) is not displayed.I have the feeling this is a nasty regression.(in another case changing back the value for something else than 0 didn’t make the "lost" options reaper.
- Solution
Smarty thought that 0 is equal to
other{/tr}
We had to make smarty template explicitly treat $value !== 0Fixed in Master/Trunk/23.x:
https://gitlab.com/tikiwiki/tiki/-/commit/d703343ffb908e7c19d59fe8474903fdf2b45103To be backported soon
- Importance
- 6
- Easy to solve?
- 7
- Priority
- 42
- 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
- 6744
- Created
- Tuesday 07 August, 2018 08:02:56 UTC
by Bernard Sfez / Tiki Specialist - LastModif
- Wednesday 07 December, 2022 11:51:14 UTC