[Koha-bugs] [Bug 29074] DefaultHoldExpirationdatePeriod blank value interpreted as zero

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Dec 14 12:42:12 CET 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29074

--- Comment #2 from Emmi Takkinen <emmi.takkinen at koha-suomi.fi> ---
Created attachment 144572
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144572&action=edit
Bug 29074: Do not set default expiration date for hold if
DefaultHoldExpirationdatePeriod is left blank

If DefaultHoldExpirationdate is on and DefaultHoldExpirationdatePeriod
is blank, the blank is treated as a zero and all holds are created
with an expiration date of today.

This patch changes expiration dates storing so that if
DefaultHoldExpirationdatePeriod is left blank, expiration date is not
set. Users are informed about this with a note in syspref.

To test:
1. Set DefaultHoldExpirationdate on but leave
DefaultHoldExpirationdatePeriod blank.
2. Add hold for patron.
=> Note that expiration date is set as today.
3. Apply this patch
=> Confirm following note is now added after sysprefs:
"NOTE: If DefaultHoldExpirationdatePeriod is left blank
default expiration date is not set."
4. Add new hold for patron.
=> Note that expiration date is not set.

Also prove t/db_dependent/Hold.t.

Sponsored-by: Koha-Suomi Oy

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list