[Koha-bugs] [Bug 24830] dbic_merge_prefetch is not handling recursive cases correctly

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Mar 20 13:18:40 CET 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24830

--- Comment #11 from Kyle M Hall <kyle at 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 at theke.io>

Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list