[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
Tue Aug 31 18:23:51 CEST 2021


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

--- Comment #31 from Agustín Moyano <agustinmoyano at theke.io> ---
(In reply to Martin Renvoize from comment #30)
> I have another question regards the output representation.. I've come round
> to the lookup table approach.. but shouldn't there be another level in there?
> 
> {
>   "_authorised_values": {
>     "location": {
>       "authorised_value": "GEN",
>       "category": "LOC",
>       "id": 27,
>       "imageurl": null,
>       "lib": "General Stacks",
>       "lib_opac": null
>     }
>   },
>   "location": "GEN"
> }
>     
> 
> What about for searches.. it's unlikely all items will be in the 'GEN'
> location.. so wouldn't we actually need:
> 
> {
>   "_authorised_values": {
>     "location": {
>       "GEN": "General Stacks",
>       "SHELVES": "Shelves"
>     },
>   },
>   "location": "GEN"
> }
> 
> Where the key is the AV code and the value is the appropriate description
> (based on public vs staff.
> 
> Not sure we need any of the rest of the AV object detail honestly.. perhaps
> the imageurl later...

Hi Martin, I did not think this to fill a search or select options (I thought
better for that to have an authorised values endpoint).

I designed the _authorised_values attribute to just bring the value of an
authorised value in the original json.

I'm not saying we shouldn't do it.. I just don't think it wise to bring every
possible value here.. I've seen AV categories with hundreds of AV

About what info of the AV should we bring, it's true that in most cases you
would only need lib or lib_opac, but I didn't new if someone else for some
reason would need any of the other info.. maybe we should sheep category too,
to be able to populate a search or a select with the category options

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


More information about the Koha-bugs mailing list