Bug 37587 - Wrong priority when placing multiple item-level holds
Summary: Wrong priority when placing multiple item-level holds
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Emily Lamancusa
QA Contact: Paul Derscheid
URL:
Keywords:
Depends on: 15565
Blocks:
  Show dependency treegraph
 
Reported: 2024-08-06 19:53 UTC by Emily Lamancusa
Modified: 2024-09-16 08:54 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00
Circulation function:


Attachments
Bug 37587: Fix priority of multiple item-level holds (2.75 KB, patch)
2024-08-06 20:25 UTC, Emily Lamancusa
Details | Diff | Splinter Review
Bug 37587: Fix priority of multiple item-level holds (2.80 KB, patch)
2024-08-10 18:25 UTC, Roman Dolny
Details | Diff | Splinter Review
Bug 37587: Fix priority of multiple item-level holds (2.86 KB, patch)
2024-09-13 15:45 UTC, Paul Derscheid
Details | Diff | Splinter Review
Bug 37587: (QA follow-up) Tidy reserve/placerequest.pl (4.90 KB, patch)
2024-09-13 15:49 UTC, Paul Derscheid
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Emily Lamancusa 2024-08-06 19:53:38 UTC
When placing multiple item-level holds at once, the first hold that is processed is added to the end of the line, but the other holds default to priority 2. They should all be getting added to the bottom of the holds list, not the top.
Comment 1 Emily Lamancusa 2024-08-06 20:25:56 UTC
Created attachment 170117 [details] [review]
Bug 37587: Fix priority of multiple item-level holds

The rank parameter is passed per biblio record, not per item. When
placing multiple item-level holds on one bib record, only $rank[0] is
defined.

To test:
1. System preference and circulation rule setup
    i. Set the system preference DisplayMultiItemHolds to Enable
    ii. Edit the default circulation rule to allow 5 holds per record
2. Find or create a bib with 4 or more items
3. Place several bib-level holds
4. Place 4 or more item-level holds at once on that same record
    i. Search for a patron to place the holds for (not one of the
       patrons you used in step 3)
    ii. Select "Hold a specific item"
    iii. Check the checkboxes for 4 or more items
    iv. Click Place hold
--> Note that one of the new item-level holds is at the end of the list
    as it should be, but the rest are out of order
5. Cancel the item-level holds from step 4
6. Apply patch and restart_all
7. Repeat step 4
--> All the new item-level holds are now at the end of the list
Comment 2 David Cook 2024-08-06 23:29:36 UTC
Neato. I'll take a look.
Comment 3 Roman Dolny 2024-08-10 18:25:59 UTC
Created attachment 170224 [details] [review]
Bug 37587: Fix priority of multiple item-level holds

The rank parameter is passed per biblio record, not per item. When
placing multiple item-level holds on one bib record, only $rank[0] is
defined.

To test:
1. System preference and circulation rule setup
    i. Set the system preference DisplayMultiItemHolds to Enable
    ii. Edit the default circulation rule to allow 5 holds per record
2. Find or create a bib with 4 or more items
3. Place several bib-level holds
4. Place 4 or more item-level holds at once on that same record
    i. Search for a patron to place the holds for (not one of the
       patrons you used in step 3)
    ii. Select "Hold a specific item"
    iii. Check the checkboxes for 4 or more items
    iv. Click Place hold
--> Note that one of the new item-level holds is at the end of the list
    as it should be, but the rest are out of order
5. Cancel the item-level holds from step 4
6. Apply patch and restart_all
7. Repeat step 4
--> All the new item-level holds are now at the end of the list

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 4 Paul Derscheid 2024-09-13 15:45:42 UTC
Created attachment 171485 [details] [review]
Bug 37587: Fix priority of multiple item-level holds

The rank parameter is passed per biblio record, not per item. When
placing multiple item-level holds on one bib record, only $rank[0] is
defined.

To test:
1. System preference and circulation rule setup
    i. Set the system preference DisplayMultiItemHolds to Enable
    ii. Edit the default circulation rule to allow 5 holds per record
2. Find or create a bib with 4 or more items
3. Place several bib-level holds
4. Place 4 or more item-level holds at once on that same record
    i. Search for a patron to place the holds for (not one of the
       patrons you used in step 3)
    ii. Select "Hold a specific item"
    iii. Check the checkboxes for 4 or more items
    iv. Click Place hold
--> Note that one of the new item-level holds is at the end of the list
    as it should be, but the rest are out of order
5. Cancel the item-level holds from step 4
6. Apply patch and restart_all
7. Repeat step 4
--> All the new item-level holds are now at the end of the list

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Comment 5 Paul Derscheid 2024-09-13 15:49:39 UTC
Created attachment 171486 [details] [review]
Bug 37587: (QA follow-up) Tidy reserve/placerequest.pl
Comment 6 Katrin Fischer 2024-09-16 08:54:13 UTC
Pushed for 24.11!

Well done everyone, thank you!