Bug 37966: When Renewing a book on hold, don't require the due date

When renewing a book on hold with the RenewalOnHoldOverride sys pref set
to "Allow", if the due date is not specified then it becomes "now".  By
checking the input is set rather than just defined the due date is set as
expected based on circulation rules.
Also change the description of the RenewalOnHoldOverride sys pref as the
due date would no longer be required to be entered with this change.

Test plan:
1. make sure RenewalOnHoldOverride is set to 'Allow'
2. check out a book, then place a title-level hold on it
3. renew the book, see the hold override dialog
4. leave the due date empty and hit the override button
5. observe the new due date is "now"
6. apply patch and restart plack
7. renew the book again, overriding the hold, and see the expected due date
   as per circulation rules.

Signed-off-by: Marion Durand <marion.durand@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c84de245e3)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
This commit is contained in:
Michael Hafen 2024-09-19 12:26:30 -06:00 committed by Jacob O'Mara
parent 79e9c95312
commit 4414a91678
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View File

@ -3445,7 +3445,7 @@ sub AddRenewal {
$borrowernumber ||= $issue->borrowernumber;
if ( defined $datedue && ref $datedue ne 'DateTime' ) {
if ( $datedue && ref $datedue ne 'DateTime' ) {
$datedue = dt_from_string( $datedue, 'sql' );
}

View File

@ -228,7 +228,7 @@ Circulation:
choices:
1: Allow
0: "Don't allow"
- staff to renew items that are on hold by manually specifying a due date.
- staff to renew items that are on hold.
-
- pref: AllowItemsOnHoldCheckoutSIP
choices: