]> git.koha-community.org Git - koha.git/commit
Bug 32696: Recalls can inadvertently extend the due date
authorJanusz Kaczmarek <januszop@gmail.com>
Mon, 8 Jul 2024 11:30:16 +0000 (11:30 +0000)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Mon, 19 Aug 2024 15:29:54 +0000 (17:29 +0200)
commite584b9adcb6fafb96ce77fcd84b68f6f697478f4
tree1058cea6f00f996a954d7f098f346ea4d9c541b8
parenta24829939e01d6027f725ba0e3ef71019f961ab3
Bug 32696: Recalls can inadvertently extend the due date

If an item is due sooner than the recall due date interval then placing
a recall on it can inadvertently extend the book's due date, possibly
causing the recalling patron to receive the item later than they would
otherwise.

Test plan:
=========

1. Turn on recalls with UseRecalls.
2. In circulation rules, set the recall due date interval to 7 days
   or any other arbitrary period.
3. Check out an item to one patron & set the due date to be before the
   recall due date interval will have elapsed (e.g. the next day)
4. As a second patron, place a recall on the item in question.
5. See that the item's due date is extended to the current date plus
   the recalls due date interval.
6. Apply the patch, restart_all;
7. Repeat steps 3. and 4. See that the due date has not been extended.

BTW, the calculation of $due_interval has been changed, because with
the current code and empty 'Recall due date interval' $due_interval
is undefined, despite the intention of the author of the code.
(after calling get_effective_rule $recall_due_date_interval is defined, but
$recall_due_date_interval->rule_value is undefined;  the patron gets
a message: '... return the item within days, by ...' - no days count).

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Koha/Recalls.pm