[Bug 29736] New: Error when placing a hold for a club without members
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29736 Bug ID: 29736 Summary: Error when placing a hold for a club without members Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Hold requests Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart+koha@gmail.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com If a club does not have members and a hold is placed for it, there is a JS error appearing in the console: Uncaught TypeError: err.responseJSON.error is undefined -- 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=29736 --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- [debug] POST "/api/v1/clubs/1/holds" (72f374a3) [debug] Routing to controller "Koha::REST::V1::Auth" and action "under" [debug] Routing to controller "Koha::REST::V1::Clubs::Holds" and action "add" [warn] OpenAPI <<< POST api/v1/clubs/1/holds [{"message":"Properties not allowed: patron_id.","path":"\/body"}] [debug] 400 Bad Request (0.023515s, 42.526/s) -- 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=29736 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=29736 --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 128760 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128760&action=edit Bug 29736: Don't return empty clubs There is an error when placing a hold for a club without members: Uncaught TypeError: err.responseJSON.error is undefined It seems that we should remove clubs without members from the search. Test plan: Create 1 club xx with 2 patrons Create 1 club xxx with 1 patron and cancel their enrolment Create 1 club xxxx without patron Place a hold for club "x", only the first one should be returned with this patch. -- 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=29736 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart+koha@gmail. |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=29736 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |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=29736 Tomás Cohen Arazi <tomascohen@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=29736 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128760|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=29736 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 128836 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128836&action=edit Bug 29736: Don't return empty clubs There is an error when placing a hold for a club without members: Uncaught TypeError: err.responseJSON.error is undefined It seems that we should remove clubs without members from the search. Test plan: Create 1 club xx with 2 patrons Create 1 club xxx with 1 patron and cancel their enrolment Create 1 club xxxx without patron Place a hold for club "x", only the first one should be returned with this patch. 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=29736 --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 128837 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128837&action=edit Bug 29736: Restore searching Without this patch, the list will always display all clubs. To test: 1. Have two clubs, with enrollemnts: - Cthulhu fans - The Shadow Out of Time fans 2. Search for the letter c => FAIL: You get both results 3. Apply this patch 4. Repeat 2 => SUCCESS: Only Cthulhu is returned 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=29736 --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 128838 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128838&action=edit Bug 29736: (QA follow-up) No need to delete all clubs There's no real need to delete all the existing clubs in the tests. 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=29736 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128836|0 |1 is obsolete| | --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 128953 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128953&action=edit Bug 29736: Don't return empty clubs There is an error when placing a hold for a club without members: Uncaught TypeError: err.responseJSON.error is undefined It seems that we should remove clubs without members from the search. Test plan: Create 1 club xx with 2 patrons Create 1 club xxx with 1 patron and cancel their enrolment Create 1 club xxxx without patron Place a hold for club "x", only the first one should be returned with this patch. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29736 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128837|0 |1 is obsolete| | --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 128954 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128954&action=edit Bug 29736: Restore searching Without this patch, the list will always display all clubs. To test: 1. Have two clubs, with enrollemnts: - Cthulhu fans - The Shadow Out of Time fans 2. Search for the letter c => FAIL: You get both results 3. Apply this patch 4. Repeat 2 => SUCCESS: Only Cthulhu is returned 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29736 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128838|0 |1 is obsolete| | --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 128955 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128955&action=edit Bug 29736: (QA follow-up) No need to delete all clubs There's no real need to delete all the existing clubs in the tests. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29736 Katrin Fischer <katrin.fischer@bsz-bw.de> 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=29736 --- Comment #9 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Tomás Cohen Arazi from comment #4)
Created attachment 128837 [details] [review] Bug 29736: Restore searching
Oops, thanks Tomas! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29736 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch CC| |fridolin.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29736 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.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=29736 --- Comment #10 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, 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=29736 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Version(s)|22.05.00 |22.05.00,21.11.02 released in| | Status|Pushed to master |Pushed to stable --- Comment #11 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.11.x for 21.11.02 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29736 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|22.05.00,21.11.02 |22.05.00,21.11.02,21.05.09 released in| | CC| |andrew@bywatersolutions.com --- Comment #12 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 21.05.x for 21.05.09 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29736 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Version(s)|22.05.00,21.11.02,21.05.09 |22.05.00,21.11.02,21.05.09, released in| |20.11.15 Status|Pushed to oldstable |Pushed to oldoldstable --- Comment #13 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Backported: Pushed to 20.11.x branch for 20.11.15 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29736 wainuiwitikapark@catalyst.net.nz changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #14 from wainuiwitikapark@catalyst.net.nz --- Do I need to backport this to 19.11.x? I probably won't unless there is a need for it -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29736 --- Comment #15 from wainuiwitikapark@catalyst.net.nz --- Not backported to 19.11.x. Please request it if you need it. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org