Bug 34480

Summary: Reduce DB calls when importing patrons
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: ToolsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Nick Clemens (kidclamp) 2023-08-04 18:20:25 UTC
sub check_branch_code {
sub check_borrower_category {

Both do a search of the db based on the values in the import file for each borrower - it seems we could lookup the allowed values once and cache them?

We also fetch the category another time to get the expiratoin date, it feels like we could store these early on.