]> git.koha-community.org Git - koha.git/commit
Bug 21729: Keep expiration date set when placing a hold
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 13 Oct 2021 09:30:42 +0000 (11:30 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 28 Jan 2022 21:09:06 +0000 (11:09 -1000)
commitb52f9adf0867b82805399138e0211a692bec7290
tree1fd6cd695b1bb77c198f6bbfef6d2b6904fc80c4
parentba5f0d39bddc9be0a84af31c3e628f75b6736860
Bug 21729: Keep expiration date set when placing a hold

The expiration date picked by the patron (or librarian) when placing a
hold is lost when a waiting hold is reverted.

We need a separate DB field to store this value and restore it when
needed: patron_expiration_date

The new behaviours are now:
Create a hold and specify an expiration date:
  expirationdate=patron_expiration_date

Fill the hold:
  expiration_date is calculated
  expiration_date set to the calculated value or to
patron_expiration_date if anterior
  patron_expiration_date not modified

Revert the waiting status:
  expirationdate set back to patron_expiration_date

Cancel expire reserves:
  if < expirationdate OR < patron_expiration_date
Note: This change should not be needed but won't hurt

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Florian Bontemps <florian.bontemps@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/Reserves.pm
Koha/Hold.pm
opac/opac-reserve.pl