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
[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)
Created attachment 128760 [details] [review] 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.
Created attachment 128836 [details] [review] 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>
Created attachment 128837 [details] [review] 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>
Created attachment 128838 [details] [review] 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>
Created attachment 128953 [details] [review] 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>
Created attachment 128954 [details] [review] 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>
Created attachment 128955 [details] [review] 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>
(In reply to Tomás Cohen Arazi from comment #4) > Created attachment 128837 [details] [review] [review] > Bug 29736: Restore searching Oops, thanks Tomas!
Pushed to master for 22.05, thanks to everybody involved [U+1F984]
Pushed to 21.11.x for 21.11.02
Pushed to 21.05.x for 21.05.09
Backported: Pushed to 20.11.x branch for 20.11.15
Do I need to backport this to 19.11.x? I probably won't unless there is a need for it
Not backported to 19.11.x. Please request it if you need it.