Bug 29517 - CanItemBeReserved fetches biblio for agerestriction check if feature not enabled
Summary: CanItemBeReserved fetches biblio for agerestriction check if feature not enabled
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Nick Clemens
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks: 7923
  Show dependency treegraph
 
Reported: 2021-11-18 12:03 UTC by Nick Clemens
Modified: 2022-04-08 14:12 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:
22.05.00,21.11.05


Attachments
Bug 29517: Check if agerestriction field is mapped before fetching biblio (2.64 KB, patch)
2021-11-18 12:06 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 29517: Check if agerestriction field is mapped before fetching biblio (2.68 KB, patch)
2022-03-10 08:03 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 29517: Check if agerestriction field is mapped before fetching biblio (2.78 KB, patch)
2022-03-25 10:22 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2021-11-18 12:03:30 UTC
Before fetching the biblio, we can check if agerestriction is mapped to a field. The structure is cached, so we can save on lookup when not using this feature
Comment 1 Nick Clemens 2021-11-18 12:06:44 UTC
Created attachment 127788 [details] [review]
Bug 29517: Check if agerestriction field is mapped before fetching biblio

This patch simply adds a check of cached values to see if agerestriction enabled before
fetching the biblio object

To test:
1 - prove -v t/db_dependent/Holds.t
Comment 2 Fridolin Somers 2022-03-10 08:03:14 UTC
Created attachment 131541 [details] [review]
Bug 29517: Check if agerestriction field is mapped before fetching biblio

This patch simply adds a check of cached values to see if agerestriction enabled before
fetching the biblio object

To test:
1 - prove -v t/db_dependent/Holds.t

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Comment 3 Fridolin Somers 2022-03-10 08:03:45 UTC
Nice performance catch
Comment 4 Marcel de Rooy 2022-03-25 10:22:53 UTC
Created attachment 132218 [details] [review]
Bug 29517: Check if agerestriction field is mapped before fetching biblio

This patch simply adds a check of cached values to see if agerestriction enabled before
fetching the biblio object

To test:
1 - prove -v t/db_dependent/Holds.t

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Fridolin Somers 2022-04-05 15:19:36 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 6 Kyle M Hall 2022-04-08 14:12:46 UTC
Pushed to 21.11.x for 21.11.05