Bug 22650 - Can place multiple item level holds on a single item
Summary: Can place multiple item level holds on a single item
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens
QA Contact: Martin Renvoize
URL:
Keywords:
Depends on:
Blocks: 22895 23116
  Show dependency treegraph
 
Reported: 2019-04-05 17:44 UTC by Nick Clemens
Modified: 2020-06-04 20:32 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.05.00, 18.11.05


Attachments
Bug 22650: Prevent multiple holds on individual items (4.17 KB, patch)
2019-04-24 15:36 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 22650: Prevent multiple holds on individual items (4.21 KB, patch)
2019-04-24 17:16 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 22650: Prevent multiple holds on individual items (3.88 KB, patch)
2019-04-25 07:08 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2019-04-05 17:44:04 UTC
To recreate:
1 - Allow multiple holds per record
2 - In staff client, go to place a hold on a record
3 - Select a  patron
4 - Increase the number of holds
5 - Then select a specific item to hold
6 - Patron now has multiple holds on a single item
Comment 1 Nick Clemens 2019-04-24 15:36:21 UTC
Created attachment 88639 [details] [review]
Bug 22650: Prevent multiple holds on individual items

This patch corrects a missing id on the holds_to_place field and adds code to disable the box when an item is checked

Additionally script login now places a single hold if an itemnumebr is passed and checks for holdability of the specific item

To test:
 1 - Allow multiple holds per record in circ rules
 2 - In staff client, go to place a hold on a record
 3 - Select a patron
 4 - Increase the number of holds
 5 - Then select a specific item to hold
 6 - Patron now has multiple holds on a single item
 7 - Apply patch
 8 - Repeat, notice that count is disabled when item checked
 9 - Confirm count is enabled when 'Hold next available item' is checked
10 - Set number to more than 1
11 - Check an item and submit
12 - Confirm only one item is reserved
13 - Hit the script directly (with valid info):
     http://localhost:8081/cgi-bin/koha/reserve/placerequest.pl?biblionumber=1&checkitem=1&holds_to_place_count=2&borrowernumber=5
14 - Confirm only one hold is placed
15 - Confirm multiple hits of the url do not generate further holds
Comment 2 Liz Rea 2019-04-24 17:16:09 UTC
Created attachment 88640 [details] [review]
Bug 22650: Prevent multiple holds on individual items

This patch corrects a missing id on the holds_to_place field and adds code to disable the box when an item is checked

Additionally script login now places a single hold if an itemnumebr is passed and checks for holdability of the specific item

To test:
 1 - Allow multiple holds per record in circ rules
 2 - In staff client, go to place a hold on a record
 3 - Select a patron
 4 - Increase the number of holds
 5 - Then select a specific item to hold
 6 - Patron now has multiple holds on a single item
 7 - Apply patch
 8 - Repeat, notice that count is disabled when item checked
 9 - Confirm count is enabled when 'Hold next available item' is checked
10 - Set number to more than 1
11 - Check an item and submit
12 - Confirm only one item is reserved
13 - Hit the script directly (with valid info):
     http://localhost:8081/cgi-bin/koha/reserve/placerequest.pl?biblionumber=1&checkitem=1&holds_to_place_count=2&borrowernumber=5
14 - Confirm only one hold is placed
15 - Confirm multiple hits of the url do not generate further holds

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Comment 3 Martin Renvoize 2019-04-25 07:08:43 UTC
Created attachment 88691 [details] [review]
Bug 22650: Prevent multiple holds on individual items

This patch corrects a missing id on the holds_to_place field and adds code to disable the box when an item is checked

Additionally script login now places a single hold if an itemnumebr is passed and checks for holdability of the specific item

To test:
 1 - Allow multiple holds per record in circ rules
 2 - In staff client, go to place a hold on a record
 3 - Select a patron
 4 - Increase the number of holds
 5 - Then select a specific item to hold
 6 - Patron now has multiple holds on a single item
 7 - Apply patch
 8 - Repeat, notice that count is disabled when item checked
 9 - Confirm count is enabled when 'Hold next available item' is checked
10 - Set number to more than 1
11 - Check an item and submit
12 - Confirm only one item is reserved
13 - Hit the script directly (with valid info):
     http://localhost:8081/cgi-bin/koha/reserve/placerequest.pl?biblionumber=1&checkitem=1&holds_to_place_count=2&borrowernumber=5
14 - Confirm only one hold is placed
15 - Confirm multiple hits of the url do not generate further holds

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize 2019-04-25 07:09:06 UTC
Nice fix, no regressions found.. Passing QA
Comment 5 Nick Clemens 2019-04-25 11:57:14 UTC
Awesome work all!

Pushed to master for 19.05
Comment 6 Martin Renvoize 2019-04-26 15:17:52 UTC
Pushed to 18.11.x for 18.11.05