[Bug 23015] New: Create a "GetPickupLocation" endpoint for the ILS-DI Service
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23015 Bug ID: 23015 Summary: Create a "GetPickupLocation" endpoint for the ILS-DI Service Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: new feature Priority: P5 - low Component: Web services Assignee: koha-bugs@lists.koha-community.org Reporter: arthur.suzuki@biblibre.com QA Contact: testopia@bugs.koha-community.org Target Milestone: --- That endpoint may take 2 parameters: - a borrowernumber - and a biblio or item number And it would return a list of available pickup location given a user and a biblio or item. On success would return the following example : <?xml version="1.0" encoding="UTF-8"?> <pickup_locations> <pickup_location> <pickup_location_label>First library</pickup_location_label> <pickup_location_id>1</pickup_location_id> </pickup_location> <pickup_location> <pickup_location_label>Second library</pickup_location_label> <pickup_location_id>2</pickup_location_id> </pickup_location> </pickup_locations> On error : - PatronNotFound in case borrowernumber is not found - RecordNotFound in case Biblio doesn't exist - ItemNotFound in case item doesn't exist -- 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=23015 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |arthur.suzuki@biblibre.com |ity.org | -- 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=23015 --- Comment #1 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Created attachment 90195 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90195&action=edit Bug 23015 : Implements a new ILS-DI service to get available pickup libraries for an item or record test plan : 1 / Set a library A as available pickup location in the intranet 2 / query ILS-DI service with any record which has at least an item in A or an item which can be transfered to A => should send all informations about A 3 / Remove A from available pickup locations from the item in the intranet then repeat 2 => should give empty reply 4 / Try with unexisting patron, unexisting item or unexisting record, should throw an explicit error -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23015 Arthur Suzuki <arthur.suzuki@biblibre.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=23015 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Priority|P5 - low |P4 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=23015 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=23449 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23015 Christophe Croullebois <christophe.croullebois@biblibre.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=23015 Christophe Croullebois <christophe.croullebois@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #90195|0 |1 is obsolete| | --- Comment #2 from Christophe Croullebois <christophe.croullebois@biblibre.com> --- Created attachment 93455 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93455&action=edit Bug 23015 : Implements a new ILS-DI service to get available pickup libraries for an item or record test plan : 1 / Set a library A as available pickup location in the intranet 2 / query ILS-DI service with any record which has at least an item in A or an item which can be transfered to A => should send all informations about A 3 / Remove A from available pickup locations from the item in the intranet then repeat 2 => should give empty reply 4 / Try with unexisting patron, unexisting item or unexisting record, should throw an explicit error Signed-off-by: Christophe Croullebois <christophe.croullebois@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23015 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Arthur, just some feedback on formal stuff: 1) Please always start your commit messages with Bug: xxxx (no extra space before the :). I usually fix those, but it gets boring fast :) 2) There is a lot of complaints about whitespace. Please make sure your editor is set to not use tabs but 4 spaces instead. FAIL C4/ILSDI/Services.pm OK critic FAIL forbidden patterns forbidden pattern: tab char (line 644) forbidden pattern: tab char (line 646) forbidden pattern: tab char (line 647) forbidden pattern: tab char (line 651) forbidden pattern: tab char (line 653) forbidden pattern: tab char (line 654) OK git manipulation OK pod OK pod coverage OK spelling OK valid FAIL koha-tmpl/opac-tmpl/bootstrap/en/modules/ilsdi.tt OK filters FAIL forbidden patterns forbidden pattern: tab char (line 69) forbidden pattern: tab char (line 692) forbidden pattern: tab char (line 693) forbidden pattern: tab char (line 697) OK git manipulation OK js_in_body OK spelling OK tt_valid OK valid_template FAIL opac/ilsdi.pl OK critic FAIL forbidden patterns forbidden pattern: tab char (line 94) forbidden pattern: tab char (line 112) OK git manipulation OK pod OK spelling OK valid It's also very good to get into the havig of running the QA test tools, so those can be caught and fixed early! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23015 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- havig = habit! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23015 --- Comment #5 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Thanks for your review, will fix that after lunch :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23015 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- 3) We are missing tests for the change to Service.pm 4) I can't seem to make the documentation show up? Checking the OPAC side documentation here: /cgi-bin/koha/ilsdi.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23015 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Wondering: does this use the same logic that is used in the OPAC to build the pick-up location list? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23015 Arthur Suzuki <arthur.suzuki@biblibre.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=23015 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #93455|0 |1 is obsolete| | --- Comment #8 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Created attachment 94039 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94039&action=edit Bug 23015: Implements a new ILS-DI service to get available pickup libraries for an item or record test plan : 1 / Set a library A as available pickup location in the intranet 2 / query ILS-DI service with any record which has at least an item in A or an item which can be transfered to A => should send all informations about A 3 / Remove A from available pickup locations from the item in the intranet then repeat 2 => should give empty reply 4 / Try with unexisting patron, unexisting item or unexisting record, should throw an explicit error Signed-off-by: Christophe Croullebois <christophe.croullebois@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23015 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #9 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- (In reply to Katrin Fischer from comment #7)
Wondering: does this use the same logic that is used in the OPAC to build the pick-up location list?
Huuuum... Uses Koha::Library->pickup_location. Opac goes through all libraries which are set as possible pickup location (site configuration) and check if desired book is available for transfer there. This is basically what does Koha::Library->pickup_location but embed in a nice method. Uses the same function (Koha::Library->pickup_location(In reply to Katrin Fischer from comment #6)
3) We are missing tests for the change to Service.pm
Okay, have to write some then...
4) I can't seem to make the documentation show up? Checking the OPAC side documentation here: /cgi-bin/koha/ilsdi.pl
Neither can I... although it's been written in the code, have to check what's wrong there. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23015 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #94039|0 |1 is obsolete| | --- Comment #10 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Created attachment 96815 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96815&action=edit Bug 23015: Implements a new ILS-DI service to get available pickup libraries for an item or record test plan : 1 / Set a library A as available pickup location in the intranet 2 / query ILS-DI service with any record which has at least an item in A or an item which can be transfered to A => should send all informations about A 3 / Remove A from available pickup locations from the item in the intranet then repeat 2 => should give empty reply 4 / Try with unexisting patron, unexisting item or unexisting record, should throw an explicit error Signed-off-by: Christophe Croullebois <christophe.croullebois@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23015 --- Comment #11 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Created attachment 96816 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96816&action=edit Bug 23015: Adding tests for GetPickupLocation method -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23015 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23015 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #12 from David Nind <david@davidnind.com> --- Have tested, but a couple of questions: 1) Details for the service don't display on http://127.0.0.1:8080/cgi-bin/koha/ilsdi.pl but can be accessed from http://127.0.0.1:8080/cgi-bin/koha/ilsdi.pl?service=Describe&verb=GetPickupLocation 2) The result returned doesn't seem to match up with what is shown in the describe text, for example for http://127.0.0.1:8080/cgi-bin/koha/ilsdi.pl?service=GetPickupLocation&patron_id=19&id=23&id_type=item I get: <GetPickupLocation> <library> <anon> <branchname>Centerville</branchname> <branchcode>CPL</branchcode> <branchaddress1>Jefferson Summit</branchaddress1> <pickup_location>1</pickup_location> </anon> <anon> <pickup_location>1</pickup_location> <branchaddress1>River Station</branchaddress1> <branchcode>FFL</branchcode> <branchname>Fairfield</branchname> </anon> <anon> <pickup_location>1</pickup_location> <branchaddress1>Hickory Squere</branchaddress1> <branchcode>FPL</branchcode> <branchname>Fairview</branchname>..... Apart from the above it seems to work fine and the tests pass. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23015 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply --- Comment #13 from David Nind <david@davidnind.com> --- 1) Details for the service don't display on http://127.0.0.1:8080/cgi-bin/koha/ilsdi.pl but can be accessed from http://127.0.0.1:8080/cgi-bin/koha/ilsdi.pl?service=Describe&verb=GetPickupLocation 2) The result returned doesn't seem to match up with what is shown in the describe text, for example for http://127.0.0.1:8080/cgi-bin/koha/ilsdi.pl?service=GetPickupLocation&patron_id=19&id=23&id_type=item I get: <GetPickupLocation> <library> <anon> <branchname>Centerville</branchname> <branchcode>CPL</branchcode> <branchaddress1>Jefferson Summit</branchaddress1> <pickup_location>1</pickup_location> </anon> <anon> <pickup_location>1</pickup_location> <branchaddress1>River Station</branchaddress1> <branchcode>FFL</branchcode> <branchname>Fairfield</branchname> </anon> <anon> <pickup_location>1</pickup_location> <branchaddress1>Hickory Squere</branchaddress1> <branchcode>FPL</branchcode> <branchname>Fairview</branchname>..... 3) Test patch no longer applies: root@5d9aac93ee4e:koha(bz23015)$ git bz apply 23015 Bug 23015 - Create a "GetPickupLocation" endpoint for the ILS-DI Service 96815 - Bug 23015: Implements a new ILS-DI service to get available pickup libraries for an item or record 96816 - Bug 23015: Adding tests for GetPickupLocation method Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 23015: Implements a new ILS-DI service to get available pickup libraries for an item or record Using index info to reconstruct a base tree... M C4/ILSDI/Services.pm M koha-tmpl/opac-tmpl/bootstrap/en/modules/ilsdi.tt M opac/ilsdi.pl Falling back to patching base and 3-way merge... Auto-merging opac/ilsdi.pl Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/modules/ilsdi.tt Auto-merging C4/ILSDI/Services.pm Applying: Bug 23015: Adding tests for GetPickupLocation method Using index info to reconstruct a base tree... M t/db_dependent/ILSDI_Services.t Falling back to patching base and 3-way merge... Auto-merging t/db_dependent/ILSDI_Services.t CONFLICT (content): Merge conflict in t/db_dependent/ILSDI_Services.t error: Failed to merge in the changes. Patch failed at 0001 Bug 23015: Adding tests for GetPickupLocation method -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23015 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=18191 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23015 --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Should we abandon this for the REST API routes? We already have routes for items and biblio: https://api.koha-community.org/#tag/biblios/operation/getBiblioPickupLocatio... https://api.koha-community.org/#tag/items/operation/getItemPickupLocations -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23015 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Patch doesn't apply |RESOLVED --- Comment #15 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Hi Katrin, Indeed this bug is not needed anymore given those routes have been implemented into the Rest API. Best, Arthur -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org