[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
Mon Oct 31 17:53:05 CET 2022


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

--- Comment #72 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
(In reply to Jonathan Druart from comment #70)
> Then we could use the following structure
> {
>   _str: {
>     location: { str: "General Stacks", type: "authorised_values" },
>     itemtype: { str: "Books", type: "itemtypes" }
>   },
>   location: "GEN",
>   itemtype: "BK",
> }
> 
> 
> From a dev pov it will be easier to
>   const location = r._str.location.str || r.location
>   const itemtype = r._str.itemtype.str || r.itemtype
> 
> than to *know* that location is in _authorised_values and itemtype in
> _itemtypes!


I like this. Was thinking the same way after Martin's recap highlighted I
didn't approach the coded fields approach we chatted about. Follow-ups welcome
or wait for me while I recover from this virus.

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


More information about the Koha-bugs mailing list