[Bug 33146] New: Add a public fetch endpoint for items
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 Bug ID: 33146 Summary: Add a public fetch endpoint for items Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: REST API Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com CC: tomascohen@gmail.com It would be helpful to have a pre-filtered public endpoint for fetching and listing items. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |ity.org |.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |30979, 31789 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30979 [Bug 30979] Add ability for OPAC users to checkout to themselves https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31789 [Bug 31789] REST API: CRUD endpoint for Items -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 147781 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147781&action=edit Bug 33146: Add public items lookup route This patch adds a /public equivilent to the item listing endpoint. This allows us to search for an item by it's external_id (barcode). Test plan 1. Apply patch 2. Perform a GET on /api/v1/public/items?external_id=some_barcode 3. Confirm that the above endpoint correctly returns items that should be visible in the OPAC -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |23667 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23667 [Bug 23667] Add API route for listing items -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 --- Comment #2 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 147786 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147786&action=edit Bug 33146: Unit tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #147781|0 |1 is obsolete| | --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 147787 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147787&action=edit Bug 33146: Add public items lookup route This patch adds a /public equivilent to the item listing endpoint. This allows us to search for an item by it's external_id (barcode). Test plan 1. Apply patch 2. Perform a GET on /api/v1/public/items?external_id=some_barcode 3. Confirm that the above endpoint correctly returns items that should be visible in the OPAC -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |agustinmoyano@theke.io -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 Lucas Gass <lucas@bywatersolutions.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=33146 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #147786|0 |1 is obsolete| | --- Comment #4 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 147863 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147863&action=edit Bug 33146: Unit tests Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #147787|0 |1 is obsolete| | --- Comment #5 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 147864 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147864&action=edit Bug 33146: Add public items lookup route This patch adds a /public equivilent to the item listing endpoint. This allows us to search for an item by it's external_id (barcode). Test plan 1. Apply patch 2. Perform a GET on /api/v1/public/items?external_id=some_barcode 3. Confirm that the above endpoint correctly returns items that should be visible in the OPAC Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I seem to remember a lot of discussion on another bug about a public endpoint for items. There are a lot of fields with information libraries might not want to make publicly available. I see items itself are filtered by visibility, but what about columns? Internal note, vendor and price information, materials (pref driven)? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- And for locations and similar - is only the OPAC description made visible publicly? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- There's a trick going on with the allow list of attributes for the public API. For authorized value expansion, see bug 33161 for how we will implement that bit -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- As Tomas states, we are working on the `+strings` embed part of this distinctly, and I don't attempt to handle the additional subfields Marc stuff deliberately for this reason. We also already agreed on the public fields include back in bug 27358 where we introduced the first 'public_read_list' implementation. Hope that settles your nerves a bit Katrin.. this is of course rather important to get right. This is also a somewhat simpler case as it's a direct endpoint rather than an embed which has its own additional complications. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- All ok, better to ask than to be sorry. :) I am glad you got it all handled and didn't remember we had finished bug 27358. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com Status|Signed Off |Failed QA --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- The tests here die if you have any issues in your system. Can we remove the delete, and add a common attribute to the newly created items that we can use to query and limit the data set? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Nick Clemens from comment #11)
The tests here die if you have any issues in your system. Can we remove the delete, and add a common attribute to the newly created items that we can use to query and limit the data set?
What I always do is generating a few items, and generate a my $query = { itemnumber => [ $item_1->id, ..., $item_n->id ] }; and then: $t->get_ok( '...?q=' . $query ); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #147864|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #147863|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 149014 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=149014&action=edit Bug 33146: Unit tests Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 --- Comment #14 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 149015 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=149015&action=edit Bug 33146: Add public items lookup route This patch adds a /public equivilent to the item listing endpoint. This allows us to search for an item by it's external_id (barcode). Test plan 1. Apply patch 2. Perform a GET on /api/v1/public/items?external_id=some_barcode 3. Confirm that the above endpoint correctly returns items that should be visible in the OPAC Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 --- Comment #15 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 149016 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=149016&action=edit Bug 33146: (QA follow-up) Do not delete all items in test Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 --- Comment #16 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 149017 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=149017&action=edit Bug 33146: Allow embedding expanded coded values Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 --- Comment #17 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 149019 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=149019&action=edit Bug 33146: (QA follow-up) Consistency with /biblios/:biblio_id/items Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 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=33146 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #149014|0 |1 is obsolete| | --- Comment #18 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 149024 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=149024&action=edit Bug 33146: Unit tests Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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=33146 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #149015|0 |1 is obsolete| | --- Comment #19 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 149025 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=149025&action=edit Bug 33146: Add public items lookup route This patch adds a /public equivilent to the item listing endpoint. This allows us to search for an item by it's external_id (barcode). Test plan 1. Apply patch 2. Perform a GET on /api/v1/public/items?external_id=some_barcode 3. Confirm that the above endpoint correctly returns items that should be visible in the OPAC Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Bug 33146: (QA follow-up) Do not delete all items in test Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Bug 33146: Allow embedding expanded coded values Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Bug 33146: (QA follow-up) Consistency with /biblios/:biblio_id/items Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Bug 33146: (QA follow-up) Make sure public API enabled for tests 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=33146 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #149016|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #149019|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #149017|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 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=33146 --- Comment #20 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=33146 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |matt.blenkinsop@ptfs-europe | |.com Status|Pushed to master |RESOLVED --- Comment #21 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Enhancement - not backporting to 22.11.x Nice work everyone! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33146 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |new feature Summary|Add a public fetch endpoint |Add public GET endpoint for |for items |listing items -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org