Bug 29517

Summary: CanItemBeReserved fetches biblio for agerestriction check if feature not enabled
Product: Koha Reporter: Nick Clemens <nick>
Component: Hold requestsAssignee: Nick Clemens <nick>
Status: Pushed to stable --- QA Contact: Marcel de Rooy <m.de.rooy>
Severity: enhancement    
Priority: P5 - low CC: fridolin.somers, gmcharlt, kyle, m.de.rooy
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00,21.11.05
Bug Depends on:    
Bug Blocks: 7923    
Attachments: Bug 29517: Check if agerestriction field is mapped before fetching biblio
Bug 29517: Check if agerestriction field is mapped before fetching biblio
Bug 29517: Check if agerestriction field is mapped before fetching biblio

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