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)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 28 Sep 2021 13:12:44 +0000 (15:12 +0200)
commit1b6ed8097e28b090206aab2c41bcc7d546750aaf
tree7655148e33e29d66512d5026c07258c0e0d32529
parentc3b37d4e722b0df846cbd40bd406964115e8a497
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