Bug 24225 - Add Koha::Objects->search_from_api method
Summary: Add Koha::Objects->search_from_api method
Status: CLOSED WORKSFORME
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Tomás Cohen Arazi (tcohen)
QA Contact: Testopia
URL:
Keywords:
Depends on: 23843 23893
Blocks:
  Show dependency treegraph
 
Reported: 2019-12-11 20:03 UTC by Tomás Cohen Arazi (tcohen)
Modified: 2021-12-13 21:10 UTC (History)
0 users

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 Tomás Cohen Arazi (tcohen) 2019-12-11 20:03:52 UTC
Bug 23843 introduced the Koha::Object(s)->to_api method and the attribute mappings on the Koha::Object classes. Bug 23893 will introduce the reverse mapping along with the Koha::Object->new_from_api and Koha::Object->set_from_api methods.

So all the pieces are set so we can properly build a Koha::Objects->search_from_api method that does something similar to the objects.search helper, but uses the classes' mappings instead of requiring the to_api and to_model methods to be passed.

This will ultimately help clean all the controllers and (hopefully) improve productivity re: adding endpoints, because of the removal of that intrinsic complexity both on controllers, and tests.
Comment 1 Tomás Cohen Arazi (tcohen) 2021-04-05 18:05:23 UTC
Im' closing this, as things evolved in a nicer way, at the right level (in the controller space).