[Bug 22613] New: Add /patrons/patron_id/checkouts endpoints
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 Bug ID: 22613 Summary: Add /patrons/patron_id/checkouts endpoints Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: REST api Assignee: koha-bugs@lists.koha-community.org Reporter: josef.moravec@gmail.com Target Milestone: --- As described in RFC, there should be endpoint in the form /patrons/{patron_id}/checkouts for getting patrons checkouts. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |josef.moravec@gmail.com |ity.org | URL| |https://wiki.koha-community | |.org/wiki/Checkouts_endpoin | |t_RFC Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |17005 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17005 [Bug 17005] REST API: add routes to list checkouts history -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 --- Comment #1 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 87276 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=87276&action=edit Bug 22613: Add /patrons/{patron_id}/checkouts endpoint to REST API Test plan: 1) Apply the patch 2) Restart plack 3) Access GET to /patrons/{patron_id}/checkouts It should have the same abilities as /checkouts?patron_id={patron_id} 4) prove t/db_dependent/api/v1/checkouts.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 Josef Moravec <josef.moravec@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=22613 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |black23@gmail.com, | |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 Johanna Räisä <johanna.raisa@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |johanna.raisa@koha-suomi.fi --- Comment #2 from Johanna Räisä <johanna.raisa@koha-suomi.fi> --- I have difficulties to apply this. It fails to trailing whitespace error. Applying: Bug 22613: Add /patrons/{patron_id}/checkouts endpoint to REST API .git/rebase-apply/patch:18: trailing whitespace. error: sha1 information is lacking or useless (api/v1/swagger/paths/checkouts.json). error: could not build fake ancestor Patch failed at 0001 Bug 22613: Add /patrons/{patron_id}/checkouts endpoint to REST API -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #87276|0 |1 is obsolete| | --- Comment #3 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 88148 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=88148&action=edit Bug 22613: Add /patrons/{patron_id}/checkouts endpoint to REST API Test plan: 1) Apply the patch 2) Restart plack 3) Access GET to /patrons/{patron_id}/checkouts It should have the same abilities as /checkouts?patron_id={patron_id} 4) prove t/db_dependent/api/v1/checkouts.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 --- Comment #4 from Josef Moravec <josef.moravec@gmail.com> --- (In reply to Johanna Räisä from comment #2)
I have difficulties to apply this. It fails to trailing whitespace error.
Applying: Bug 22613: Add /patrons/{patron_id}/checkouts endpoint to REST API .git/rebase-apply/patch:18: trailing whitespace.
error: sha1 information is lacking or useless (api/v1/swagger/paths/checkouts.json). error: could not build fake ancestor Patch failed at 0001 Bug 22613: Add /patrons/{patron_id}/checkouts endpoint to REST API
Have you applied dependencies? I just rebased it anyway Thanks for testing -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 --- Comment #5 from Johanna Räisä <johanna.raisa@koha-suomi.fi> --- Thanks, the whitespace error disappeared. :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 Johanna Räisä <johanna.raisa@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply --- Comment #6 from Johanna Räisä <johanna.raisa@koha-suomi.fi> --- Even with all dependencies I can't apply this. Seems that there are more rows in checkouts.json and it fails to that. Probably some follow-ups have added them? Applying: Bug 22613: Add /patrons/{patron_id}/checkouts endpoint to REST API error: sha1 information is lacking or useless (api/v1/swagger/paths/checkouts.json). error: could not build fake ancestor Patch failed at 0001 Bug 22613: Add /patrons/{patron_id}/checkouts endpoint to REST API -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I see the same problem using git bz apply 22613 and following all dependencies. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 --- Comment #8 from Josef Moravec <josef.moravec@gmail.com> --- (In reply to Katrin Fischer from comment #7)
I see the same problem using git bz apply 22613 and following all dependencies.
I was able to apply them all yesterday, but master is changing quickly now, I'll do rebase of them all ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #88148|0 |1 is obsolete| | --- Comment #9 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 88266 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=88266&action=edit Bug 22613: Add /patrons/{patron_id}/checkouts endpoint to REST API Test plan: 1) Apply the patch 2) Restart plack 3) Access GET to /patrons/{patron_id}/checkouts It should have the same abilities as /checkouts?patron_id={patron_id} 4) prove t/db_dependent/api/v1/checkouts.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff --- Comment #10 from Josef Moravec <josef.moravec@gmail.com> --- But yes, you both are right, there was some mess in my branch, should be OK now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 Michal Denar <black23@gmail.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=22613 Michal Denar <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #88266|0 |1 is obsolete| | --- Comment #11 from Michal Denar <black23@gmail.com> --- Created attachment 88332 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=88332&action=edit Bug 22613: Add /patrons/{patron_id}/checkouts endpoint to REST API Test plan: 1) Apply the patch 2) Restart plack 3) Access GET to /patrons/{patron_id}/checkouts It should have the same abilities as /checkouts?patron_id={patron_id} 4) prove t/db_dependent/api/v1/checkouts.t Signed-off-by: Michal Denar <black23@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 --- Comment #12 from Johanna Räisä <johanna.raisa@koha-suomi.fi> --- Have to ask what version of Mojolicious and OpenAPI you are using? I'm getting errors with browser from api/v1/checkouts?patron_id={patron_id} message "Malformed query string" path "/query/patron_id" Also with running test the same 400 errors come up with patrons-endpoints. With cURL and d-parameter the request is ok. Otherwise the patch seemed to work fine, so I think I have some different module version somewhere. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 --- Comment #13 from Josef Moravec <josef.moravec@gmail.com> --- (In reply to Johanna Räisä from comment #12)
Have to ask what version of Mojolicious and OpenAPI you are using?
I'm getting errors with browser from api/v1/checkouts?patron_id={patron_id}
message "Malformed query string" path "/query/patron_id"
Also with running test the same 400 errors come up with patrons-endpoints. With cURL and d-parameter the request is ok.
Otherwise the patch seemed to work fine, so I think I have some different module version somewhere.
I am using Mojolicious 7.21 and openapi plugin 1.15 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 Johanna Räisä <johanna.raisa@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #88332|0 |1 is obsolete| | --- Comment #14 from Johanna Räisä <johanna.raisa@koha-suomi.fi> --- Created attachment 88448 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=88448&action=edit Bug 22613: Add /patrons/{patron_id}/checkouts endpoint to REST API Test plan: 1) Apply the patch 2) Restart plack 3) Access GET to /patrons/{patron_id}/checkouts It should have the same abilities as /checkouts?patron_id={patron_id} 4) prove t/db_dependent/api/v1/checkouts.t Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Johanna Raisa <johanna.raisa@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 Johanna Räisä <johanna.raisa@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #88448|0 |1 is obsolete| | --- Comment #15 from Johanna Räisä <johanna.raisa@koha-suomi.fi> --- Created attachment 88450 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=88450&action=edit Bug 22613: Add /patrons/{patron_id}/checkouts endpoint to REST API Test plan: 1) Apply the patch 2) Restart plack 3) Access GET to /patrons/{patron_id}/checkouts It should have the same abilities as /checkouts?patron_id={patron_id} 4) prove t/db_dependent/api/v1/checkouts.t Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Johanna Raisa <johanna.raisa@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 Bouzid Fergani <bouzid.fergani@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bouzid.fergani@inlibro.com Status|Signed Off |Patch doesn't apply --- Comment #16 from Bouzid Fergani <bouzid.fergani@inlibro.com> --- Hi Josef, When applying the patch, I have sha1. Bug 22613 - Add /patrons/patron_id/checkouts endpoints 88450 - Bug 22613: Add /patrons/{patron_id}/checkouts endpoint to REST API Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 22613: Add /patrons/{patron_id}/checkouts endpoint to REST API fatal: sha1 information is lacking or useless (api/v1/swagger/paths.json). error: could not build fake ancestor Patch failed at 0001 Bug 22613: Add /patrons/{patron_id}/checkouts endpoint to REST API The copy of the patch that failed is found in: .git/rebase-apply/patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-22613-Add-patronspatronidcheckouts-endpoint-to-SKP48A.patch Thanks. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 --- Comment #17 from Michal Denar <black23@gmail.com> --- Hi Johanna, can you verese this patch on top of master? Thank you. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 --- Comment #18 from Johanna Räisä <johanna.raisa@koha-suomi.fi> --- (In reply to Michal Denar from comment #17)
Hi Johanna, can you verese this patch on top of master?
Thank you.
I think Josef will do better with this one. ;) I just tested it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 --- Comment #19 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 91406 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91406&action=edit Bug 22613: Add /patrons/{patron_id}/checkouts endpoint to REST API Test plan: 1) Apply the patch 2) Restart plack 3) Access GET to /patrons/{patron_id}/checkouts It should have the same abilities as /checkouts?patron_id={patron_id} 4) prove t/db_dependent/api/v1/checkouts.t Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Johanna Raisa <johanna.raisa@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off --- Comment #20 from Josef Moravec <josef.moravec@gmail.com> --- Rebased on master. Thanks for testing -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #88450|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=22613 Michal Denar <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #91406|0 |1 is obsolete| | --- Comment #21 from Michal Denar <black23@gmail.com> --- Created attachment 91457 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91457&action=edit Bug 22613: Add /patrons/{patron_id}/checkouts endpoint to REST API Test plan: 1) Apply the patch 2) Restart plack 3) Access GET to /patrons/{patron_id}/checkouts It should have the same abilities as /checkouts?patron_id={patron_id} 4) prove t/db_dependent/api/v1/checkouts.t Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Johanna Raisa <johanna.raisa@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 Emmi Takkinen <emmi.takkinen@outlook.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #91457|0 |1 is obsolete| | --- Comment #22 from Emmi Takkinen <emmi.takkinen@outlook.com> --- Created attachment 94517 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94517&action=edit Bug 22613: Add /patrons/{patron_id}/checkouts endpoint to REST API Subject: [PATCH] Bug 22613: Add /patrons/{patron_id}/checkouts endpoint to REST API Test plan: 1) Apply the patch 2) Restart plack 3) Access GET to /patrons/{patron_id}/checkouts It should have the same abilities as /checkouts?patron_id={patron_id} 4) prove t/db_dependent/api/v1/checkouts.t Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Johanna Raisa <johanna.raisa@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Emmi Takkinen <emmi.takkinen@outlook.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |joonas.kylmala@helsinki.fi --- Comment #23 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- The description "By default, only current checkout are returned, when this is true, all checkouts (current and checked in) are returned as result." is not true, only checked in checkouts are returned. The description should be the same as for /checkouts endpoint: "By default, current checkouts are returned, when this is true then checked in checkouts are returned as result." -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 --- Comment #24 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Joonas Kylmälä from comment #23)
The description
"By default, only current checkout are returned, when this is true, all checkouts (current and checked in) are returned as result."
is not true, only checked in checkouts are returned. The description should be the same as for /checkouts endpoint:
"By default, current checkouts are returned, when this is true then checked in checkouts are returned as result."
We should really merge the f* tables. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 --- Comment #25 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Also, would we be able to do this without having to duplicate the endpoint definition by using the existing definition for /checkouts endpoint by replacing
"$ref": "paths/checkouts.json#/~1patrons~1{patron_id}~1checkouts"
with
$ref": "paths/checkouts.json#/~1checkouts~1{patron_id}
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 --- Comment #26 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Joonas Kylmälä from comment #25)
Also, would we be able to do this without having to duplicate the endpoint definition by using the existing definition for /checkouts endpoint by replacing
"$ref": "paths/checkouts.json#/~1patrons~1{patron_id}~1checkouts"
with
$ref": "paths/checkouts.json#/~1checkouts~1{patron_id}
As-is, the patch looks correct and what Martin and I have been saying. I haven't tried or run the tests to verify it is functional, but it looks exactly as what we would've expected when saying 'alias'. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |oleonard@myacpl.org --- Comment #27 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- *** Bug 26571 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=23336 CC| |martin.renvoize@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=22613 Alex Arnaud <alex.arnaud@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #94517|0 |1 is obsolete| | --- Comment #28 from Alex Arnaud <alex.arnaud@biblibre.com> --- Created attachment 164611 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164611&action=edit Bug 22613: [REST API] Add GET endpoint /patrons/{patron_id}/checkouts Test plan: curl -v -s -u koha:koha --request GET http://kohadev.local/api/v1/patrons/{id}/checkouts test with query parameters (they are the same as for /patrons/{id}/holds -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 Alex Arnaud <alex.arnaud@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff CC| |alex.arnaud@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|josef.moravec@gmail.com |alex.arnaud@biblibre.com 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=22613 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #164611|0 |1 is obsolete| | --- Comment #29 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 164759 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164759&action=edit Bug 22613: Add GET endpoint /patrons/{patron_id}/checkouts This patch adds a new endpoint, for fetching checkouts from a specific patron. Test plan: 1. Apply this patch 2. Run: $ ktd --shell k$ prove t/db_dependent/api/v1/patrons_checkouts.t => SUCCESS: Tests pass! 3. Run: $ curl -v -s -u koha:koha --request GET \ http://kohadev.local/api/v1/patrons/{id}/checkouts test with query parameters (they are the same as for /patrons/{id}/holds => SUCCESS: The API works! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 --- Comment #30 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Tomás Cohen Arazi from comment #26)
(In reply to Joonas Kylmälä from comment #25)
Also, would we be able to do this without having to duplicate the endpoint definition by using the existing definition for /checkouts endpoint by replacing
"$ref": "paths/checkouts.json#/~1patrons~1{patron_id}~1checkouts"
with
$ref": "paths/checkouts.json#/~1checkouts~1{patron_id}
As-is, the patch looks correct and what Martin and I have been saying. I haven't tried or run the tests to verify it is functional, but it looks exactly as what we would've expected when saying 'alias'.
I don't remember what 2019-Tomas meant by this XD -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #164759|0 |1 is obsolete| | --- Comment #31 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 164770 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164770&action=edit Bug 22613: Add GET endpoint /patrons/{patron_id}/checkouts This patch adds a new endpoint, for fetching checkouts from a specific patron. Test plan: 1. Apply this patch 2. Run: $ ktd --shell k$ prove t/db_dependent/api/v1/patrons_checkouts.t => SUCCESS: Tests pass! 3. Run: $ curl -v -s -u koha:koha --request GET \ http://kohadev.local/api/v1/patrons/{id}/checkouts test with query parameters (they are the same as for /patrons/{id}/holds => SUCCESS: The API works! Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@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=22613 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact| |martin.renvoize@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=22613 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #32 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- All working as expected.. I could have swarn we had examples of just passing the query to an existing controller.. i.e. not duplicating the code as we do here. But I don't see a reason to block this.. we can tidy up later. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 --- Comment #33 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Tomás Cohen Arazi from comment #30)
I don't remember what 2019-Tomas meant by this XD
Ah, that thing Martin wrote (In reply to Martin Renvoize from comment #32)
All working as expected.. I could have swarn we had examples of just passing the query to an existing controller.. i.e. not duplicating the code as we do here.
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 --- Comment #34 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.05.00 |24.05.00,23.11.06 released in| | Status|Pushed to main |Pushed to stable CC| |fridolin.somers@biblibre.co | |m --- Comment #35 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22613 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Resolution|--- |FIXED Status|Pushed to stable |RESOLVED --- Comment #36 from Lucas Gass <lucas@bywatersolutions.com> --- Enhancement will not be backported to 23.05.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org