[Bug 24830] New: dbic_merge_prefetch is not handling recursive cases correctly
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24830 Bug ID: 24830 Summary: dbic_merge_prefetch is not handling recursive cases correctly Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org In the context of bug 20212, I noticed that requesting to embed basket and basket.basket_group yields no basket is prefetch. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24830 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |24356 Assignee|koha-bugs@lists.koha-commun |agustinmoyano@theke.io |ity.org | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24356 [Bug 24356] objects.search prefetch -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24830 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I also noticed the relation+count case is not being handled correctly (i.e. it won't be prefetch). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24830 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24830 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |20212 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212 [Bug 20212] Slowness in Receiving in Acquisitions -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24830 --- Comment #2 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 100393 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=100393&action=edit Bug 24830: Fix parse_prefetch recursion and +count cases When a child of a prefetched element wasn't found on element's prefetch_whitelist, no prefetch element was returned.. including element it self. Now we return element's name if no child was found. Also, embeded keys that ended with +count where taken literaly. Now we search the correct key by stripping _count of embedded element if it was declared as "is_count" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24830 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Should this be needs signoff? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24830 --- Comment #4 from Agustín Moyano <agustinmoyano@theke.io> --- (In reply to Martin Renvoize from comment #3)
Should this be needs signoff?
Hi Martin, not yet.. I still have to design how to test. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24830 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #100393|0 |1 is obsolete| | --- Comment #5 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 100664 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=100664&action=edit Bug 24830: Add tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24830 --- Comment #6 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 100665 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=100665&action=edit Bug 24830: Fix parse_prefetch recursion and +count cases When a child of a prefetched element wasn't found on element's prefetch_whitelist, no prefetch element was returned.. including element it self. Now we return element's name if no child was found. Also, embeded keys that ended with +count where taken literaly. Now we search the correct key by stripping _count of embedded element if it was declared as "is_count" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24830 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24830 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #100665|0 |1 is obsolete| | --- Comment #7 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 100666 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=100666&action=edit Bug 24830: Fix parse_prefetch recursion and +count cases When a child of a prefetched element wasn't found on element's prefetch_whitelist, no prefetch element was returned.. including element it self. Now we return element's name if no child was found. Also, embeded keys that ended with +count where taken literaly. Now we search the correct key by stripping _count of embedded element if it was declared as "is_count" To test: 1. Apply test patch but not this one 2. prove t/Koha/REST/Plugin/Query.t CHECK => tests shoul fail 3. Apply this patch 4. prove t/Koha/REST/Plugin/Query.t SUCCESS => tests pass 5. Sign off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24830 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24830 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #100664|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24830 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #100666|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24830 --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 100689 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=100689&action=edit Bug 24830: Add tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24830 --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 100690 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=100690&action=edit Bug 24830: Fix parse_prefetch recursion and +count cases When a child of a prefetched element wasn't found on element's prefetch_whitelist, no prefetch element was returned.. including element it self. Now we return element's name if no child was found. Also, embeded keys that ended with +count where taken literaly. Now we search the correct key by stripping _count of embedded element if it was declared as "is_count" To test: 1. Apply test patch but not this one 2. prove t/Koha/REST/Plugin/Query.t CHECK => tests shoul fail 3. Apply this patch 4. prove t/Koha/REST/Plugin/Query.t SUCCESS => tests pass 5. Sign off Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24830 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24830 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #100689|0 |1 is obsolete| | Attachment #100690|0 |1 is obsolete| | --- Comment #10 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 101089 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101089&action=edit Bug 24830: Add tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24830 --- Comment #11 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 101090 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101090&action=edit Bug 24830: Fix parse_prefetch recursion and +count cases When a child of a prefetched element wasn't found on element's prefetch_whitelist, no prefetch element was returned.. including element it self. Now we return element's name if no child was found. Also, embeded keys that ended with +count where taken literaly. Now we search the correct key by stripping _count of embedded element if it was declared as "is_count" To test: 1. Apply test patch but not this one 2. prove t/Koha/REST/Plugin/Query.t CHECK => tests shoul fail 3. Apply this patch 4. prove t/Koha/REST/Plugin/Query.t SUCCESS => tests pass 5. Sign off Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24830 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |20.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24830 --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24830 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joy@bywatersolutions.com --- Comment #13 from Joy Nelson <joy@bywatersolutions.com> --- not backported to 19.11.x due to dependencies -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org