]> git.koha-community.org Git - koha.git/commit
Bug 28139: Simplify logic for handling found holds in returns.pl
authorJoonas Kylmälä <joonas.kylmala@helsinki.fi>
Tue, 13 Apr 2021 08:34:55 +0000 (11:34 +0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 29 Apr 2021 09:16:45 +0000 (11:16 +0200)
commit5daf19384da413bb9b572cd9884aba97ab0e85b1
tree21b65dc1a007c2ce08a0877ae806062a5386f5e6
parente35e811b46a8efbb2cdb05df4923c074044c8230
Bug 28139: Simplify logic for handling found holds in returns.pl

We are handling in this if-else block 3 cases:
 - Hold found and waiting
 - Hold found but not waiting AND whether HoldsAutoFill is enabled
 - Hold found but not waiting AND whether HoldsAutoFill disabled

If we simply first handle hold found = Waiting case first then we
don't have to individually list all those other found cases and that
simplifies this code a lot.

To test:
 1. Apply patch
 2. Make sure HoldsAutoFill is disabled
 3. Make item-level hold on branch A
 4. Check-in the item at branch A and you should get pop-up confirming
    the hold, ignore it
 5. Set HoldsAutoFill is enabled
 4. Check-in the item again and you now the hold should have been
    automatically filled

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 70239b355c6776065e20ed371f93483b110b7cda)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
circ/returns.pl