Bug 24107

Summary: returns.pl fetches the same item from the database multiple times
Product: Koha Reporter: Kyle M Hall (khall) <kyle>
Component: Architecture, internals, and plumbingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: jonathan.druart, tomascohen
Version: unspecified   
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:
Bug Depends on: 23463    
Bug Blocks:    

Description Kyle M Hall (khall) 2019-11-25 18:43:33 UTC
I noticed while writing the patch for bug 24106 that we get the same item from the database multiple times. It would make sense to only fetch it once for efficiency.
Comment 1 Katrin Fischer 2023-12-09 13:01:46 UTC
Kyle, can you tell if this is still the case?
Comment 2 Jonathan Druart 2023-12-11 10:11:14 UTC
Yes, still valid, see this comment

838     my $item_from_barcode = Koha::Items->find({barcode => $barcode }); # How many times do we fetch this item?!?