Bug 24860

Summary: Add ability to place item group level holds
Product: Koha Reporter: Kyle M Hall (khall) <kyle>
Component: CirculationAssignee: Kyle M Hall (khall) <kyle>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: new feature    
Priority: P5 - low CC: andreas.jonsson, andrew, caroline.cyr-la-rose, gmcharlt, hagud, jonathan.druart, jzairo, kelly, kyle.m.hall, lucas, martin.renvoize, nick, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20447
Change sponsored?: Sponsored Patch complexity: Medium patch
Documentation contact: Caroline Cyr La Rose Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/609
Text to go in the release notes:
This feature was sponsored by Arlington Public Library. With this feature you can now place holds on groups of items. A group consists of multiple items of the same record, representing for example, all items of a specific volume. When a hold for an item group is placed, only items of the requested group will be able to fill the hold. The feature is enabled using the new EnableItemGroupHolds system preference. It also requires EnableItemGroups for managing item groups.
Version(s) released in:
22.11.00
Circulation function:
Bug Depends on: 24857    
Bug Blocks: 31832, 32803, 34155, 34520, 34666    
Attachments: Bug 24860: Add reserves.volume_id
Bug 24860: Update existing Schema files [DO NOT PUSH]
Bug 24860: Add new syspref EnableVolumeHolds
Bug 24860: Implement reserves.volume_id
Bug 24860: Add ability to select a volume when placing a hold
Bug 24860: Add ability to select a volume when placing a hold - OPAC
Bug 24860: Skip non-matching volume holds in CheckReserves
Bug 24860: Skip non-matching volume holds in HoldsQueue
Bug 24860: Add reserves.volume_id
Bug 24860: Add new syspref EnableVolumeHolds
Bug 24860: Implement reserves.volume_id
Bug 24860: Add ability to select a volume when placing a hold
Bug 24860: Add ability to select a volume when placing a hold - OPAC
Bug 24860: Skip non-matching volume holds in CheckReserves
Bug 24860: Skip non-matching volume holds in HoldsQueue
Bug 24860: Update existing Schema files [DO NOT PUSH]
Bug 24860: Add reserves.volume_id
Bug 24860: Add new syspref EnableVolumeHolds
Bug 24860: Implement reserves.volume_id
Bug 24860: Add ability to select a volume when placing a hold
Bug 24860: Add ability to select a volume when placing a hold - OPAC
Bug 24860: Skip non-matching volume holds in CheckReserves
Bug 24860: Skip non-matching volume holds in HoldsQueue
Bug 24860: Update existing Schema files [DO NOT PUSH]
Bug 24860: Add hold's volume to holds table on circulation.pl and moremember.pl
Bug 24860: Add reserves.volume_id
Bug 24860: Add new syspref EnableVolumeHolds
Bug 24860: Implement reserves.volume_id
Bug 24860: Add ability to select a volume when placing a hold
Bug 24860: Add ability to select a volume when placing a hold - OPAC
Bug 24860: Skip non-matching volume holds in CheckReserves
Bug 24860: Skip non-matching volume holds in HoldsQueue
Bug 24860: Update existing Schema files [DO NOT PUSH]
Bug 24860: Add hold's volume to holds table on circulation.pl and moremember.pl
Bug 24860: Add reserves.volume_id
Bug 24860: Add new syspref EnableVolumeHolds
Bug 24860: Implement reserves.volume_id
Bug 24860: Add ability to select a volume when placing a hold
Bug 24860: Add ability to select a volume when placing a hold - OPAC
Bug 24860: Skip non-matching volume holds in CheckReserves
Bug 24860: Skip non-matching volume holds in HoldsQueue
Bug 24860: Update existing Schema files [DO NOT PUSH]
Bug 24860: Add hold's volume to holds table on circulation.pl and moremember.pl
Bug 24860: Add reserves.volume_id
Bug 24860: Add new syspref EnableVolumeHolds
Bug 24860: Implement reserves.volume_id
Bug 24860: Add ability to select a volume when placing a hold
Bug 24860: Add ability to select a volume when placing a hold - OPAC
Bug 24860: Skip non-matching volume holds in CheckReserves
Bug 24860: Skip non-matching volume holds in HoldsQueue
Bug 24860: Add hold's volume to holds table on circulation.pl and moremember.pl
Bug 24860: Update existing Schema files [DO NOT PUSH]
Bug 24860: Add reserves.volume_id
Bug 24860: Add new syspref EnableVolumeHolds
Bug 24860: Implement reserves.volume_id
Bug 24860: Add ability to select a volume when placing a hold
Bug 24860: Add ability to select a volume when placing a hold - OPAC
Bug 24860: Skip non-matching volume holds in CheckReserves
Bug 24860: Skip non-matching volume holds in HoldsQueue
Bug 24860: Add hold's volume to holds table on circulation.pl and moremember.pl
Bug 24860: Update existing Schema files [DO NOT PUSH]
Bug 24860: Add reserves.volume_id
Bug 24860: Add new syspref EnableVolumeHolds
Bug 24860: Implement reserves.volume_id
Bug 24860: Add ability to select a volume when placing a hold
Bug 24860: Add ability to select a volume when placing a hold - OPAC
Bug 24860: Skip non-matching volume holds in CheckReserves
Bug 24860: Skip non-matching volume holds in HoldsQueue
Bug 24860: Add hold's volume to holds table on circulation.pl and moremember.pl
Bug 24860: Update existing Schema files [DO NOT PUSH]
Bug 24860: Add reserves.volume_id
Bug 24860: Add new syspref EnableVolumeHolds
Bug 24860: Implement reserves.volume_id
Bug 24860: Add ability to select a volume when placing a hold
Bug 24860: Add ability to select a volume when placing a hold - OPAC
Bug 24860: Skip non-matching volume holds in CheckReserves
Bug 24860: Skip non-matching volume holds in HoldsQueue
Bug 24860: Add hold's volume to holds table on circulation.pl and moremember.pl
Bug 24860: Update existing Schema files [DO NOT PUSH]
Bug 24860: Add reserves.volume_id
Bug 24860: Add new syspref EnableVolumeHolds
Bug 24860: Implement reserves.volume_id
Bug 24860: Add ability to select a volume when placing a hold
Bug 24860: Add ability to select a volume when placing a hold - OPAC
Bug 24860: Skip non-matching volume holds in CheckReserves
Bug 24860: Skip non-matching volume holds in HoldsQueue
Bug 24860: Add hold's volume to holds table on circulation.pl and moremember.pl
Bug 24860: Update existing Schema files [DO NOT PUSH]
Bug 24860: Add reserves.volume_id
Bug 24860: Add new syspref EnableVolumeHolds
Bug 24860: Implement reserves.volume_id
Bug 24860: Add ability to select a volume when placing a hold
Bug 24860: Add ability to select a volume when placing a hold - OPAC
Bug 24860: Skip non-matching volume holds in CheckReserves
Bug 24860: Skip non-matching volume holds in HoldsQueue
Bug 24860: Add hold's volume to holds table on circulation.pl and moremember.pl
Bug 24860: Update existing Schema files [DO NOT PUSH]
Bug 24860: Add reserves.volume_id
Bug 24860: Add new syspref EnableVolumeHolds
Bug 24860: Implement reserves.volume_id
Bug 24860: Add ability to select a volume when placing a hold
Bug 24860: Add ability to select a volume when placing a hold - OPAC
Bug 24860: Skip non-matching volume holds in CheckReserves
Bug 24860: Skip non-matching volume holds in HoldsQueue
Bug 24860: Add hold's volume to holds table on circulation.pl and moremember.pl
Bug 24860: Update existing Schema files [DO NOT PUSH]
Bug 24860: Add reserves.item_group_it
Bug 24860: Add new syspref EnableItemGroupHolds
Bug 24860: Implement reserves.item_group_id
Bug 24860: Update existing Schema files [DO NOT PUSH]
Bug 24860: Add ability to select an item group when placing a hold
Bug 24860: Add ability to select an item group when placing a hold - OPAC
Bug 24860: Skip non-matching item group holds in CheckReserves
Bug 24860: Skip non-matching item group holds in HoldsQueue
Bug 24860: Add hold's item group to holds table on circulation.pl and moremember.pl
Bug 24860: Add reserves.item_group_it
Bug 24860: Add new syspref EnableItemGroupHolds
Bug 24860: Implement reserves.item_group_id
Bug 24860: Add ability to select an item group when placing a hold
Bug 24860: Add ability to select an item group when placing a hold - OPAC
Bug 24860: Skip non-matching item group holds in CheckReserves
Bug 24860: Skip non-matching item group holds in HoldsQueue
Bug 24860: Add hold's item group to holds table on circulation.pl and moremember.pl
Bug 24860: Update existing Schema files [DO NOT PUSH]
Bug 24860: (QA follow-up) Fix number of tests in t/db_dependent/Koha/Holds.t
Bug 24860: (QA follow-up) Terminology and translation fixes
Bug 24860: Add reserves.item_group_it
Bug 24860: Add new syspref EnableItemGroupHolds
Bug 24860: Implement reserves.item_group_id
Bug 24860: Add ability to select an item group when placing a hold
Bug 24860: Add ability to select an item group when placing a hold - OPAC
Bug 24860: Skip non-matching item group holds in CheckReserves
Bug 24860: Skip non-matching item group holds in HoldsQueue
Bug 24860: Add hold's item group to holds table on circulation.pl and moremember.pl
Bug 24860: Update existing Schema files [DO NOT PUSH]
Bug 24860: (QA follow-up) Fix number of tests in t/db_dependent/Koha/Holds.t
Bug 24860: (QA follow-up) Terminology and translation fixes
Bug 24860: (QA follow-up) Add unit tests to cover changes to HoldsQueue.pm
Bug 24860: (QA follow-up) Add unit tests to cover changes to Reserves.pm
Bug 24860: (QA follow-up) Add unit tests to cover Koha::Hold::item_group
Bug 24860: (QA follow-up) Add unit tests to cover Koha::Holds::forced_hold_level
Bug 24860: (QA follow-up) Add unit tests to cover Koha::REST::V1::Holds::add
Bug 24860: Add reserves.item_group_it
Bug 24860: Add new syspref EnableItemGroupHolds
Bug 24860: Implement reserves.item_group_id
Bug 24860: Add ability to select an item group when placing a hold
Bug 24860: Add ability to select an item group when placing a hold - OPAC
Bug 24860: Skip non-matching item group holds in CheckReserves
Bug 24860: Skip non-matching item group holds in HoldsQueue
Bug 24860: Add hold's item group to holds table on circulation.pl and moremember.pl
Bug 24860: Update existing Schema files [DO NOT PUSH]
Bug 24860: (QA follow-up) Fix number of tests in t/db_dependent/Koha/Holds.t
Bug 24860: (QA follow-up) Terminology and translation fixes
Bug 24860: (QA follow-up) Add unit tests to cover changes to HoldsQueue.pm
Bug 24860: (QA follow-up) Add unit tests to cover changes to Reserves.pm
Bug 24860: (QA follow-up) Add unit tests to cover Koha::Hold::item_group
Bug 24860: (QA follow-up) Add unit tests to cover Koha::Holds::forced_hold_level
Bug 24860: (QA follow-up) Add unit tests to cover Koha::REST::V1::Holds::add
Bug 24860: (QA follow-up) Fix typo in holds queue viewer
Bug 24860: (QA follow-up) Show group holds on Holds to pull
Bug 24860: (QA follow-up): Don't assume item group is set for all items
Bug 24860: Add reserves.item_group_it
Bug 24860: Add new syspref EnableItemGroupHolds
Bug 24860: Implement reserves.item_group_id
Bug 24860: Add ability to select an item group when placing a hold
Bug 24860: Add ability to select an item group when placing a hold - OPAC
Bug 24860: Skip non-matching item group holds in CheckReserves
Bug 24860: Skip non-matching item group holds in HoldsQueue
Bug 24860: Add hold's item group to holds table on circulation.pl and moremember.pl
Bug 24860: Update existing Schema files [DO NOT PUSH]
Bug 24860: (QA follow-up) Fix number of tests in t/db_dependent/Koha/Holds.t
Bug 24860: (QA follow-up) Terminology and translation fixes
Bug 24860: (QA follow-up) Add unit tests to cover changes to HoldsQueue.pm
Bug 24860: (QA follow-up) Add unit tests to cover changes to Reserves.pm
Bug 24860: (QA follow-up) Add unit tests to cover Koha::Hold::item_group
Bug 24860: (QA follow-up) Add unit tests to cover Koha::Holds::forced_hold_level
Bug 24860: (QA follow-up) Add unit tests to cover Koha::REST::V1::Holds::add
Bug 24860: (QA follow-up) Fix typo in holds queue viewer
Bug 24860: (QA follow-up) Show group holds on Holds to pull
Bug 24860: (QA follow-up): Don't assume item group is set for all items
Bug 24860: (QA follow-up) Ask for any available item of matching group
Bug 24860: (QA follow-up) Don't show holds where a matching item group item is not available
Bug 24860: Add reserves.item_group_it
Bug 24860: Add new syspref EnableItemGroupHolds
Bug 24860: Implement reserves.item_group_id
Bug 24860: Add ability to select an item group when placing a hold
Bug 24860: Add ability to select an item group when placing a hold - OPAC
Bug 24860: Skip non-matching item group holds in CheckReserves
Bug 24860: Skip non-matching item group holds in HoldsQueue
Bug 24860: Add hold's item group to holds table on circulation.pl and moremember.pl
Bug 24860: Update existing Schema files [DO NOT PUSH]
Bug 24860: (QA follow-up) Fix number of tests in t/db_dependent/Koha/Holds.t
Bug 24860: (QA follow-up) Terminology and translation fixes
Bug 24860: (QA follow-up) Add unit tests to cover changes to HoldsQueue.pm
Bug 24860: (QA follow-up) Add unit tests to cover changes to Reserves.pm
Bug 24860: (QA follow-up) Add unit tests to cover Koha::Hold::item_group
Bug 24860: (QA follow-up) Add unit tests to cover Koha::Holds::forced_hold_level
Bug 24860: (QA follow-up) Add unit tests to cover Koha::REST::V1::Holds::add
Bug 24860: (QA follow-up) Fix typo in holds queue viewer
Bug 24860: (QA follow-up) Show group holds on Holds to pull
Bug 24860: (QA follow-up): Don't assume item group is set for all items
Bug 24860: (QA follow-up) Ask for any available item of matching group

Description Kyle M Hall (khall) 2020-03-12 15:45:49 UTC
This feature builds upon bug 24857 and allows placing holds that target a specific volume of a record. It is patterned after the feature that allows limiting hold selection by itemtype ( AllowHoldItemTypeSelection ).
Comment 1 Kyle M Hall (khall) 2020-03-12 15:58:15 UTC
Created attachment 100644 [details] [review]
Bug 24860: Add reserves.volume_id

This feature builds upon bug 24857 and allows placing holds that target a specific volume of a record. It is patterned after the feature that allows limiting hold selection by itemtype ( AllowHoldItemTypeSelection ).

Test Plan:
1) Apply bug 24857 and this bug's patches
2) Run updatedatabase.pl
3) Restart all the things!
4) Enable the sysprefs EnableVolumes and EnableVolumeHolds
5) Create a record, items and volumes, with each item being assigned to
a volume
6) Place a hold for a patron
7) Note the new selector to choose a volume in addition to record and item level holds
8) Place a volume level hold
9) Check in an item from the record that is not part of that volume
10) Note the hold is not trapped for that item
11) Check in an item from the record that *is* part of that volume
12) Note the hold is trapped for that item
13) Place a volume level hold for another item
14) Run the holds queue builder
15) Note the holds queue targets only items from that volume
16) Check out all the items of that volume to other patrosn
17) Re-run the holds queue builder
18) Note the holds queue no longer has a line for that hold,
    as all items that could fill that hold are now unavailable
Comment 2 Kyle M Hall (khall) 2020-03-12 15:58:24 UTC
Created attachment 100645 [details] [review]
Bug 24860: Update existing Schema files [DO NOT PUSH]
Comment 3 Kyle M Hall (khall) 2020-03-12 15:58:26 UTC
Created attachment 100646 [details] [review]
Bug 24860: Add new syspref EnableVolumeHolds
Comment 4 Kyle M Hall (khall) 2020-03-12 15:58:29 UTC
Created attachment 100647 [details] [review]
Bug 24860: Implement reserves.volume_id
Comment 5 Kyle M Hall (khall) 2020-03-12 15:58:32 UTC
Created attachment 100648 [details] [review]
Bug 24860: Add ability to select a volume when placing a hold

TODO: Add 'Volume' column to holds table on circulation.pl and moremember.pl
      Requires embedding volume in hold API
Comment 6 Kyle M Hall (khall) 2020-03-12 15:58:34 UTC
Created attachment 100649 [details] [review]
Bug 24860: Add ability to select a volume when placing a hold - OPAC
Comment 7 Kyle M Hall (khall) 2020-03-12 15:58:37 UTC
Created attachment 100650 [details] [review]
Bug 24860: Skip non-matching volume holds in CheckReserves
Comment 8 Kyle M Hall (khall) 2020-03-12 15:58:39 UTC
Created attachment 100651 [details] [review]
Bug 24860: Skip non-matching volume holds in HoldsQueue
Comment 9 Kyle M Hall (khall) 2020-03-25 18:00:23 UTC
Created attachment 101744 [details] [review]
Bug 24860: Add reserves.volume_id

This feature builds upon bug 24857 and allows placing holds that target a specific volume of a record. It is patterned after the feature that allows limiting hold selection by itemtype ( AllowHoldItemTypeSelection ).

Test Plan:
1) Apply bug 24857 and this bug's patches
2) Run updatedatabase.pl
3) Restart all the things!
4) Enable the sysprefs EnableVolumes and EnableVolumeHolds
5) Create a record, items and volumes, with each item being assigned to
a volume
6) Place a hold for a patron
7) Note the new selector to choose a volume in addition to record and item level holds
8) Place a volume level hold
9) Check in an item from the record that is not part of that volume
10) Note the hold is not trapped for that item
11) Check in an item from the record that *is* part of that volume
12) Note the hold is trapped for that item
13) Place a volume level hold for another item
14) Run the holds queue builder
15) Note the holds queue targets only items from that volume
16) Check out all the items of that volume to other patrosn
17) Re-run the holds queue builder
18) Note the holds queue no longer has a line for that hold,
    as all items that could fill that hold are now unavailable
Comment 10 Kyle M Hall (khall) 2020-03-25 18:00:32 UTC
Created attachment 101745 [details] [review]
Bug 24860: Add new syspref EnableVolumeHolds
Comment 11 Kyle M Hall (khall) 2020-03-25 18:00:34 UTC
Created attachment 101746 [details] [review]
Bug 24860: Implement reserves.volume_id
Comment 12 Kyle M Hall (khall) 2020-03-25 18:00:37 UTC
Created attachment 101747 [details] [review]
Bug 24860: Add ability to select a volume when placing a hold

TODO: Add 'Volume' column to holds table on circulation.pl and moremember.pl
      Requires embedding volume in hold API
Comment 13 Kyle M Hall (khall) 2020-03-25 18:00:40 UTC
Created attachment 101748 [details] [review]
Bug 24860: Add ability to select a volume when placing a hold - OPAC
Comment 14 Kyle M Hall (khall) 2020-03-25 18:00:42 UTC
Created attachment 101749 [details] [review]
Bug 24860: Skip non-matching volume holds in CheckReserves
Comment 15 Kyle M Hall (khall) 2020-03-25 18:00:45 UTC
Created attachment 101750 [details] [review]
Bug 24860: Skip non-matching volume holds in HoldsQueue
Comment 16 Kyle M Hall (khall) 2020-03-25 18:00:48 UTC
Created attachment 101751 [details] [review]
Bug 24860: Update existing Schema files [DO NOT PUSH]
Comment 17 Kyle M Hall (khall) 2020-03-26 13:27:38 UTC
Created attachment 101827 [details] [review]
Bug 24860: Add reserves.volume_id

This feature builds upon bug 24857 and allows placing holds that target a specific volume of a record. It is patterned after the feature that allows limiting hold selection by itemtype ( AllowHoldItemTypeSelection ).

Test Plan:
1) Apply bug 24857 and this bug's patches
2) Run updatedatabase.pl
3) Restart all the things!
4) Enable the sysprefs EnableVolumes and EnableVolumeHolds
5) Create a record, items and volumes, with each item being assigned to
a volume
6) Place a hold for a patron
7) Note the new selector to choose a volume in addition to record and item level holds
8) Place a volume level hold
9) Check in an item from the record that is not part of that volume
10) Note the hold is not trapped for that item
11) Check in an item from the record that *is* part of that volume
12) Note the hold is trapped for that item
13) Place a volume level hold for another item
14) Run the holds queue builder
15) Note the holds queue targets only items from that volume
16) Check out all the items of that volume to other patrosn
17) Re-run the holds queue builder
18) Note the holds queue no longer has a line for that hold,
    as all items that could fill that hold are now unavailable
Comment 18 Kyle M Hall (khall) 2020-03-26 13:27:47 UTC
Created attachment 101828 [details] [review]
Bug 24860: Add new syspref EnableVolumeHolds
Comment 19 Kyle M Hall (khall) 2020-03-26 13:27:49 UTC
Created attachment 101829 [details] [review]
Bug 24860: Implement reserves.volume_id
Comment 20 Kyle M Hall (khall) 2020-03-26 13:27:52 UTC
Created attachment 101830 [details] [review]
Bug 24860: Add ability to select a volume when placing a hold
Comment 21 Kyle M Hall (khall) 2020-03-26 13:27:56 UTC
Created attachment 101831 [details] [review]
Bug 24860: Add ability to select a volume when placing a hold - OPAC
Comment 22 Kyle M Hall (khall) 2020-03-26 13:27:58 UTC
Created attachment 101832 [details] [review]
Bug 24860: Skip non-matching volume holds in CheckReserves
Comment 23 Kyle M Hall (khall) 2020-03-26 13:28:01 UTC
Created attachment 101833 [details] [review]
Bug 24860: Skip non-matching volume holds in HoldsQueue
Comment 24 Kyle M Hall (khall) 2020-03-26 13:28:04 UTC
Created attachment 101834 [details] [review]
Bug 24860: Update existing Schema files [DO NOT PUSH]
Comment 25 Kyle M Hall (khall) 2020-03-26 13:28:06 UTC
Created attachment 101835 [details] [review]
Bug 24860: Add hold's volume to holds table on circulation.pl and moremember.pl
Comment 26 Andrew Fuerste-Henry 2020-03-27 16:30:31 UTC
Receiving an ISE:
- find/create bib with 3 items
- put item_1 and item_2 in volume
- place hold on volume
- check in item_3
- get error:
Can't call method "id" on an undefined value at /kohadevbox/koha/C4/Reserves.pm line 846
Comment 27 Kyle M Hall (khall) 2020-04-01 17:32:28 UTC
Created attachment 102230 [details] [review]
Bug 24860: Add reserves.volume_id

This feature builds upon bug 24857 and allows placing holds that target a specific volume of a record. It is patterned after the feature that allows limiting hold selection by itemtype ( AllowHoldItemTypeSelection ).

Test Plan:
1) Apply bug 24857 and this bug's patches
2) Run updatedatabase.pl
3) Restart all the things!
4) Enable the sysprefs EnableVolumes and EnableVolumeHolds
5) Create a record, items and volumes, with each item being assigned to
a volume
6) Place a hold for a patron
7) Note the new selector to choose a volume in addition to record and item level holds
8) Place a volume level hold
9) Check in an item from the record that is not part of that volume
10) Note the hold is not trapped for that item
11) Check in an item from the record that *is* part of that volume
12) Note the hold is trapped for that item
13) Place a volume level hold for another item
14) Run the holds queue builder
15) Note the holds queue targets only items from that volume
16) Check out all the items of that volume to other patrosn
17) Re-run the holds queue builder
18) Note the holds queue no longer has a line for that hold,
    as all items that could fill that hold are now unavailable
Comment 28 Kyle M Hall (khall) 2020-04-01 17:32:39 UTC
Created attachment 102231 [details] [review]
Bug 24860: Add new syspref EnableVolumeHolds
Comment 29 Kyle M Hall (khall) 2020-04-01 17:32:43 UTC
Created attachment 102232 [details] [review]
Bug 24860: Implement reserves.volume_id
Comment 30 Kyle M Hall (khall) 2020-04-01 17:32:46 UTC
Created attachment 102233 [details] [review]
Bug 24860: Add ability to select a volume when placing a hold
Comment 31 Kyle M Hall (khall) 2020-04-01 17:32:49 UTC
Created attachment 102234 [details] [review]
Bug 24860: Add ability to select a volume when placing a hold - OPAC
Comment 32 Kyle M Hall (khall) 2020-04-01 17:32:52 UTC
Created attachment 102235 [details] [review]
Bug 24860: Skip non-matching volume holds in CheckReserves
Comment 33 Kyle M Hall (khall) 2020-04-01 17:32:55 UTC
Created attachment 102236 [details] [review]
Bug 24860: Skip non-matching volume holds in HoldsQueue
Comment 34 Kyle M Hall (khall) 2020-04-01 17:32:59 UTC
Created attachment 102237 [details] [review]
Bug 24860: Update existing Schema files [DO NOT PUSH]
Comment 35 Kyle M Hall (khall) 2020-04-01 17:33:02 UTC
Created attachment 102238 [details] [review]
Bug 24860: Add hold's volume to holds table on circulation.pl and moremember.pl
Comment 36 Andrew Fuerste-Henry 2020-04-01 18:22:11 UTC
Created attachment 102239 [details] [review]
Bug 24860: Add reserves.volume_id

This feature builds upon bug 24857 and allows placing holds that target a specific volume of a record. It is patterned after the feature that allows limiting hold selection by itemtype ( AllowHoldItemTypeSelection ).

Test Plan:
1) Apply bug 24857 and this bug's patches
2) Run updatedatabase.pl
3) Restart all the things!
4) Enable the sysprefs EnableVolumes and EnableVolumeHolds
5) Create a record, items and volumes, with each item being assigned to
a volume
6) Place a hold for a patron
7) Note the new selector to choose a volume in addition to record and item level holds
8) Place a volume level hold
9) Check in an item from the record that is not part of that volume
10) Note the hold is not trapped for that item
11) Check in an item from the record that *is* part of that volume
12) Note the hold is trapped for that item
13) Place a volume level hold for another item
14) Run the holds queue builder
15) Note the holds queue targets only items from that volume
16) Check out all the items of that volume to other patrosn
17) Re-run the holds queue builder
18) Note the holds queue no longer has a line for that hold,
    as all items that could fill that hold are now unavailable

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 37 Andrew Fuerste-Henry 2020-04-01 18:22:16 UTC
Created attachment 102240 [details] [review]
Bug 24860: Add new syspref EnableVolumeHolds

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 38 Andrew Fuerste-Henry 2020-04-01 18:22:19 UTC
Created attachment 102241 [details] [review]
Bug 24860: Implement reserves.volume_id

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 39 Andrew Fuerste-Henry 2020-04-01 18:22:22 UTC
Created attachment 102242 [details] [review]
Bug 24860: Add ability to select a volume when placing a hold

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 40 Andrew Fuerste-Henry 2020-04-01 18:22:25 UTC
Created attachment 102243 [details] [review]
Bug 24860: Add ability to select a volume when placing a hold - OPAC

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 41 Andrew Fuerste-Henry 2020-04-01 18:22:28 UTC
Created attachment 102244 [details] [review]
Bug 24860: Skip non-matching volume holds in CheckReserves

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 42 Andrew Fuerste-Henry 2020-04-01 18:22:32 UTC
Created attachment 102245 [details] [review]
Bug 24860: Skip non-matching volume holds in HoldsQueue

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 43 Andrew Fuerste-Henry 2020-04-01 18:22:35 UTC
Created attachment 102246 [details] [review]
Bug 24860: Update existing Schema files [DO NOT PUSH]

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 44 Andrew Fuerste-Henry 2020-04-01 18:22:38 UTC
Created attachment 102247 [details] [review]
Bug 24860: Add hold's volume to holds table on circulation.pl and moremember.pl

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 45 Kyle M Hall (khall) 2020-07-06 16:01:01 UTC
Created attachment 106589 [details] [review]
Bug 24860: Add reserves.volume_id

This feature builds upon bug 24857 and allows placing holds that target a specific volume of a record. It is patterned after the feature that allows limiting hold selection by itemtype ( AllowHoldItemTypeSelection ).

Test Plan:
1) Apply bug 24857 and this bug's patches
2) Run updatedatabase.pl
3) Restart all the things!
4) Enable the sysprefs EnableVolumes and EnableVolumeHolds
5) Create a record, items and volumes, with each item being assigned to
a volume
6) Place a hold for a patron
7) Note the new selector to choose a volume in addition to record and item level holds
8) Place a volume level hold
9) Check in an item from the record that is not part of that volume
10) Note the hold is not trapped for that item
11) Check in an item from the record that *is* part of that volume
12) Note the hold is trapped for that item
13) Place a volume level hold for another item
14) Run the holds queue builder
15) Note the holds queue targets only items from that volume
16) Check out all the items of that volume to other patrosn
17) Re-run the holds queue builder
18) Note the holds queue no longer has a line for that hold,
    as all items that could fill that hold are now unavailable

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 46 Kyle M Hall (khall) 2020-07-06 16:01:18 UTC
Created attachment 106590 [details] [review]
Bug 24860: Add new syspref EnableVolumeHolds

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 47 Kyle M Hall (khall) 2020-07-06 16:01:21 UTC
Created attachment 106591 [details] [review]
Bug 24860: Implement reserves.volume_id

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 48 Kyle M Hall (khall) 2020-07-06 16:01:25 UTC
Created attachment 106592 [details] [review]
Bug 24860: Add ability to select a volume when placing a hold

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 49 Kyle M Hall (khall) 2020-07-06 16:01:28 UTC
Created attachment 106593 [details] [review]
Bug 24860: Add ability to select a volume when placing a hold - OPAC

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 50 Kyle M Hall (khall) 2020-07-06 16:01:32 UTC
Created attachment 106594 [details] [review]
Bug 24860: Skip non-matching volume holds in CheckReserves

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 51 Kyle M Hall (khall) 2020-07-06 16:01:35 UTC
Created attachment 106595 [details] [review]
Bug 24860: Skip non-matching volume holds in HoldsQueue

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 52 Kyle M Hall (khall) 2020-07-06 16:01:39 UTC
Created attachment 106596 [details] [review]
Bug 24860: Add hold's volume to holds table on circulation.pl and moremember.pl

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 53 Kyle M Hall (khall) 2020-07-06 16:01:42 UTC
Created attachment 106597 [details] [review]
Bug 24860: Update existing Schema files [DO NOT PUSH]
Comment 54 Hugo Agud 2020-07-09 08:33:34 UTC
Created attachment 106682 [details] [review]
Bug 24860: Add reserves.volume_id

This feature builds upon bug 24857 and allows placing holds that target a specific volume of a record. It is patterned after the feature that allows limiting hold selection by itemtype ( AllowHoldItemTypeSelection ).

Test Plan:
1) Apply bug 24857 and this bug's patches
2) Run updatedatabase.pl
3) Restart all the things!
4) Enable the sysprefs EnableVolumes and EnableVolumeHolds
5) Create a record, items and volumes, with each item being assigned to
a volume
6) Place a hold for a patron
7) Note the new selector to choose a volume in addition to record and item level holds
8) Place a volume level hold
9) Check in an item from the record that is not part of that volume
10) Note the hold is not trapped for that item
11) Check in an item from the record that *is* part of that volume
12) Note the hold is trapped for that item
13) Place a volume level hold for another item
14) Run the holds queue builder
15) Note the holds queue targets only items from that volume
16) Check out all the items of that volume to other patrosn
17) Re-run the holds queue builder
18) Note the holds queue no longer has a line for that hold,
    as all items that could fill that hold are now unavailable

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Hugo Agud (hagud@orex.es


Current status: Signed Off


 Current depends: 24857
Comment 55 Hugo Agud 2020-07-09 08:33:37 UTC
Created attachment 106683 [details] [review]
Bug 24860: Add new syspref EnableVolumeHolds

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Your Full Name <your_email>
Comment 56 Hugo Agud 2020-07-09 08:33:41 UTC
Created attachment 106684 [details] [review]
Bug 24860: Implement reserves.volume_id

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Your Full Name <your_email>
Comment 57 Hugo Agud 2020-07-09 08:33:45 UTC
Created attachment 106685 [details] [review]
Bug 24860: Add ability to select a volume when placing a hold

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Your Full Name <your_email>
Comment 58 Hugo Agud 2020-07-09 08:33:49 UTC
Created attachment 106686 [details] [review]
Bug 24860: Add ability to select a volume when placing a hold - OPAC

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Your Full Name <your_email>
Comment 59 Hugo Agud 2020-07-09 08:33:52 UTC
Created attachment 106687 [details] [review]
Bug 24860: Skip non-matching volume holds in CheckReserves

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Your Full Name <your_email>
Comment 60 Hugo Agud 2020-07-09 08:33:56 UTC
Created attachment 106688 [details] [review]
Bug 24860: Skip non-matching volume holds in HoldsQueue

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Your Full Name <your_email>
Comment 61 Hugo Agud 2020-07-09 08:33:59 UTC
Created attachment 106689 [details] [review]
Bug 24860: Add hold's volume to holds table on circulation.pl and moremember.pl

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Your Full Name <your_email>
Comment 62 Hugo Agud 2020-07-09 08:34:04 UTC
Created attachment 106690 [details] [review]
Bug 24860: Update existing Schema files [DO NOT PUSH]

Signed-off-by: Your Full Name <your_email>
Comment 63 Hugo Agud 2020-07-09 08:47:07 UTC
I have already signed this patch, the patch does what it promises, but I wish to share some doubts.


When you talk about volume, you're talking about Bindings items? 

We only can add a volume to an intem if the items is not created, there is no way of assign volumes to already created items?

Volume is shown in a new colum, but in fact the value is also copied in enumchrom, that it can manage this and other values what happens if there is already another value at enumchrom?

At opac-detail at staff we are seeing twice de value (Volume and enumchrom), however at edit items page, we are not seeing volume column, just enumchron that it can be modified by a librarian without any problem.

There is no info on volume on opac-detail.tt page, then the user can't know there is a volume, although it can place a hold at volume level, without knowing anything

kindest regards
Comment 64 Andrew Fuerste-Henry 2020-07-09 16:15:19 UTC
Created attachment 106742 [details] [review]
Bug 24860: Add reserves.volume_id

This feature builds upon bug 24857 and allows placing holds that target a specific volume of a record. It is patterned after the feature that allows limiting hold selection by itemtype ( AllowHoldItemTypeSelection ).

Test Plan:
1) Apply bug 24857 and this bug's patches
2) Run updatedatabase.pl
3) Restart all the things!
4) Enable the sysprefs EnableVolumes and EnableVolumeHolds
5) Create a record, items and volumes, with each item being assigned to
a volume
6) Place a hold for a patron
7) Note the new selector to choose a volume in addition to record and item level holds
8) Place a volume level hold
9) Check in an item from the record that is not part of that volume
10) Note the hold is not trapped for that item
11) Check in an item from the record that *is* part of that volume
12) Note the hold is trapped for that item
13) Place a volume level hold for another item
14) Run the holds queue builder
15) Note the holds queue targets only items from that volume
16) Check out all the items of that volume to other patrosn
17) Re-run the holds queue builder
18) Note the holds queue no longer has a line for that hold,
    as all items that could fill that hold are now unavailable

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Your Full Name <your_email>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 65 Andrew Fuerste-Henry 2020-07-09 16:15:23 UTC
Created attachment 106743 [details] [review]
Bug 24860: Add new syspref EnableVolumeHolds

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Your Full Name <your_email>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 66 Andrew Fuerste-Henry 2020-07-09 16:15:27 UTC
Created attachment 106744 [details] [review]
Bug 24860: Implement reserves.volume_id

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Your Full Name <your_email>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 67 Andrew Fuerste-Henry 2020-07-09 16:15:31 UTC
Created attachment 106745 [details] [review]
Bug 24860: Add ability to select a volume when placing a hold

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Your Full Name <your_email>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 68 Andrew Fuerste-Henry 2020-07-09 16:15:35 UTC
Created attachment 106746 [details] [review]
Bug 24860: Add ability to select a volume when placing a hold - OPAC

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Your Full Name <your_email>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 69 Andrew Fuerste-Henry 2020-07-09 16:15:39 UTC
Created attachment 106747 [details] [review]
Bug 24860: Skip non-matching volume holds in CheckReserves

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Your Full Name <your_email>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 70 Andrew Fuerste-Henry 2020-07-09 16:15:42 UTC
Created attachment 106748 [details] [review]
Bug 24860: Skip non-matching volume holds in HoldsQueue

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Your Full Name <your_email>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 71 Andrew Fuerste-Henry 2020-07-09 16:15:46 UTC
Created attachment 106749 [details] [review]
Bug 24860: Add hold's volume to holds table on circulation.pl and moremember.pl

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Your Full Name <your_email>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 72 Andrew Fuerste-Henry 2020-07-09 16:15:50 UTC
Created attachment 106750 [details] [review]
Bug 24860: Update existing Schema files [DO NOT PUSH]

Signed-off-by: Your Full Name <your_email>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 73 Katrin Fischer 2020-08-16 21:56:52 UTC
Currently blocked by depending bug 24857 not applying.
Comment 74 Kyle M Hall (khall) 2020-08-18 11:12:35 UTC
Created attachment 108458 [details] [review]
Bug 24860: Add reserves.volume_id

This feature builds upon bug 24857 and allows placing holds that target a specific volume of a record. It is patterned after the feature that allows limiting hold selection by itemtype ( AllowHoldItemTypeSelection ).

Test Plan:
1) Apply bug 24857 and this bug's patches
2) Run updatedatabase.pl
3) Restart all the things!
4) Enable the sysprefs EnableVolumes and EnableVolumeHolds
5) Create a record, items and volumes, with each item being assigned to
a volume
6) Place a hold for a patron
7) Note the new selector to choose a volume in addition to record and item level holds
8) Place a volume level hold
9) Check in an item from the record that is not part of that volume
10) Note the hold is not trapped for that item
11) Check in an item from the record that *is* part of that volume
12) Note the hold is trapped for that item
13) Place a volume level hold for another item
14) Run the holds queue builder
15) Note the holds queue targets only items from that volume
16) Check out all the items of that volume to other patrosn
17) Re-run the holds queue builder
18) Note the holds queue no longer has a line for that hold,
    as all items that could fill that hold are now unavailable

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 75 Kyle M Hall (khall) 2020-08-18 11:12:48 UTC
Created attachment 108459 [details] [review]
Bug 24860: Add new syspref EnableVolumeHolds

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 76 Kyle M Hall (khall) 2020-08-18 11:12:53 UTC
Created attachment 108460 [details] [review]
Bug 24860: Implement reserves.volume_id

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 77 Kyle M Hall (khall) 2020-08-18 11:12:58 UTC
Created attachment 108461 [details] [review]
Bug 24860: Add ability to select a volume when placing a hold

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 78 Kyle M Hall (khall) 2020-08-18 11:13:03 UTC
Created attachment 108462 [details] [review]
Bug 24860: Add ability to select a volume when placing a hold - OPAC

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 79 Kyle M Hall (khall) 2020-08-18 11:13:08 UTC
Created attachment 108463 [details] [review]
Bug 24860: Skip non-matching volume holds in CheckReserves

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 80 Kyle M Hall (khall) 2020-08-18 11:13:12 UTC
Created attachment 108464 [details] [review]
Bug 24860: Skip non-matching volume holds in HoldsQueue

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 81 Kyle M Hall (khall) 2020-08-18 11:13:16 UTC
Created attachment 108465 [details] [review]
Bug 24860: Add hold's volume to holds table on circulation.pl and moremember.pl

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 82 Kyle M Hall (khall) 2020-08-18 11:13:21 UTC
Created attachment 108466 [details] [review]
Bug 24860: Update existing Schema files [DO NOT PUSH]

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 83 Kyle M Hall (khall) 2020-08-25 14:48:57 UTC
Created attachment 109097 [details] [review]
Bug 24860: Add reserves.volume_id

This feature builds upon bug 24857 and allows placing holds that target a specific volume of a record. It is patterned after the feature that allows limiting hold selection by itemtype ( AllowHoldItemTypeSelection ).

Test Plan:
1) Apply bug 24857 and this bug's patches
2) Run updatedatabase.pl
3) Restart all the things!
4) Enable the sysprefs EnableVolumes and EnableVolumeHolds
5) Create a record, items and volumes, with each item being assigned to
a volume
6) Place a hold for a patron
7) Note the new selector to choose a volume in addition to record and item level holds
8) Place a volume level hold
9) Check in an item from the record that is not part of that volume
10) Note the hold is not trapped for that item
11) Check in an item from the record that *is* part of that volume
12) Note the hold is trapped for that item
13) Place a volume level hold for another item
14) Run the holds queue builder
15) Note the holds queue targets only items from that volume
16) Check out all the items of that volume to other patrosn
17) Re-run the holds queue builder
18) Note the holds queue no longer has a line for that hold,
    as all items that could fill that hold are now unavailable

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 84 Kyle M Hall (khall) 2020-08-25 14:49:08 UTC
Created attachment 109098 [details] [review]
Bug 24860: Add new syspref EnableVolumeHolds

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 85 Kyle M Hall (khall) 2020-08-25 14:49:12 UTC
Created attachment 109099 [details] [review]
Bug 24860: Implement reserves.volume_id

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 86 Kyle M Hall (khall) 2020-08-25 14:49:17 UTC
Created attachment 109100 [details] [review]
Bug 24860: Add ability to select a volume when placing a hold

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 87 Kyle M Hall (khall) 2020-08-25 14:49:21 UTC
Created attachment 109101 [details] [review]
Bug 24860: Add ability to select a volume when placing a hold - OPAC

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 88 Kyle M Hall (khall) 2020-08-25 14:49:25 UTC
Created attachment 109102 [details] [review]
Bug 24860: Skip non-matching volume holds in CheckReserves

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 89 Kyle M Hall (khall) 2020-08-25 14:49:29 UTC
Created attachment 109103 [details] [review]
Bug 24860: Skip non-matching volume holds in HoldsQueue

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 90 Kyle M Hall (khall) 2020-08-25 14:49:33 UTC
Created attachment 109104 [details] [review]
Bug 24860: Add hold's volume to holds table on circulation.pl and moremember.pl

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 91 Kyle M Hall (khall) 2020-08-25 14:49:37 UTC
Created attachment 109105 [details] [review]
Bug 24860: Update existing Schema files [DO NOT PUSH]
Comment 92 Kyle M Hall (khall) 2020-08-26 12:54:08 UTC
Created attachment 109171 [details] [review]
Bug 24860: Add reserves.volume_id

This feature builds upon bug 24857 and allows placing holds that target a specific volume of a record. It is patterned after the feature that allows limiting hold selection by itemtype ( AllowHoldItemTypeSelection ).

Test Plan:
1) Apply bug 24857 and this bug's patches
2) Run updatedatabase.pl
3) Restart all the things!
4) Enable the sysprefs EnableVolumes and EnableVolumeHolds
5) Create a record, items and volumes, with each item being assigned to
a volume
6) Place a hold for a patron
7) Note the new selector to choose a volume in addition to record and item level holds
8) Place a volume level hold
9) Check in an item from the record that is not part of that volume
10) Note the hold is not trapped for that item
11) Check in an item from the record that *is* part of that volume
12) Note the hold is trapped for that item
13) Place a volume level hold for another item
14) Run the holds queue builder
15) Note the holds queue targets only items from that volume
16) Check out all the items of that volume to other patrosn
17) Re-run the holds queue builder
18) Note the holds queue no longer has a line for that hold,
    as all items that could fill that hold are now unavailable

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 93 Kyle M Hall (khall) 2020-08-26 12:54:23 UTC
Created attachment 109172 [details] [review]
Bug 24860: Add new syspref EnableVolumeHolds

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 94 Kyle M Hall (khall) 2020-08-26 12:54:26 UTC
Created attachment 109173 [details] [review]
Bug 24860: Implement reserves.volume_id

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 95 Kyle M Hall (khall) 2020-08-26 12:54:30 UTC
Created attachment 109174 [details] [review]
Bug 24860: Add ability to select a volume when placing a hold

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 96 Kyle M Hall (khall) 2020-08-26 12:54:34 UTC
Created attachment 109175 [details] [review]
Bug 24860: Add ability to select a volume when placing a hold - OPAC

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 97 Kyle M Hall (khall) 2020-08-26 12:54:38 UTC
Created attachment 109176 [details] [review]
Bug 24860: Skip non-matching volume holds in CheckReserves

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 98 Kyle M Hall (khall) 2020-08-26 12:54:42 UTC
Created attachment 109177 [details] [review]
Bug 24860: Skip non-matching volume holds in HoldsQueue

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 99 Kyle M Hall (khall) 2020-08-26 12:54:45 UTC
Created attachment 109178 [details] [review]
Bug 24860: Add hold's volume to holds table on circulation.pl and moremember.pl

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 100 Kyle M Hall (khall) 2020-08-26 12:54:49 UTC
Created attachment 109179 [details] [review]
Bug 24860: Update existing Schema files [DO NOT PUSH]
Comment 101 Kyle M Hall (khall) 2020-11-13 17:31:24 UTC
Created attachment 113616 [details] [review]
Bug 24860: Add reserves.volume_id

This feature builds upon bug 24857 and allows placing holds that target a specific volume of a record. It is patterned after the feature that allows limiting hold selection by itemtype ( AllowHoldItemTypeSelection ).

Test Plan:
1) Apply bug 24857 and this bug's patches
2) Run updatedatabase.pl
3) Restart all the things!
4) Enable the sysprefs EnableVolumes and EnableVolumeHolds
5) Create a record, items and volumes, with each item being assigned to
a volume
6) Place a hold for a patron
7) Note the new selector to choose a volume in addition to record and item level holds
8) Place a volume level hold
9) Check in an item from the record that is not part of that volume
10) Note the hold is not trapped for that item
11) Check in an item from the record that *is* part of that volume
12) Note the hold is trapped for that item
13) Place a volume level hold for another item
14) Run the holds queue builder
15) Note the holds queue targets only items from that volume
16) Check out all the items of that volume to other patrosn
17) Re-run the holds queue builder
18) Note the holds queue no longer has a line for that hold,
    as all items that could fill that hold are now unavailable

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 102 Kyle M Hall (khall) 2020-11-13 17:31:34 UTC
Created attachment 113617 [details] [review]
Bug 24860: Add new syspref EnableVolumeHolds

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 103 Kyle M Hall (khall) 2020-11-13 17:31:38 UTC
Created attachment 113618 [details] [review]
Bug 24860: Implement reserves.volume_id

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 104 Kyle M Hall (khall) 2020-11-13 17:31:42 UTC
Created attachment 113619 [details] [review]
Bug 24860: Add ability to select a volume when placing a hold

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 105 Kyle M Hall (khall) 2020-11-13 17:31:46 UTC
Created attachment 113620 [details] [review]
Bug 24860: Add ability to select a volume when placing a hold - OPAC

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 106 Kyle M Hall (khall) 2020-11-13 17:31:50 UTC
Created attachment 113621 [details] [review]
Bug 24860: Skip non-matching volume holds in CheckReserves

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 107 Kyle M Hall (khall) 2020-11-13 17:31:54 UTC
Created attachment 113622 [details] [review]
Bug 24860: Skip non-matching volume holds in HoldsQueue

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 108 Kyle M Hall (khall) 2020-11-13 17:31:58 UTC
Created attachment 113623 [details] [review]
Bug 24860: Add hold's volume to holds table on circulation.pl and moremember.pl

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 109 Kyle M Hall (khall) 2020-11-13 17:32:02 UTC
Created attachment 113624 [details] [review]
Bug 24860: Update existing Schema files [DO NOT PUSH]
Comment 110 Katrin Fischer 2021-10-21 20:00:49 UTC
Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 24860: Add reserves.volume_id
error: sha1 information is lacking or useless (installer/data/mysql/atomicupdate/volumes.perl).
error: could not build fake ancestor
Patch failed at 0001 Bug 24860: Add reserves.volume_id
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Comment 111 Kyle M Hall (khall) 2022-06-10 10:35:01 UTC
Created attachment 135922 [details] [review]
Bug 24860: Add reserves.item_group_it

This feature builds upon bug 24857 and allows placing holds that target a specific item group of a record. It is patterned after the feature that allows limiting hold selection by itemtype ( AllowHoldItemTypeSelection ).

Test Plan:
1) Apply bug 24857 and this bug's patches
2) Run updatedatabase.pl
3) Restart all the things!
4) Enable the sysprefs EnableVolumes and EnableVolumeHolds
5) Create a record, items and item groups, with each item being assigned to
an item group
6) Place a hold for a patron
7) Note the new selector to choose an item group in addition to record and item level holds
8) Place an item group level hold
9) Check in an item from the record that is not part of that item group
10) Note the hold is not trapped for that item
11) Check in an item from the record that *is* part of that item group
12) Note the hold is trapped for that item
13) Place an item group level hold for another item
14) Run the holds queue builder
15) Note the holds queue targets only items from that item group
16) Check out all the items of that item group to other patrosn
17) Re-run the holds queue builder
18) Note the holds queue no longer has a line for that hold,
    as all items that could fill that hold are now unavailable

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 112 Kyle M Hall (khall) 2022-06-10 10:35:12 UTC
Created attachment 135923 [details] [review]
Bug 24860: Add new syspref EnableItemGroupHolds

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 113 Kyle M Hall (khall) 2022-06-10 10:35:16 UTC
Created attachment 135924 [details] [review]
Bug 24860: Implement reserves.item_group_id

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 114 Kyle M Hall (khall) 2022-06-10 10:35:20 UTC
Created attachment 135925 [details] [review]
Bug 24860: Update existing Schema files [DO NOT PUSH]
Comment 115 Kyle M Hall (khall) 2022-06-10 10:35:25 UTC
Created attachment 135926 [details] [review]
Bug 24860: Add ability to select an item group when placing a hold

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 116 Kyle M Hall (khall) 2022-06-10 10:35:29 UTC
Created attachment 135927 [details] [review]
Bug 24860: Add ability to select an item group when placing a hold - OPAC

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 117 Kyle M Hall (khall) 2022-06-10 10:35:33 UTC
Created attachment 135928 [details] [review]
Bug 24860: Skip non-matching item group holds in CheckReserves

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 118 Kyle M Hall (khall) 2022-06-10 10:35:38 UTC
Created attachment 135929 [details] [review]
Bug 24860: Skip non-matching item group holds in HoldsQueue

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 119 Kyle M Hall (khall) 2022-06-10 10:35:43 UTC
Created attachment 135930 [details] [review]
Bug 24860: Add hold's item group to holds table on circulation.pl and moremember.pl

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 120 Martin Renvoize (ashimema) 2022-07-11 07:27:46 UTC
Sorry Kyle.. I'm not seeing tests added or adopted for the C4 module changes.. could you add these please?

Failing QA for now... but this is close :)
Comment 121 Martin Renvoize (ashimema) 2022-07-11 09:23:06 UTC
I've been playing with this a little whilst continuing QA.  Should there be a way from the OPAC to see what items are in a group when placing a group hold.  I suppose, the main thoughts behind this is 'the patron doesn't need to know' and that the group name should be descriptive enough for them to make an informed choice at hold time?.. or maybe I've missed a bug where exposing the groups more on the OPAC is done?
Comment 122 Kyle M Hall (khall) 2022-07-28 18:21:05 UTC
Created attachment 138221 [details] [review]
Bug 24860: Add reserves.item_group_it

This feature builds upon bug 24857 and allows placing holds that target a specific item group of a record. It is patterned after the feature that allows limiting hold selection by itemtype ( AllowHoldItemTypeSelection ).

Test Plan:
1) Apply bug 24857 and this bug's patches
2) Run updatedatabase.pl
3) Restart all the things!
4) Enable the sysprefs EnableVolumes and EnableVolumeHolds
5) Create a record, items and item groups, with each item being assigned to
an item group
6) Place a hold for a patron
7) Note the new selector to choose an item group in addition to record and item level holds
8) Place an item group level hold
9) Check in an item from the record that is not part of that item group
10) Note the hold is not trapped for that item
11) Check in an item from the record that *is* part of that item group
12) Note the hold is trapped for that item
13) Place an item group level hold for another item
14) Run the holds queue builder
15) Note the holds queue targets only items from that item group
16) Check out all the items of that item group to other patrosn
17) Re-run the holds queue builder
18) Note the holds queue no longer has a line for that hold,
    as all items that could fill that hold are now unavailable

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 123 Kyle M Hall (khall) 2022-07-28 18:21:19 UTC
Created attachment 138222 [details] [review]
Bug 24860: Add new syspref EnableItemGroupHolds

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 124 Kyle M Hall (khall) 2022-07-28 18:21:24 UTC
Created attachment 138224 [details] [review]
Bug 24860: Implement reserves.item_group_id

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 125 Kyle M Hall (khall) 2022-07-28 18:21:29 UTC
Created attachment 138225 [details] [review]
Bug 24860: Add ability to select an item group when placing a hold

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 126 Kyle M Hall (khall) 2022-07-28 18:21:33 UTC
Created attachment 138226 [details] [review]
Bug 24860: Add ability to select an item group when placing a hold - OPAC

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 127 Kyle M Hall (khall) 2022-07-28 18:21:37 UTC
Created attachment 138227 [details] [review]
Bug 24860: Skip non-matching item group holds in CheckReserves

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 128 Kyle M Hall (khall) 2022-07-28 18:21:42 UTC
Created attachment 138228 [details] [review]
Bug 24860: Skip non-matching item group holds in HoldsQueue

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 129 Kyle M Hall (khall) 2022-07-28 18:21:46 UTC
Created attachment 138229 [details] [review]
Bug 24860: Add hold's item group to holds table on circulation.pl and moremember.pl

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 130 Kyle M Hall (khall) 2022-07-28 18:21:51 UTC
Created attachment 138230 [details] [review]
Bug 24860: Update existing Schema files [DO NOT PUSH]
Comment 131 Kyle M Hall (khall) 2022-07-28 18:27:56 UTC
(In reply to Martin Renvoize from comment #121)
> I've been playing with this a little whilst continuing QA.  Should there be
> a way from the OPAC to see what items are in a group when placing a group
> hold.  I suppose, the main thoughts behind this is 'the patron doesn't need
> to know' and that the group name should be descriptive enough for them to
> make an informed choice at hold time?.. or maybe I've missed a bug where
> exposing the groups more on the OPAC is done?

You've got it. This is being used in production by one of our partners, and everything is centered around the item group description. Since items in a group are supposed to be identical, knowing which items are in a group does not provide any benefit outside the group name itself.
Comment 132 Kyle M Hall (khall) 2022-07-28 18:28:45 UTC
(In reply to Martin Renvoize from comment #120)
> Sorry Kyle.. I'm not seeing tests added or adopted for the C4 module
> changes.. could you add these please?
> 
> Failing QA for now... but this is close :)

I've not seeing what module is missing tests. I've added tests for AddReserve already! Is there one I missed?
Comment 133 Katrin Fischer 2022-10-02 22:22:21 UTC
1) Unit tests

> I've not seeing what module is missing tests. I've added tests for
> AddReserve already! Is there one I missed? 

Doing some code review and... there are some more *hides*

Maybe discuss with Martin which ones should be included in tests:

* C4/HoldsQueue.pm 
  * GetHoldsQueueItems 
  * GetPendingHoldRequestsForBib
  * MapItemsToHoldRequests 
  
C4/Reserves.pm
  * AddReserve (covered)
  * CheckReserves
  * _Findgroupreserve

Koha/Hold.pm
  * item_group
  * forced_hold_level

Koha/REST/V1/Holds.pm
  * add

2) Fixes some smaller stuff in 2 follow-ups, please have a look!

3) Holds to pull is off

First my test case: 
* Added 9 items to a record, 3 each for vol. 1-3 in enumchron 
* Grouped them into 3 item groups
* In the OPAC, I placed a hold onto the volume 2 group

In /circ/pendingreserves.pl it shows wrong information:
* 39999000005776 or any available.
* Available enumchron: vol. 1, vol. 2, vol. 3
* There is no information that only volume 2 is wanted.

4) Holds queue 

Explodes:
C4::HoldsQueue::GetHoldsQueueItems(): DBI Exception: DBD::mysql::st execute failed: Unknown column 'item_group_items.item_group_id' in 'on clause' at /kohadevbox/koha/circ/view_holdsqueue.pl line 51
 at /usr/share/perl5/DBIx/Class/Exception.pm line 77

I've run a dbic and a restart_all, but the problem remains. The column exists in my database:

describe item_group_items;
+---------------------+---------+------+-----+---------+----------------+
| Field               | Type    | Null | Key | Default | Extra          |
+---------------------+---------+------+-----+---------+----------------+
| item_group_items_id | int(11) | NO   | PRI | NULL    | auto_increment |
| item_group_id       | int(11) | NO   | MUL | 0       |                |
| item_id             | int(11) | NO   | UNI | 0       |                |
+---------------------+---------+------+-----+---------+----------------+
Comment 134 Katrin Fischer 2022-10-02 22:23:08 UTC
Created attachment 141214 [details] [review]
Bug 24860: (QA follow-up) Fix number of tests in t/db_dependent/Koha/Holds.t
Comment 135 Katrin Fischer 2022-10-02 22:23:15 UTC
Created attachment 141215 [details] [review]
Bug 24860: (QA follow-up) Terminology and translation fixes

* Fixes a single to a double underscore for translation in holds.js
* Fixes item_group to item group in API description
* Fixes volume hold to item group hold in syspref db descrpitions
Comment 136 Kyle M Hall (khall) 2022-10-12 17:45:16 UTC
Created attachment 141735 [details] [review]
Bug 24860: Add reserves.item_group_it

This feature builds upon bug 24857 and allows placing holds that target a specific item group of a record. It is patterned after the feature that allows limiting hold selection by itemtype ( AllowHoldItemTypeSelection ).

Test Plan:
1) Apply bug 24857 and this bug's patches
2) Run updatedatabase.pl
3) Restart all the things!
4) Enable the sysprefs EnableVolumes and EnableVolumeHolds
5) Create a record, items and item groups, with each item being assigned to
an item group
6) Place a hold for a patron
7) Note the new selector to choose an item group in addition to record and item level holds
8) Place an item group level hold
9) Check in an item from the record that is not part of that item group
10) Note the hold is not trapped for that item
11) Check in an item from the record that *is* part of that item group
12) Note the hold is trapped for that item
13) Place an item group level hold for another item
14) Run the holds queue builder
15) Note the holds queue targets only items from that item group
16) Check out all the items of that item group to other patrosn
17) Re-run the holds queue builder
18) Note the holds queue no longer has a line for that hold,
    as all items that could fill that hold are now unavailable

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 137 Kyle M Hall (khall) 2022-10-12 17:45:32 UTC
Created attachment 141736 [details] [review]
Bug 24860: Add new syspref EnableItemGroupHolds

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 138 Kyle M Hall (khall) 2022-10-12 17:45:37 UTC
Created attachment 141737 [details] [review]
Bug 24860: Implement reserves.item_group_id

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 139 Kyle M Hall (khall) 2022-10-12 17:45:43 UTC
Created attachment 141738 [details] [review]
Bug 24860: Add ability to select an item group when placing a hold

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 140 Kyle M Hall (khall) 2022-10-12 17:45:49 UTC
Created attachment 141739 [details] [review]
Bug 24860: Add ability to select an item group when placing a hold - OPAC

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 141 Kyle M Hall (khall) 2022-10-12 17:45:54 UTC
Created attachment 141740 [details] [review]
Bug 24860: Skip non-matching item group holds in CheckReserves

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 142 Kyle M Hall (khall) 2022-10-12 17:45:59 UTC
Created attachment 141741 [details] [review]
Bug 24860: Skip non-matching item group holds in HoldsQueue

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 143 Kyle M Hall (khall) 2022-10-12 17:46:04 UTC
Created attachment 141742 [details] [review]
Bug 24860: Add hold's item group to holds table on circulation.pl and moremember.pl

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 144 Kyle M Hall (khall) 2022-10-12 17:46:09 UTC
Created attachment 141743 [details] [review]
Bug 24860: Update existing Schema files [DO NOT PUSH]
Comment 145 Kyle M Hall (khall) 2022-10-12 17:46:14 UTC
Created attachment 141744 [details] [review]
Bug 24860: (QA follow-up) Fix number of tests in t/db_dependent/Koha/Holds.t
Comment 146 Kyle M Hall (khall) 2022-10-12 17:46:19 UTC
Created attachment 141745 [details] [review]
Bug 24860: (QA follow-up) Terminology and translation fixes

* Fixes a single to a double underscore for translation in holds.js
* Fixes item_group to item group in API description
* Fixes volume hold to item group hold in syspref db descrpitions
Comment 147 Kyle M Hall (khall) 2022-10-12 17:46:24 UTC
Created attachment 141746 [details] [review]
Bug 24860: (QA follow-up) Add unit tests to cover changes to HoldsQueue.pm
Comment 148 Kyle M Hall (khall) 2022-10-12 17:46:30 UTC
Created attachment 141747 [details] [review]
Bug 24860: (QA follow-up) Add unit tests to cover changes to Reserves.pm
Comment 149 Kyle M Hall (khall) 2022-10-12 17:46:35 UTC
Created attachment 141748 [details] [review]
Bug 24860: (QA follow-up) Add unit tests to cover Koha::Hold::item_group
Comment 150 Kyle M Hall (khall) 2022-10-12 17:46:41 UTC
Created attachment 141749 [details] [review]
Bug 24860: (QA follow-up) Add unit tests to cover Koha::Holds::forced_hold_level
Comment 151 Kyle M Hall (khall) 2022-10-12 17:46:46 UTC
Created attachment 141750 [details] [review]
Bug 24860: (QA follow-up) Add unit tests to cover Koha::REST::V1::Holds::add
Comment 152 Kyle M Hall (khall) 2022-10-12 17:52:52 UTC
(In reply to Katrin Fischer from comment #133)
> 1) Unit tests

I've added unit tests for everything you listed!

> 2) Fixes some smaller stuff in 2 follow-ups, please have a look!

Thank you!

> 3) Holds to pull is off
> 
> First my test case: 
> * Added 9 items to a record, 3 each for vol. 1-3 in enumchron 
> * Grouped them into 3 item groups
> * In the OPAC, I placed a hold onto the volume 2 group
> 
> In /circ/pendingreserves.pl it shows wrong information:
> * 39999000005776 or any available.
> * Available enumchron: vol. 1, vol. 2, vol. 3
> * There is no information that only volume 2 is wanted.

I don't think Holds to pull is the tool a library should be using if they are using item group holds. This same is true for the holds itemtype filter, which has been in Koha since 16.05. I'm finding the holds to pull interface doesn't display data well. For instance, if I place one item level hold, and one biblio level hold for the same record, holds to pull doesn't really indicate that. If you can can tell me what you'd like to see, I'll see what I can do!

> 4) Holds queue 

One line of the query got removed in a rebase. Fixed!
Comment 153 Katrin Fischer 2022-10-16 12:16:04 UTC
Having another look here...
Comment 154 Katrin Fischer 2022-10-16 13:55:36 UTC
1) All the new and old tests pass.

But: I did a reset_all to have a clean starting page before applying these patches. And my branches are all mangled after running the tests:

I end up with 36 branches on the sample database, a lot of those generated ones like: brW5iS. 

There are also a ton of generated patrons...

I am not completely sure it's the new tests here, but could you please check your clean-up?

3) Holds queue is looking good now:

a1 or any item from item_group A

Just please remove the _ :)

2) Pending holds / Holds to pull

> I don't think Holds to pull is the tool a library should be using if they
> are using item group holds. This same is true for the holds itemtype filter,
> which has been in Koha since 16.05. I'm finding the holds to pull interface
> doesn't display data well. For instance, if I place one item level hold, and
> one biblio level hold for the same record, holds to pull doesn't really
> indicate that. If you can can tell me what you'd like to see, I'll see what
> I can do!

I don't think we can argue that, unless we hid the report once the item group holds are activated... and that might create quite some complaints. I know single branch libraries like to use the report, also the less busy ones. Maybe it would be worth adding a note to the system preference? "Might not go well with..." or so? In general the page needs work, I agree with you on that!

I did some more testing:
a) If there is a record level hold only: Only 39999000011418
b) If there is an item level hold only: 39999000005097 or any available.
c) If there is a group level hold only: 39999000005097 or any available.

For a start, could we catch the third case and have a correct message display? Similar to the one on holds queue?
I'd be ok with that as a solution for this patch set.

For the future 2 ideas (just to get your opinion, will file later):

* If there are different types of holds we could display this as a note: "Different types of holds, please check holds page"?
* We could repeat the information for every hold, maybe deduplicated. At the moment it looks like we only get the info for the first hold placed. Maye something like: 
  * Only 39999000011418 (1 hold)
  * 39999000005097 or any available (2 holds)


To summarize:
* Verify/make sure tests clean up their created data
* Remove _ from message on holds queue page
* Adapt message when only a item group hold exists on holds to pull

OK?
Comment 155 Kyle M Hall (khall) 2022-10-21 16:03:12 UTC
Created attachment 142413 [details] [review]
Bug 24860: Add reserves.item_group_it

This feature builds upon bug 24857 and allows placing holds that target a specific item group of a record. It is patterned after the feature that allows limiting hold selection by itemtype ( AllowHoldItemTypeSelection ).

Test Plan:
1) Apply bug 24857 and this bug's patches
2) Run updatedatabase.pl
3) Restart all the things!
4) Enable the sysprefs EnableVolumes and EnableVolumeHolds
5) Create a record, items and item groups, with each item being assigned to
an item group
6) Place a hold for a patron
7) Note the new selector to choose an item group in addition to record and item level holds
8) Place an item group level hold
9) Check in an item from the record that is not part of that item group
10) Note the hold is not trapped for that item
11) Check in an item from the record that *is* part of that item group
12) Note the hold is trapped for that item
13) Place an item group level hold for another item
14) Run the holds queue builder
15) Note the holds queue targets only items from that item group
16) Check out all the items of that item group to other patrosn
17) Re-run the holds queue builder
18) Note the holds queue no longer has a line for that hold,
    as all items that could fill that hold are now unavailable

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 156 Kyle M Hall (khall) 2022-10-21 16:03:53 UTC
Created attachment 142414 [details] [review]
Bug 24860: Add new syspref EnableItemGroupHolds

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 157 Kyle M Hall (khall) 2022-10-21 16:04:01 UTC
Created attachment 142415 [details] [review]
Bug 24860: Implement reserves.item_group_id

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 158 Kyle M Hall (khall) 2022-10-21 16:04:09 UTC
Created attachment 142416 [details] [review]
Bug 24860: Add ability to select an item group when placing a hold

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 159 Kyle M Hall (khall) 2022-10-21 16:04:15 UTC
Created attachment 142417 [details] [review]
Bug 24860: Add ability to select an item group when placing a hold - OPAC

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 160 Kyle M Hall (khall) 2022-10-21 16:04:21 UTC
Created attachment 142418 [details] [review]
Bug 24860: Skip non-matching item group holds in CheckReserves

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 161 Kyle M Hall (khall) 2022-10-21 16:04:27 UTC
Created attachment 142419 [details] [review]
Bug 24860: Skip non-matching item group holds in HoldsQueue

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 162 Kyle M Hall (khall) 2022-10-21 16:04:32 UTC
Created attachment 142420 [details] [review]
Bug 24860: Add hold's item group to holds table on circulation.pl and moremember.pl

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 163 Kyle M Hall (khall) 2022-10-21 16:04:38 UTC
Created attachment 142421 [details] [review]
Bug 24860: Update existing Schema files [DO NOT PUSH]
Comment 164 Kyle M Hall (khall) 2022-10-21 16:04:43 UTC
Created attachment 142422 [details] [review]
Bug 24860: (QA follow-up) Fix number of tests in t/db_dependent/Koha/Holds.t
Comment 165 Kyle M Hall (khall) 2022-10-21 16:04:49 UTC
Created attachment 142423 [details] [review]
Bug 24860: (QA follow-up) Terminology and translation fixes

* Fixes a single to a double underscore for translation in holds.js
* Fixes item_group to item group in API description
* Fixes volume hold to item group hold in syspref db descrpitions
Comment 166 Kyle M Hall (khall) 2022-10-21 16:04:54 UTC
Created attachment 142424 [details] [review]
Bug 24860: (QA follow-up) Add unit tests to cover changes to HoldsQueue.pm
Comment 167 Kyle M Hall (khall) 2022-10-21 16:05:02 UTC
Created attachment 142425 [details] [review]
Bug 24860: (QA follow-up) Add unit tests to cover changes to Reserves.pm
Comment 168 Kyle M Hall (khall) 2022-10-21 16:05:09 UTC
Created attachment 142426 [details] [review]
Bug 24860: (QA follow-up) Add unit tests to cover Koha::Hold::item_group
Comment 169 Kyle M Hall (khall) 2022-10-21 16:05:15 UTC
Created attachment 142427 [details] [review]
Bug 24860: (QA follow-up) Add unit tests to cover Koha::Holds::forced_hold_level
Comment 170 Kyle M Hall (khall) 2022-10-21 16:05:20 UTC
Created attachment 142428 [details] [review]
Bug 24860: (QA follow-up) Add unit tests to cover Koha::REST::V1::Holds::add
Comment 171 Kyle M Hall (khall) 2022-10-21 16:05:26 UTC
Created attachment 142429 [details] [review]
Bug 24860: (QA follow-up) Fix typo in holds queue viewer
Comment 172 Kyle M Hall (khall) 2022-10-21 16:05:33 UTC
Created attachment 142430 [details] [review]
Bug 24860: (QA follow-up) Show group holds on Holds to pull
Comment 173 Kyle M Hall (khall) 2022-10-21 16:07:24 UTC
> To summarize:
> * Verify/make sure tests clean up their created data

Fixed on Bug 31920

> * Remove _ from message on holds queue page

Fixed with followup!

> * Adapt message when only a item group hold exists on holds to pull

Also fixed with a followup!
Comment 174 Katrin Fischer 2022-10-27 19:43:52 UTC
Back here.
Comment 175 Katrin Fischer 2022-10-27 20:44:11 UTC
Sorry Kyle, I tried to understand what's going wrong here, but failed:

When opening 'Holds to pull':

Can't call method "id" on an undefined value at /kohadevbox/koha/circ/pendingreserves.pl line 288

  287:     if ( $res_info->item_group ) {
  288:        $hold_info->{barcodes} = [ uniq map { defined $_->barcode && $_->item_group->id == $res_info->item_group_id  ? $_->barcode : () } @$items ];
  289:     }

If you can fix quickly, I'll retest.
Comment 176 Katrin Fischer 2022-10-30 12:06:00 UTC
(In reply to Katrin Fischer from comment #175)
> Sorry Kyle, I tried to understand what's going wrong here, but failed:
> 
> When opening 'Holds to pull':
> 
> Can't call method "id" on an undefined value at
> /kohadevbox/koha/circ/pendingreserves.pl line 288
> 
>   287:     if ( $res_info->item_group ) {
>   288:        $hold_info->{barcodes} = [ uniq map { defined $_->barcode &&
> $_->item_group->id == $res_info->item_group_id  ? $_->barcode : () } @$items
> ];
>   289:     }
> 
> If you can fix quickly, I'll retest.

*ping*?
Comment 177 Kyle M Hall (khall) 2022-10-31 11:20:53 UTC
Created attachment 142827 [details] [review]
Bug 24860: (QA follow-up): Don't assume item group is set for all items
Comment 178 Katrin Fischer 2022-11-01 15:09:55 UTC
Back here again.
Comment 179 Katrin Fischer 2022-11-01 16:11:21 UTC
I am sorry Kyle, the latest follow-up fixed the error, but the new text in pendingreserves never displays. I have tried to figure out what's going on there, but got stuck on this line:

+    if ( $res_info->item_group ) {
+       $hold_info->{barcodes} = [ uniq map { defined $_->barcode && $_->item_group && ( $_->item_group->id == $res_info->item_group_id )  ? $_->barcode : () } @$items ];
+    }
+

I believe that [% IF ( hold_info.barcodes.size ) %] is not set for a hold group hold.
Comment 180 Kyle M Hall (khall) 2022-11-02 13:13:28 UTC
Created attachment 142955 [details] [review]
Bug 24860: Add reserves.item_group_it

This feature builds upon bug 24857 and allows placing holds that target a specific item group of a record. It is patterned after the feature that allows limiting hold selection by itemtype ( AllowHoldItemTypeSelection ).

Test Plan:
1) Apply bug 24857 and this bug's patches
2) Run updatedatabase.pl
3) Restart all the things!
4) Enable the sysprefs EnableVolumes and EnableVolumeHolds
5) Create a record, items and item groups, with each item being assigned to
an item group
6) Place a hold for a patron
7) Note the new selector to choose an item group in addition to record and item level holds
8) Place an item group level hold
9) Check in an item from the record that is not part of that item group
10) Note the hold is not trapped for that item
11) Check in an item from the record that *is* part of that item group
12) Note the hold is trapped for that item
13) Place an item group level hold for another item
14) Run the holds queue builder
15) Note the holds queue targets only items from that item group
16) Check out all the items of that item group to other patrosn
17) Re-run the holds queue builder
18) Note the holds queue no longer has a line for that hold,
    as all items that could fill that hold are now unavailable

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 181 Kyle M Hall (khall) 2022-11-02 13:13:54 UTC
Created attachment 142956 [details] [review]
Bug 24860: Add new syspref EnableItemGroupHolds

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 182 Kyle M Hall (khall) 2022-11-02 13:14:00 UTC
Created attachment 142957 [details] [review]
Bug 24860: Implement reserves.item_group_id

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 183 Kyle M Hall (khall) 2022-11-02 13:14:06 UTC
Created attachment 142958 [details] [review]
Bug 24860: Add ability to select an item group when placing a hold

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 184 Kyle M Hall (khall) 2022-11-02 13:14:12 UTC
Created attachment 142959 [details] [review]
Bug 24860: Add ability to select an item group when placing a hold - OPAC

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 185 Kyle M Hall (khall) 2022-11-02 13:14:18 UTC
Created attachment 142960 [details] [review]
Bug 24860: Skip non-matching item group holds in CheckReserves

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 186 Kyle M Hall (khall) 2022-11-02 13:14:24 UTC
Created attachment 142961 [details] [review]
Bug 24860: Skip non-matching item group holds in HoldsQueue

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 187 Kyle M Hall (khall) 2022-11-02 13:14:33 UTC
Created attachment 142962 [details] [review]
Bug 24860: Add hold's item group to holds table on circulation.pl and moremember.pl

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Comment 188 Kyle M Hall (khall) 2022-11-02 13:14:40 UTC
Created attachment 142963 [details] [review]
Bug 24860: Update existing Schema files [DO NOT PUSH]
Comment 189 Kyle M Hall (khall) 2022-11-02 13:14:46 UTC
Created attachment 142964 [details] [review]
Bug 24860: (QA follow-up) Fix number of tests in t/db_dependent/Koha/Holds.t
Comment 190 Kyle M Hall (khall) 2022-11-02 13:14:51 UTC
Created attachment 142965 [details] [review]
Bug 24860: (QA follow-up) Terminology and translation fixes

* Fixes a single to a double underscore for translation in holds.js
* Fixes item_group to item group in API description
* Fixes volume hold to item group hold in syspref db descrpitions
Comment 191 Kyle M Hall (khall) 2022-11-02 13:14:57 UTC
Created attachment 142966 [details] [review]
Bug 24860: (QA follow-up) Add unit tests to cover changes to HoldsQueue.pm
Comment 192 Kyle M Hall (khall) 2022-11-02 13:15:04 UTC
Created attachment 142967 [details] [review]
Bug 24860: (QA follow-up) Add unit tests to cover changes to Reserves.pm
Comment 193 Kyle M Hall (khall) 2022-11-02 13:15:11 UTC
Created attachment 142968 [details] [review]
Bug 24860: (QA follow-up) Add unit tests to cover Koha::Hold::item_group
Comment 194 Kyle M Hall (khall) 2022-11-02 13:15:17 UTC
Created attachment 142969 [details] [review]
Bug 24860: (QA follow-up) Add unit tests to cover Koha::Holds::forced_hold_level
Comment 195 Kyle M Hall (khall) 2022-11-02 13:15:24 UTC
Created attachment 142970 [details] [review]
Bug 24860: (QA follow-up) Add unit tests to cover Koha::REST::V1::Holds::add
Comment 196 Kyle M Hall (khall) 2022-11-02 13:15:31 UTC
Created attachment 142971 [details] [review]
Bug 24860: (QA follow-up) Fix typo in holds queue viewer
Comment 197 Kyle M Hall (khall) 2022-11-02 13:15:39 UTC
Created attachment 142972 [details] [review]
Bug 24860: (QA follow-up) Show group holds on Holds to pull
Comment 198 Kyle M Hall (khall) 2022-11-02 13:15:45 UTC
Created attachment 142973 [details] [review]
Bug 24860: (QA follow-up): Don't assume item group is set for all items
Comment 199 Kyle M Hall (khall) 2022-11-02 13:15:51 UTC
Created attachment 142974 [details] [review]
Bug 24860: (QA follow-up) Ask for any available item of matching group
Comment 200 Kyle M Hall (khall) 2022-11-02 13:15:58 UTC
Created attachment 142975 [details] [review]
Bug 24860: (QA follow-up) Don't show holds where a matching item group item is not available
Comment 201 Kyle M Hall (khall) 2022-11-02 13:22:04 UTC
(In reply to Katrin Fischer from comment #179)
> I am sorry Kyle, the latest follow-up fixed the error, but the new text in
> pendingreserves never displays. I have tried to figure out what's going on
> there, but got stuck on this line:
> 
> +    if ( $res_info->item_group ) {
> +       $hold_info->{barcodes} = [ uniq map { defined $_->barcode &&
> $_->item_group && ( $_->item_group->id == $res_info->item_group_id )  ?
> $_->barcode : () } @$items ];
> +    }
> +
> 
> I believe that [% IF ( hold_info.barcodes.size ) %] is not set for a hold
> group hold.

Yes, the problem here is that there are not items with the selected hold group currently available. We have two choices where, either we hide that hold until there is an item from that item group available, or we just display an "Any item from item group $item_group" message.

"Bug 24860: (QA follow-up) Don't show holds where a matching item group item is not available" does the former, "Bug 24860: (QA follow-up) Ask for any available item of matching group" does the latter. Please choose which behavior you would prefer and deprecate the other patch!
Comment 202 Katrin Fischer 2022-11-02 13:26:50 UTC
(In reply to Kyle M Hall from comment #201)
> (In reply to Katrin Fischer from comment #179)
> > I am sorry Kyle, the latest follow-up fixed the error, but the new text in
> > pendingreserves never displays. I have tried to figure out what's going on
> > there, but got stuck on this line:
> > 
> > +    if ( $res_info->item_group ) {
> > +       $hold_info->{barcodes} = [ uniq map { defined $_->barcode &&
> > $_->item_group && ( $_->item_group->id == $res_info->item_group_id )  ?
> > $_->barcode : () } @$items ];
> > +    }
> > +
> > 
> > I believe that [% IF ( hold_info.barcodes.size ) %] is not set for a hold
> > group hold.
> 
> Yes, the problem here is that there are not items with the selected hold
> group currently available. We have two choices where, either we hide that
> hold until there is an item from that item group available, or we just
> display an "Any item from item group $item_group" message.
> 
> "Bug 24860: (QA follow-up) Don't show holds where a matching item group item
> is not available" does the former, "Bug 24860: (QA follow-up) Ask for any
> available item of matching group" does the latter. Please choose which
> behavior you would prefer and deprecate the other patch!

But it's not true... in my test case I had 2 available items within this group. I can retest, but I am pretty sure. I had created new items in order to group and place a hold on them.
Comment 203 Kyle M Hall (khall) 2022-11-02 14:25:39 UTC
Ah! I was testing a slightly different scenario. You are right, the last patch is no good. I've obsoleted it and now everything should be good!

I'm not sure what scenario you are
> But it's not true... in my test case I had 2 available items within this
> group. I can retest, but I am pretty sure. I had created new items in order
> to group and place a hold on them.
Comment 204 Katrin Fischer 2022-11-02 16:46:06 UTC
Created attachment 142992 [details] [review]
Bug 24860: Add reserves.item_group_it

This feature builds upon bug 24857 and allows placing holds that target a specific item group of a record. It is patterned after the feature that allows limiting hold selection by itemtype ( AllowHoldItemTypeSelection ).

Test Plan:
1) Apply bug 24857 and this bug's patches
2) Run updatedatabase.pl
3) Restart all the things!
4) Enable the sysprefs EnableVolumes and EnableVolumeHolds
5) Create a record, items and item groups, with each item being assigned to
an item group
6) Place a hold for a patron
7) Note the new selector to choose an item group in addition to record and item level holds
8) Place an item group level hold
9) Check in an item from the record that is not part of that item group
10) Note the hold is not trapped for that item
11) Check in an item from the record that *is* part of that item group
12) Note the hold is trapped for that item
13) Place an item group level hold for another item
14) Run the holds queue builder
15) Note the holds queue targets only items from that item group
16) Check out all the items of that item group to other patrosn
17) Re-run the holds queue builder
18) Note the holds queue no longer has a line for that hold,
    as all items that could fill that hold are now unavailable

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 205 Katrin Fischer 2022-11-02 16:46:14 UTC
Created attachment 142993 [details] [review]
Bug 24860: Add new syspref EnableItemGroupHolds

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 206 Katrin Fischer 2022-11-02 16:46:22 UTC
Created attachment 142994 [details] [review]
Bug 24860: Implement reserves.item_group_id

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 207 Katrin Fischer 2022-11-02 16:46:30 UTC
Created attachment 142995 [details] [review]
Bug 24860: Add ability to select an item group when placing a hold

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 208 Katrin Fischer 2022-11-02 16:46:38 UTC
Created attachment 142996 [details] [review]
Bug 24860: Add ability to select an item group when placing a hold - OPAC

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 209 Katrin Fischer 2022-11-02 16:46:45 UTC
Created attachment 142997 [details] [review]
Bug 24860: Skip non-matching item group holds in CheckReserves

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 210 Katrin Fischer 2022-11-02 16:46:52 UTC
Created attachment 142998 [details] [review]
Bug 24860: Skip non-matching item group holds in HoldsQueue

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 211 Katrin Fischer 2022-11-02 16:47:00 UTC
Created attachment 142999 [details] [review]
Bug 24860: Add hold's item group to holds table on circulation.pl and moremember.pl

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 212 Katrin Fischer 2022-11-02 16:47:07 UTC
Created attachment 143000 [details] [review]
Bug 24860: Update existing Schema files [DO NOT PUSH]

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 213 Katrin Fischer 2022-11-02 16:47:15 UTC
Created attachment 143001 [details] [review]
Bug 24860: (QA follow-up) Fix number of tests in t/db_dependent/Koha/Holds.t

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 214 Katrin Fischer 2022-11-02 16:47:23 UTC
Created attachment 143002 [details] [review]
Bug 24860: (QA follow-up) Terminology and translation fixes

* Fixes a single to a double underscore for translation in holds.js
* Fixes item_group to item group in API description
* Fixes volume hold to item group hold in syspref db descrpitions

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 215 Katrin Fischer 2022-11-02 16:47:32 UTC
Created attachment 143003 [details] [review]
Bug 24860: (QA follow-up) Add unit tests to cover changes to HoldsQueue.pm

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 216 Katrin Fischer 2022-11-02 16:47:39 UTC
Created attachment 143004 [details] [review]
Bug 24860: (QA follow-up) Add unit tests to cover changes to Reserves.pm

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 217 Katrin Fischer 2022-11-02 16:47:47 UTC
Created attachment 143005 [details] [review]
Bug 24860: (QA follow-up) Add unit tests to cover Koha::Hold::item_group

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 218 Katrin Fischer 2022-11-02 16:47:54 UTC
Created attachment 143006 [details] [review]
Bug 24860: (QA follow-up) Add unit tests to cover Koha::Holds::forced_hold_level

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 219 Katrin Fischer 2022-11-02 16:48:02 UTC
Created attachment 143007 [details] [review]
Bug 24860: (QA follow-up) Add unit tests to cover Koha::REST::V1::Holds::add

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 220 Katrin Fischer 2022-11-02 16:48:10 UTC
Created attachment 143008 [details] [review]
Bug 24860: (QA follow-up) Fix typo in holds queue viewer

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 221 Katrin Fischer 2022-11-02 16:48:20 UTC
Created attachment 143009 [details] [review]
Bug 24860: (QA follow-up) Show group holds on Holds to pull

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 222 Katrin Fischer 2022-11-02 16:48:28 UTC
Created attachment 143010 [details] [review]
Bug 24860: (QA follow-up): Don't assume item group is set for all items

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 223 Katrin Fischer 2022-11-02 16:48:37 UTC
Created attachment 143011 [details] [review]
Bug 24860: (QA follow-up) Ask for any available item of matching group

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 224 Tomás Cohen Arazi (tcohen) 2022-11-04 23:21:02 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 225 Jonathan Druart 2022-11-25 11:04:38 UTC
`biblio_id` int(11) NOT NULL DEFAULT 0 COMMENT 'id for the bibliographic record the group belongs to',

DEFAULT 0, is this correct?
Comment 226 Jonathan Druart 2023-02-23 11:34:16 UTC
I think we are missing from_local_hold_group in reserve/request.tt

1581                 switch (override_items[itemnumber].holdallowed) {
Comment 227 Kyle M Hall (khall) 2023-02-23 13:10:24 UTC
(In reply to Jonathan Druart from comment #225)
> `biblio_id` int(11) NOT NULL DEFAULT 0 COMMENT 'id for the bibliographic
> record the group belongs to',
> 
> DEFAULT 0, is this correct?

As 0 cannot be used, it's harmless but you are correct and we should update the table schema.
Comment 228 Kyle M Hall (khall) 2023-02-23 13:14:24 UTC
(In reply to Kyle M Hall from comment #227)
> (In reply to Jonathan Druart from comment #225)
> > `biblio_id` int(11) NOT NULL DEFAULT 0 COMMENT 'id for the bibliographic
> > record the group belongs to',
> > 
> > DEFAULT 0, is this correct?
> 
> As 0 cannot be used, it's harmless but you are correct and we should update
> the table schema.

Out of scope for this bug, but the recalls table has the same issue.
Comment 229 Kyle M Hall (khall) 2023-02-23 14:20:10 UTC
(In reply to Kyle M Hall from comment #228)
> (In reply to Kyle M Hall from comment #227)
> > (In reply to Jonathan Druart from comment #225)
> > > `biblio_id` int(11) NOT NULL DEFAULT 0 COMMENT 'id for the bibliographic
> > > record the group belongs to',
> > > 
> > > DEFAULT 0, is this correct?
> > 
> > As 0 cannot be used, it's harmless but you are correct and we should update
> > the table schema.
> 
> Out of scope for this bug, but the recalls table has the same issue.

Bug 33053 - Tables item_groups and recalls have a biblio_id column with a default of 0
Comment 230 Kyle M Hall (khall) 2023-02-23 14:20:26 UTC
(In reply to Jonathan Druart from comment #226)
> I think we are missing from_local_hold_group in reserve/request.tt
> 
> 1581                 switch (override_items[itemnumber].holdallowed) {

Bug 33052 - Add a message for from_local_hold_group override
Comment 231 Jonathan Druart 2023-07-04 10:40:58 UTC
See bug 34155, OPAC item level holds="force" is broken

in opac-reserve.pl:
495                 $biblioLoopIter{force_hold} = 1 if $opac_hold_policy eq 'F';

But we are ignoring this with the change in "24860: Add ability to select an item group when placing a hold - OPAC"