From 61003ddb26fa6173c5ee16840a30d2ee4b7184e6 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Mon, 1 Mar 2021 15:28:18 +1300 Subject: [PATCH] Bug 15516: Allow to reserve first available item from a group of titles It can be useful, for instance, if a library has the same title from different publishers (so 1 title but several biblio records) but the user only wants a copy of the book, regardless of the publisher. This feature only applies to the staff client. Test plan: 0. Run updatedatabase.pl and misc/devel/update_dbix_class_files.pl 1. Go to intranet search, display some results, click on some checkboxes and click on 'Place hold' button at the top of the results. 2. Search for a patron 3. Check the 'Treat as hold group' checkbox 4. Click on 'Place hold' 5. In the next screen you should see all the holds you placed with the additional text '(part of a hold group)' in Details column. 6. Click on the "hold group" link. A modal window should appear with the content of the hold group (a list of holds) 7. Check in an item of one of the reserved biblios and confirm the hold 8. The hold status is changed to Waiting, and all other holds are deleted. Note: the "hold group" link is displayed in the following pages: - reserve/request.pl - circ/circulation.pl - members/moremember.pl - circ/pendingreserves.pl Note: A hold group is counted as only one hold Sponsored-by: Catalyst IT --- .../prog/en/includes/hold-group-modal.inc | 15 ++++++++ .../intranet-tmpl/prog/en/includes/holds_table.inc | 3 ++ .../prog/en/modules/circ/circulation.tt | 3 ++ .../prog/en/modules/circ/pendingreserves.tt | 6 ++++ .../prog/en/modules/members/moremember.tt | 3 ++ .../prog/en/modules/reserve/hold-group.tt | 30 ++++++++++++++++ .../prog/en/modules/reserve/request.tt | 17 ++++++--- koha-tmpl/intranet-tmpl/prog/js/hold-group.js | 8 +++++ koha-tmpl/intranet-tmpl/prog/js/holds.js | 6 ++++ opac/opac-reserve.pl | 2 +- reserve/hold-group.pl | 41 ++++++++++++++++++++++ reserve/placerequest.pl | 9 +++++ reserve/request.pl | 1 + svc/holds | 1 + 14 files changed, 140 insertions(+), 5 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/hold-group-modal.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/reserve/hold-group.tt create mode 100644 koha-tmpl/intranet-tmpl/prog/js/hold-group.js create mode 100644 reserve/hold-group.pl diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/hold-group-modal.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/hold-group-modal.inc new file mode 100644 index 0000000000..2b011dbf46 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/hold-group-modal.inc @@ -0,0 +1,15 @@ + diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc index 59f33cd2a0..a200baa286 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc @@ -177,6 +177,9 @@ [% IF hold.non_priority %]
Non priority hold [% END %] + [% IF hold.hold_group_id %] +
(part of a hold group)
+ [% END %] [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index a4f7369bb2..5321ab6133 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -1066,6 +1066,8 @@ +[% INCLUDE 'hold-group-modal.inc' %] + [% MACRO jsinclude BLOCK %] [% INCLUDE 'calendar.inc' %] [% INCLUDE 'datatables.inc' %] @@ -1099,6 +1101,7 @@ [% Asset.js("js/checkouts.js") | $raw %] [% Asset.js("js/holds.js") | $raw %] [% Asset.js("js/circ-patron-search-results.js") | $raw %] + [% Asset.js("js/hold-group.js") | $raw %]