[Koha-bugs] [Bug 23893] Add ->new_from_api and ->set_from_api methods to Koha::Object

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Dec 27 16:22:02 CET 2019


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

--- Comment #20 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 96656
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96656&action=edit
Bug 23893: Implement Koha::Object->from_api_mapping

This patch implements the from_api_mapping method, that calculates (and
caches) the reserve mapping from the to_api_mapping method.

A generic to_api_mapping is added to simplify things a bit in the generic
to_api method and so the mappings are reusable in the way they are in
from_api_mapping.

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

Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>

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


More information about the Koha-bugs mailing list