Bug 24225

Summary: Add Koha::Objects->search_from_api method
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: Architecture, internals, and plumbingAssignee: Tomás Cohen Arazi <tomascohen>
Status: CLOSED WORKSFORME QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
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:
Bug Depends on: 23843, 23893    
Bug Blocks:    

Description Tomás Cohen Arazi 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 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).