[Bug 28480] New: GET /patrons missing q parameters on the spec
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28480 Bug ID: 28480 Summary: GET /patrons missing q parameters on the spec Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: REST API Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com -- 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=28480 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | -- 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=28480 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joonas.kylmala@helsinki.fi -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28480 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 121475 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121475&action=edit Bug 28480: Add q parameters for GET /patrons This patch adds the q query parameters to the route. To test: 1. Try the route with the following query parameter: q={"patron_id":2} i.e. GET /api/v1/patrons?q={"patron_id":2} => FAIL: You get a bad request respose 2. Apply this patch 3. Restart all 4. Repeat 1 => SUCCESS: You get the patron 5. Sign off :-D 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=28480 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff CC| |jonathan.druart+koha@gmail. | |com, | |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=28480 David Nind <david@davidnind.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=28480 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121475|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 121503 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121503&action=edit Bug 28480: Add q parameters for GET /patrons This patch adds the q query parameters to the route. To test: 1. Try the route with the following query parameter: q={"patron_id":2} i.e. GET /api/v1/patrons?q={"patron_id":2} => FAIL: You get a bad request respose 2. Apply this patch 3. Restart all 4. Repeat 1 => SUCCESS: You get the patron 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28480 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=28480 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121503|0 |1 is obsolete| | --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 121874 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121874&action=edit Bug 28480: Add q parameters for GET /patrons This patch adds the q query parameters to the route. To test: 1. Try the route with the following query parameter: q={"patron_id":2} i.e. GET /api/v1/patrons?q={"patron_id":2} => FAIL: You get a bad request respose 2. Apply this patch 3. Restart all 4. Repeat 1 => SUCCESS: You get the patron 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.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=28480 --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 121875 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121875&action=edit Bug 28482: (QA follow-up) Add unit test 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=28480 --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Aren't they missing for other routes as well? Shouldn't we have a test to catch missing occurrences? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28480 --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Second patch has a wrong bug number. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28480 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |In Discussion -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28480 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #5)
Aren't they missing for other routes as well? Shouldn't we have a test to catch missing occurrences?
Do you want a follow-up? Here? Separate bug? I can take care of that. I think we could have a test on the QA tools raise a warning, as some routes are not yet (maybe never) implemented using our stack (e.g. /ill_backends and /illrequests). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28480 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |28613 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28613 [Bug 28613] Several objects.search-based routes missing parameters -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28480 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Passed QA 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=28480 --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 122278 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122278&action=edit Bug 28613: Add missing parameters to objects.search-based routes The objects.search helper provides convenient ways to paginate and a 'q' filter parameter to build complex queries on this Koha::Objects-based routes. Some routes were created prior to this feature getting introduced. We need to adjust the parameters for all existing objects.search-based routes. This patch adds that. The only GET (as in list) routes that would still be missing the parameters are those about ILL, that are not objects.search based, and probably need to be rewritten. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28480 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #122278|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=28480 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |21.11.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=28480 --- Comment #9 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28480 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121875|0 |1 is obsolete| | --- Comment #10 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 122332 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122332&action=edit Bug 28480: (QA follow-up) Add unit test Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Fixed bug number -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28480 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Version(s)|21.11.00 |21.11.00,21.05.02 released in| | Status|Pushed to master |Pushed to stable --- Comment #11 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.05.x for 21.05.02 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28480 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|21.11.00,21.05.02 |21.11.00,21.05.02,20.11.09 released in| | CC| |fridolin.somers@biblibre.co | |m --- Comment #12 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.09 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28480 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.11.00,21.05.02,20.11.09 |21.11.00,21.05.02 released in| | Status|Pushed to oldstable |ASSIGNED --- Comment #13 from Fridolin Somers <fridolin.somers@biblibre.com> --- Arf breaks test suite : t/db_dependent/api/v1/patrons.t .. # Failed test 'exact match for JSON Pointer "/0/cardnumber"' # at t/db_dependent/api/v1/patrons.t line 66. # got: '1' # expected: 'O_HBrhYpvfsZOtvfyC' # Looks like you failed 1 test of 16. # Failed test 'librarian access tests' # at t/db_dependent/api/v1/patrons.t line 84. # Looks like you failed 1 test of 2. t/db_dependent/api/v1/patrons.t .. 1/7 # Failed test 'list() tests' # at t/db_dependent/api/v1/patrons.t line 85. t/db_dependent/api/v1/patrons.t .. 5/7 # Looks like you failed 1 test of 7. t/db_dependent/api/v1/patrons.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/7 subtests Test Summary Report ------------------- t/db_dependent/api/v1/patrons.t (Wstat: 256 Tests: 7 Failed: 1) Failed test: 1 Non-zero exit status: 1 Files=1, Tests=7, 7 wallclock secs ( 0.03 usr 0.00 sys + 6.59 cusr 0.54 csys = 7.16 CPU) Result: FAIL So I revert from 20.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28480 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28480 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28480 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |victor@tuxayo.net Status|Pushed to stable |RESOLVED --- Comment #14 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Missing dependencies for 20.05.x, it shouldn't be affected, no backport. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org