]> git.koha-community.org Git - koha.git/commit
Bug 25690: Remove double usage of 'Reserved' return value
authorJoonas Kylmälä <joonas.kylmala@helsinki.fi>
Wed, 17 Feb 2021 12:04:47 +0000 (14:04 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 4 Mar 2021 15:18:42 +0000 (16:18 +0100)
commitfbef5478325bbc71064f9ecb3c4c50eaed0b223d
tree76ee05cb2de1555d5892d2b1a332d566ddd49a94
parent979b9c4678e79622c53b318c191333d8444c21d6
Bug 25690: Remove double usage of 'Reserved' return value

The patch "Bug 19116: Hold not set to waiting after transfer" added a
new meaning to 'Reserved' return value of C4::Reserves::CheckReserves
function. Let's remove double usage and have separate Transferred
return value so we can differentiate between attached and non-attached
holds. This will come useful in future refactorings.

This patch does no changes to the logic except in the
/cgi-bin/koha/circ/branchtransfers.pl and circulation.pl we now give
similarly to waiting state notice about hold being transferred.

To test:
   1) Apply this patch
   2) Create a new item level hold so that pickup library is different
   than where the item is currently. Then return the item so that hold
   is being attached and transferred.
   3) Go to branchtransfers.pl and try to create a new transfer: it
   should prompt you with message "Item is attached to a hold and
   being transferred for XXX" and provide you with option to cancel
   the hold or to ignore the transfer.

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/Circulation.pm
C4/Reserves.pm
C4/SIP/ILS/Transaction/Checkout.pm
circ/branchtransfers.pl
circ/circulation.pl
koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt
t/db_dependent/Circulation.t
t/db_dependent/Reserves.t