[Koha-bugs] [Bug 24321] Make objects.search use mappings from Koha::Object(s)

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jan 7 12:34:02 CET 2020


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

--- Comment #39 from Josef Moravec <josef.moravec at gmail.com> ---
Created attachment 96876
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96876&action=edit
Bug 24321: Make objects.search use mappings from Koha::Object(s)

This patch simplifies the objects.search helper so it relies entirely on
the result set object for the attribute mappings.

The result is no more to_api or to_model mappings are passed. The
controllers need to be cleaned up after this patch.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/REST/Plugin/Objects.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Note: the original version of this helpers accepted arbitrary mappings
and are now constrianed to real mappings on the Koha::Object level. As
such, the number of tests got reduced.

Signed-off-by: Josef Moravec <josef.moravec at gmail.com>

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


More information about the Koha-bugs mailing list