]> git.koha-community.org Git - koha.git/commit
Bug 25690: Remove duplicated logic in SIP2 checkouts
authorJoonas Kylmälä <joonas.kylmala@helsinki.fi>
Wed, 17 Feb 2021 12:17:36 +0000 (14:17 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 4 Mar 2021 15:18:42 +0000 (16:18 +0100)
commit338ba1d7692c1f75af7b0fb75eb5aac00a04a3df
tree3ddd802761d5a12e50d280ef53092be3a0e56ae2
parent9b5913d308e4aa03306c5275d0e638e922a6db32
Bug 25690: Remove duplicated logic in SIP2 checkouts

Because AllowItemsOnHoldCheckoutSIP only affects the checkoutability
of non-attached, i.e. RESERVED holds in SIP2 we can therefore use the
common code from CanBookBeIssued and ignore only the RESERVED confirmation
message case in SIP2 checkout code.

This slightly changes the checkout error message given for "In
processing" holds that someone other than the holdee tries to
checkout. Otherwise there is no logic changes. The message that this
changes is "Item is on hold for another patron." vs. now "Item cannot
be issued: $confirmation". It is easier to create follow-up patch to
properly add INPROCESSING confirmation to CanBookBeIssued and then
show correct message based on the CanBookBeIssued return value.

To test:
 1) Apply all patches from bug 25690 to get latest Transaction.t version
 2) prove t/db_dependent/SIP/Transaction.t => passes

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/SIP/ILS/Transaction/Checkout.pm