Bug 29073: Use 0 and 1 as values for DefaultHoldExpirationdate
authorNick Clemens <nick@bywatersolutions.com>
Tue, 21 Sep 2021 15:15:15 +0000 (15:15 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 1 Oct 2021 18:37:10 +0000 (14:37 -0400)
commit881c687fea62b7819b6c4a09769c42e96a97f4cd
tree04131b5970a1645291369108b10d3989ca554d7c
parentcdc623dbf46cad6d768a0f27990200dc6414878a
Bug 29073: Use 0 and 1 as values for DefaultHoldExpirationdate

DefaultHldexpirationDate is set in the pref screen to 'yes/no'

The code checks if the preference is 'true', 'no' is true

We should instead use 1/0

To test:
0 - Have a fresh devbox
1 - With syspref disabled, place a hold
2 - Note no expiration date set
3 - Enable the preference
4 - Place a hold and note the expiration date is set, good
5 - Disable the pref
6 - Place a hold and note the expiration date is set, bad
7 - Apply patch
8 - Update database
9 - Repeat 1-8, date not set when pref disabled

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
installer/data/mysql/atomicupdate/bug_29073.pl [new file with mode: 0755]
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref