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

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Feb 3 12:40:44 CET 2021


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

--- Comment #18 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
(In reply to Martin Renvoize from comment #17)
> This would more closely resemble how we return the data in the existing UI's.

It is possible. But that means you will need to look at the attribute and
determine if it is linked to an AV or not anyway. You could have a scalar or
the attribute be an object. And if it is an object it could be some generated
structure or an embed. We would still need to define a generic way to identify
it is the case of an av-linked attribute. I'm not sure what's best, but having
a separate lookup table felt cleaner to use. In the templates you would have
proper objects that can be asked if they are av-linked.

This certainly needs ideas. We are open to proposals, obviously!

> I'm not sure we need the full AV object expanded.. and I'm thinking if would
> be 'nicer' to access it directly rather than have to do a subsequent lookup
> in JS?

I would go for an $av->to_api object, that names things better: lib/lib_opac =>
description, picking the right one according to the caller context.

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


More information about the Koha-bugs mailing list