[Bug 32981] New: Add REST API endpoint to list authorised values for a given category
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 Bug ID: 32981 Summary: Add REST API endpoint to list authorised values for a given category Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: REST API Assignee: jonathan.druart+koha@gmail.com Reporter: jonathan.druart+koha@gmail.com CC: tomascohen@gmail.com Blocks: 17390 For, at least, the ERM module we would like to retrieve the authorised values for a given category to build a dropdown list with the different options. It has been decided on bug 17390 to use GET /authorised_value_categories/:authorised_value_category_id/values Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17390 [Bug 17390] Add REST API endpoint for Authorised Values -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 146730 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146730&action=edit Bug 32981: Add endpoint to get AV for given category For, at least, the ERM module we would like to retrieve the authorised values for a given category to build a dropdown list with the different options. It has been decided on bug 17390 to use GET /authorised_value_categories/:authorised_value_category_id/values Test plan: curl -v -s -u koha:koha --request GET http://kohadev-intra.mydnsname.org:8081/api/v1/authorised_value_categories/L... Should display the list of LOC curl -v -s -u koha:koha --request GET http://kohadev-intra.mydnsname.org:8081/api/v1/authorised_value_categories/x... Should return a 404 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |32983 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32983 [Bug 32983] Use REST API route to retrieve authorised values -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pedro.amorim@ptfs-europe.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 --- Comment #2 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Working as intended, also good to see bug 17390 being broken down so that we can at least get the AV values, we can think about create, update and delete later, as stated by Josef in that bug. Do we really need a custom to_api_mapping, or should we instead change some of the fields in authorised_values e.g. lib and lib_opac. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #146730|0 |1 is obsolete| | --- Comment #3 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 146842 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146842&action=edit Bug 32981: Add endpoint to get AV for given category For, at least, the ERM module we would like to retrieve the authorised values for a given category to build a dropdown list with the different options. It has been decided on bug 17390 to use GET /authorised_value_categories/:authorised_value_category_id/values Test plan: curl -v -s -u koha:koha --request GET http://kohadev-intra.mydnsname.org:8081/api/v1/authorised_value_categories/L... Should display the list of LOC curl -v -s -u koha:koha --request GET http://kohadev-intra.mydnsname.org:8081/api/v1/authorised_value_categories/x... Should return a 404 Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 --- Comment #4 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Pedro Amorim from comment #2)
Do we really need a custom to_api_mapping, or should we instead change some of the fields in authorised_values e.g. lib and lib_opac.
Yes, we list the names of the attributes we want to modify there. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 --- Comment #5 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- I know! :-D My point is we wouldn't want to modify the names of the attributes if they were already straightforward enough. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=32997 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |32997 See Also|https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=32997 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32997 [Bug 32997] Add REST API endpoint to list authorised values for multiple given categories -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |32939 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32939 [Bug 32939] Have generic fetch functions in vue modules -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|32939 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32939 [Bug 32939] Have generic fetch functions in vue modules -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #146842|0 |1 is obsolete| | --- Comment #6 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 147335 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147335&action=edit Bug 32981: Add endpoint to get AV for given category For, at least, the ERM module we would like to retrieve the authorised values for a given category to build a dropdown list with the different options. It has been decided on bug 17390 to use GET /authorised_value_categories/:authorised_value_category_id/values Test plan: curl -v -s -u koha:koha --request GET http://kohadev-intra.mydnsname.org:8081/api/v1/authorised_value_categories/L... Should display the list of LOC curl -v -s -u koha:koha --request GET http://kohadev-intra.mydnsname.org:8081/api/v1/authorised_value_categories/x... Should return a 404 Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 147336 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147336&action=edit Bug 32981: (QA follow-up) Fix POD and file permissions -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Question: are we sure about the names for things? I would've expected to see something like: my $avs_rs = $category->avs; for querying the avs. Let's suppose we leave that for later, for when we really embed the avs in the /authorised_value_categories endpoint... Are you sure we will call the accessor $category->values instead? And so the x-koha-embed attribute. I'm not saying it is wrong, just thinking it might get confusing. I'd go for 'av', like in /av_categories /av_categories/:code/avs I'm not even sure we need this endpoint or just the other one, with an embed :-D GET /av_categories/:code x-koha-embed: avs -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 --- Comment #9 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Tomás Cohen Arazi from comment #8)
I'm not even sure we need this endpoint or just the other one, with an embed
It's not used later, feel free to drop it. It felt "more REST" than the other route, that's why I decided to keep it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I'm still in doubt with comment 8. Please tell me what are your thoughts. It feels like the name for things needs some thought. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|32983 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32983 [Bug 32983] Use REST API route to retrieve authorised values -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.05. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|23.05.00 |23.05.00,22.11.04 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 --- Comment #12 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Nice work everyone! Pushed to stable for 22.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- This seems to break the complete API. See also bug 32983. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=33145 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Resolution|--- |FIXED Status|Pushed to stable |RESOLVED --- Comment #14 from Lucas Gass <lucas@bywatersolutions.com> --- Enhancement will not be backported to 22.05.x. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Text to go in the| |Add /authorities API release notes| |endpoint for working with | |catalog authorities. Severity|enhancement |new feature -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact| |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|Add /authorities API | release notes|endpoint for working with | |catalog authorities. | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|new feature |enhancement -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |new feature Summary|Add REST API endpoint to |Add GET endpoint for |list authorised values for |listing authorised values |a given category |by a given category -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com --- Comment #15 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- *** Bug 17390 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org