[Koha-bugs] [Bug 26635] Expand coded values in REST API call

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Nov 2 23:05:44 CET 2022


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

--- Comment #77 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 143043
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143043&action=edit
Bug 26635: Refined data structure and methods

This patch makes the returned data structure be simpler:

_str => {
    attribute_1 => {
        category => 'some_category_name',
        str      => 'description',
        type     => 'av'
    },
    ...
}

The description is sensible to context, so if public => 1 is passed,
then lib_opac is passed, and lib is returned otherwise. Whenever we add
language to the combo, we will add it to the implementation.

Tests are adjusted accordingly, also to reflect the public => 1 use
case.

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

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