Bug 7854

Summary: preferences.pl: cannot have choice options of yes and no
Product: Koha Reporter: Srdjan Jankovic <srdjan>
Component: System AdministrationAssignee: Bugs List <koha-bugs>
Status: CLOSED INVALID QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: chris, dcook, gmcharlt, kyle
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Srdjan Jankovic 2012-03-30 06:12:28 UTC
$YAML::Syck::ImplicitTyping is set, thus preventing yes and no choices.
This should be turned off and explicit translations provided.

So far I've identifired:

All: null => ""
YesNo: yes => 1, no => 0
Comment 1 Kyle M Hall 2012-10-18 17:10:53 UTC
I may be wrong, but if we remove the implicit type, won't that screw up pretty much every existing YesNo system preference? We would have to find every reference for every YesNo pref and change the conditional tests.
Comment 2 Chris Cormack 2012-10-18 20:09:21 UTC
No, if we explicitly type YesNo as a boolean, like Srdjan has shown, then we have to change none of the YesNo prefs.

And the Choice ones will work the way they should. IE Yes becomes 1, only when it's used with a boolean field (as it should).
Comment 3 Paul Poulain 2016-06-04 08:46:43 UTC
Not sure I understand the issue, reassigning it then.
Comment 4 David Cook 2022-08-22 03:14:06 UTC
It's been over 10 years, we're not using YAML::Syck anymore, I'm not sure I understand this one anyway. 

I think the HTML forms are based off the .pref files rather than the database, although I could be wrong.