Bug 7854 - preferences.pl: cannot have choice options of yes and no
Summary: preferences.pl: cannot have choice options of yes and no
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-30 06:12 UTC by Srdjan Jankovic
Modified: 2023-06-08 22:26 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.