Bug 33198 - request.pl is calculating pickup locations that are not used
Summary: request.pl is calculating pickup locations that are not used
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Nick Clemens (kidclamp)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-10 18:44 UTC by Nick Clemens (kidclamp)
Modified: 2023-12-28 20:44 UTC (History)
8 users (show)

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


Attachments
Bug 33198: Don't calculate pickup locations per bib unless placing multiple holds (1.21 KB, patch)
2023-03-10 18:46 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 33198: Don't calculate pickup locations per bib unless placing multiple holds (1.27 KB, patch)
2023-03-13 15:36 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 33198: Don't calculate pickup locations per bib unless placing multiple holds (1.34 KB, patch)
2023-03-22 13:16 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2023-03-10 18:44:03 UTC
One systems with many branches, or complex rules calculating the pickup locations can be expensive.

It appears we are calling $biblio->pickup_locations that is only used during multi-holds for all of our holds
Comment 1 Nick Clemens (kidclamp) 2023-03-10 18:46:39 UTC
Created attachment 148096 [details] [review]
Bug 33198: Don't calculate pickup locations per bib unless placing multiple holds

For single bibs we use an ajax select2 dropdown, and we don't use this
value

To test:
1 - Place some holds on single bibs
2 - Confirm dropdowns for pickup location work as expected
3 - Do the same for multiple bibs selected from search results
4 - Apply patch
5 - Confirm there is no change after the patch
Comment 2 Tomás Cohen Arazi (tcohen) 2023-03-13 15:36:30 UTC
Created attachment 148126 [details] [review]
Bug 33198: Don't calculate pickup locations per bib unless placing multiple holds

For single bibs we use an ajax select2 dropdown, and we don't use this
value

To test:
1 - Place some holds on single bibs
2 - Confirm dropdowns for pickup location work as expected
3 - Do the same for multiple bibs selected from search results
4 - Apply patch
5 - Confirm there is no change after the patch

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 3 Jonathan Druart 2023-03-22 13:16:39 UTC
Created attachment 148532 [details] [review]
Bug 33198: Don't calculate pickup locations per bib unless placing multiple holds

For single bibs we use an ajax select2 dropdown, and we don't use this
value

To test:
1 - Place some holds on single bibs
2 - Confirm dropdowns for pickup location work as expected
3 - Do the same for multiple bibs selected from search results
4 - Apply patch
5 - Confirm there is no change after the patch

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Tomás Cohen Arazi (tcohen) 2023-03-27 10:06:28 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 5 Laura Escamilla 2023-04-06 10:56:49 UTC
Can this be considered for backport?
Comment 6 Matt Blenkinsop 2023-04-11 09:01:50 UTC
Nice work everyone!

Pushed to stable for 22.11.x
Comment 7 Lucas Gass (lukeg) 2023-04-24 17:04:09 UTC
Backported to 22.05.x for upcoming 22.05.12
Comment 8 Arthur Suzuki 2023-05-03 18:39:59 UTC
applied to 21.11.x for 21.11.20