Bug 24107 - returns.pl fetches the same item from the database multiple times
Summary: returns.pl fetches the same item from the database multiple times
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 23463
Blocks:
  Show dependency treegraph
 
Reported: 2019-11-25 18:43 UTC by Kyle M Hall (khall)
Modified: 2023-12-11 10:11 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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?!?