Summary: | Make items prefetchable from Koha::Biblio | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Component: | Architecture, internals, and plumbing | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | kyle, martin.renvoize, nick |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
19.05.00
|
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 22407, 22696 | ||
Attachments: |
Bug 22701: Unit tests for Koha::Biblio->items
Bug 22701: Make items prefetchable from Koha::Biblio Bug 22701: Unit tests for Koha::Biblio->items Bug 22701: Make items prefetchable from Koha::Biblio |
Description
Tomás Cohen Arazi (tcohen)
2019-04-12 18:35:27 UTC
Created attachment 88374 [details] [review] Bug 22701: Unit tests for Koha::Biblio->items This patch adds tests fr the current items() implementation. The idea is to verify no behaviour change takes place after we make it us _new_from_dbic instead of calling Koha::Items->search. To test: - Run: $ kshell k$ prove t/db_dependent/Koha/Biblio.t => SUCCESS: Tests pass! - Sign off :-D Created attachment 88375 [details] [review] Bug 22701: Make items prefetchable from Koha::Biblio This patch makes Koha::Biblio->items use _new_from_dbic instead of calling Koha::Items->search. This allows calling it with prefetch enabled for the items relationship. No noticeable behaviour change takes place besides this. To test: - Run: $ kshell k$ prove t/db_dependent/Koha/Biblio.t => SUCCESS: Tests pass! - Apply this patch - Run: k$ prove t/db_dependent/Koha/Biblio.t => SUCCESS: Tests still pass! - Sign off :-D Created attachment 88490 [details] [review] Bug 22701: Unit tests for Koha::Biblio->items This patch adds tests fr the current items() implementation. The idea is to verify no behaviour change takes place after we make it us _new_from_dbic instead of calling Koha::Items->search. To test: - Run: $ kshell k$ prove t/db_dependent/Koha/Biblio.t => SUCCESS: Tests pass! - Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 88491 [details] [review] Bug 22701: Make items prefetchable from Koha::Biblio This patch makes Koha::Biblio->items use _new_from_dbic instead of calling Koha::Items->search. This allows calling it with prefetch enabled for the items relationship. No noticeable behaviour change takes place besides this. To test: - Run: $ kshell k$ prove t/db_dependent/Koha/Biblio.t => SUCCESS: Tests pass! - Apply this patch - Run: k$ prove t/db_dependent/Koha/Biblio.t => SUCCESS: Tests still pass! - Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Looks solid to me and works as expected.. Signing off Trivial patch.. turning this into a PQA. Awesome work all! Pushed to master for 19.05 Enhancement will not be backported to 18.11.x series. |