In Item::pickup_locations; instead of setting the default value of $pickup_libraries to Koha::Libraries->search(), that call should only be made if that variable is not set to something else. A rather small and probably that not significant fix in terms of performance, but also an easy thing to fix.
Created attachment 163467 [details] [review] Bug 36362: Only call Koha::Libraries->search() if necessary in Item::pickup_locations To test: 1) Make sure the following tests pass: - t/db_dependent/Koha/Item.t - t/db_dependent/Koha/Biblios.t - db_dependent/Koha/Biblio.t Sponsored-by: Gothenburg University Library
Created attachment 163468 [details] [review] Bug 36362: Only call Koha::Libraries->search() if necessary in Item::pickup_locations To test: 1) Make sure the following tests pass: - t/db_dependent/Koha/Item.t - t/db_dependent/Koha/Biblios.t - db_dependent/Koha/Biblio.t Sponsored-by: Gothenburg University Library
Created attachment 166451 [details] [review] Bug 36362: Only call Koha::Libraries->search() if necessary in Item::pickup_locations To test: 1) Make sure the following tests pass: - t/db_dependent/Koha/Item.t - t/db_dependent/Koha/Biblios.t - db_dependent/Koha/Biblio.t Sponsored-by: Gothenburg University Library Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Created attachment 169249 [details] [review] Bug 36362: Only call Koha::Libraries->search() if necessary in Item::pickup_locations To test: 1) Make sure the following tests pass: - t/db_dependent/Koha/Item.t - t/db_dependent/Koha/Biblios.t - db_dependent/Koha/Biblio.t Sponsored-by: Gothenburg University Library Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 169250 [details] [review] Bug 36362: (QA follow-up) Tidy code Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Thanks for all the hard work! Pushed to main for the next 24.11.00 release as RM Assistant
Backported to 24.05.x for upcoming 24.05.04
Pushed to 23.11.x for 23.11.09
Not backporting to 23.05.x unless requested