[Bug 40405] New: systempreferences.value cannot be set to NULL
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40405 Bug ID: 40405 Summary: systempreferences.value cannot be set to NULL Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart@gmail.com QA Contact: testopia@bugs.koha-community.org Blocks: 25515 Some sysprefs have NULL as their default value, and systempreferences.value allows NULL values. However C4::Context->set_preference does not unset a syspref if "undef" is passed. Additionally some of the sysprefs that have NULL as default will generate warnings in the logs (and test suite output). opac/opac-suggestions.pl: for my $f ( split( /\s*\,\s*/, C4::Context->preference("OPACSuggestionUnwantedFields") ) ) { Here is the current list: +-------------------------------+-------+ | variable | value | +-------------------------------+-------+ | decreaseLoanHighHoldsDuration | NULL | | decreaseLoanHighHoldsValue | NULL | | ILLHiddenRequestStatuses | NULL | | ILLOpacbackends | NULL | | ILLSendStaffNotices | NULL | | ListOwnerDesignated | NULL | | MarcFieldDocURL | NULL | | MaxFine | NULL | | OPACSuggestionUnwantedFields | NULL | | ReportsExportLimit | NULL | | SerialsSearchResultsLimit | NULL | +-------------------------------+-------+ Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25515 [Bug 25515] [OMNIBUS] Remove warnings and errors from tests output -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40405 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40405 --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 184129 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184129&action=edit Bug 40405: Set systempreferences.value to NOT NULL Some sysprefs have NULL as their default value, and systempreferences.value allows NULL values. However C4::Context->set_preference does not unset a syspref if "undef" is passed. Additionally some of the sysprefs that have NULL as default will generate warnings in the logs (and test suite output). opac/opac-suggestions.pl: for my $f ( split( /\s*\,\s*/, C4::Context->preference("OPACSuggestionUnwantedFields") ) ) { Here is the current list: +-------------------------------+-------+ | variable | value | +-------------------------------+-------+ | decreaseLoanHighHoldsDuration | NULL | | decreaseLoanHighHoldsValue | NULL | | ILLHiddenRequestStatuses | NULL | | ILLOpacbackends | NULL | | ILLSendStaffNotices | NULL | | ListOwnerDesignated | NULL | | MarcFieldDocURL | NULL | | MaxFine | NULL | | OPACSuggestionUnwantedFields | NULL | | ReportsExportLimit | NULL | | SerialsSearchResultsLimit | NULL | +-------------------------------+-------+ Test plan: Code review required here, please confirm the above and that the different occurrences do not use "undef" as a value. Note that some tests now do not longer generate warnings (eg. t/db_dependent/selenium/opac_ill_requests.t) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40405 --- Comment #2 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 184130 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184130&action=edit Bug 40405: Set decreaseLoanHighHolds\* to 0 When reviewing the different sysprefs that had "NULL" as default, I only found those 2 occurrences that could be problematic. I think we should default to 0 here. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40405 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@gmail.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40405 --- Comment #3 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 184131 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184131&action=edit Bug 40405: [DO NOT PUSH] Show the problem with C4::Context->set_preference Apply this patch before the others and notice the failure. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40405 --- Comment #4 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 184205 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184205&action=edit Bug 40405: And ILLOpacUnauthenticatedRequest No idea why it was not NULL in DB when I did my first SELECT -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40405 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #184129|0 |1 is obsolete| | --- Comment #5 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 184535 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184535&action=edit Bug 40405: Set systempreferences.value to NOT NULL Some sysprefs have NULL as their default value, and systempreferences.value allows NULL values. However C4::Context->set_preference does not unset a syspref if "undef" is passed. Additionally some of the sysprefs that have NULL as default will generate warnings in the logs (and test suite output). opac/opac-suggestions.pl: for my $f ( split( /\s*\,\s*/, C4::Context->preference("OPACSuggestionUnwantedFields") ) ) { Here is the current list: +-------------------------------+-------+ | variable | value | +-------------------------------+-------+ | decreaseLoanHighHoldsDuration | NULL | | decreaseLoanHighHoldsValue | NULL | | ILLHiddenRequestStatuses | NULL | | ILLOpacbackends | NULL | | ILLSendStaffNotices | NULL | | ListOwnerDesignated | NULL | | MarcFieldDocURL | NULL | | MaxFine | NULL | | OPACSuggestionUnwantedFields | NULL | | ReportsExportLimit | NULL | | SerialsSearchResultsLimit | NULL | +-------------------------------+-------+ Test plan: Code review required here, please confirm the above and that the different occurrences do not use "undef" as a value. Note that some tests now do not longer generate warnings (eg. t/db_dependent/selenium/opac_ill_requests.t) Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40405 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #184130|0 |1 is obsolete| | --- Comment #6 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 184536 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184536&action=edit Bug 40405: Set decreaseLoanHighHolds\* to 0 When reviewing the different sysprefs that had "NULL" as default, I only found those 2 occurrences that could be problematic. I think we should default to 0 here. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40405 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #184131|0 |1 is obsolete| | --- Comment #7 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 184537 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184537&action=edit Bug 40405: [DO NOT PUSH] Show the problem with C4::Context->set_preference Apply this patch before the others and notice the failure. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40405 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #184205|0 |1 is obsolete| | --- Comment #8 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 184538 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184538&action=edit Bug 40405: And ILLOpacUnauthenticatedRequest No idea why it was not NULL in DB when I did my first SELECT Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40405 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@openfifth.c | |o.uk QA Contact|testopia@bugs.koha-communit |martin.renvoize@openfifth.c |y.org |o.uk Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40405 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #9 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- I've reviewed all the cases and agree with Jonathan here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40405 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40405 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|25515 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25515 [Bug 25515] [OMNIBUS] Remove warnings and errors from tests output -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40405 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |40444 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40444 [Bug 40444] Add a test to ensure all Perl test files use Test::NoWarnings -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40405 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |25.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40405 --- Comment #10 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40405 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|25.11.00 |25.11.00,25.05.04 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40405 --- Comment #11 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Nice work everyone! Pushed to 25.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40405 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting CC| |fridolin.somers@biblibre.co | |m --- Comment #12 from Fridolin Somers <fridolin.somers@biblibre.com> --- I prefer not impact 24.11 LTS, in case some people use the value NULL in some reports. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40405 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED CC| |david@davidnind.com Resolution|--- |FIXED --- Comment #13 from David Nind <david@davidnind.com> --- Bug fix, no changes to the manual required. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40405 Michael Hafen <michael.hafen@washk12.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=41460 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40405 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |41460 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41460 [Bug 41460] On Mysql on upgrade from 25.05 to 25.11 I got the error TEXT column 'value' can't have a default value -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org