If you enroll a user into a club from the issues tab on a user record, it never completes. This is due to a typo in line 64 of /usr/share/koha/intranet/cgi-bin/svc/club/enroll which says my $already_enrolled = Koha::Club::Entrollments->search( Changing this line to my $already_enrolled = Koha::Club::Enrollments->search( seems to fix the problem.
Bug 35942 is missing from main so this fix can't currently be implemented
It's on main now. For extra fun, the backport patch for 23.05 didn't have this typo, so it currently affects 24.11, 23.11, and 24.05 once the offending patch gets backported there.
Created attachment 168573 [details] [review] Bug 37031: Club enrollment from staff interface fails due to Entrollment typo Having svc/club/enroll try to call Koha::Club::Entrollments->search would have been great trolling, if only it had been intentional and if only any of the people signing off had noticed it. Test plan: 1. Without the patch, Tools - Patron clubs - New club template - name it and save 2. New club - (your template) - name it and save 3. Circulation - check out to a patron - Clubs tab - Enroll - Finish enrollment, get alert() about failure to enroll 4. Apply patch, restart_all 5. Enroll - Finish enrollment, success
Created attachment 168643 [details] [review] Bug 37031: Club enrollment from staff interface fails due to Entrollment typo There is a typo in svc/club/enroll - it tries to call Koha::Club::Entrollments->search when it should be Koha::Club::Enrollments. This causes and error when enrolling patrons in clubs. Test plan: 1. Without the patch, Tools - Patron clubs - New club template - name it and save 2. New club - (your template) - name it and save 3. Circulation - check out to a patron - Clubs tab - Enroll - Finish enrollment, get alert() about failure to enroll 4. Apply patch, restart_all 5. Enroll - Finish enrollment, success Signed-off-by: David Nind <david@davidnind.com>
Thanks Phil for fixing! Note: I updated the description for the bug commit message. I'm not sure that the previous description should be in the git history - we all make mistakes from time to time, either in testing or QA.
Created attachment 168745 [details] [review] Bug 37031: Club enrollment from staff interface fails due to Entrollment typo There is a typo in svc/club/enroll - it tries to call Koha::Club::Entrollments->search when it should be Koha::Club::Enrollments. This causes and error when enrolling patrons in clubs. Test plan: 1. Without the patch, Tools - Patron clubs - New club template - name it and save 2. New club - (your template) - name it and save 3. Circulation - check out to a patron - Clubs tab - Enroll - Finish enrollment, get alert() about failure to enroll 4. Apply patch, restart_all 5. Enroll - Finish enrollment, success Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
It's only on 24.05 (once it gets bug 35942) and 23.11 because 23.05 and below got a patch without the typo.
(In reply to Phil Ringnalda from comment #7) > It's only on 24.05 (once it gets bug 35942) and 23.11 because 23.05 and > below got a patch without the typo. That's good news!
Pushed for 24.11! Well done everyone, thank you!
Merge conflicts here, please rebase for 24.05.x if needed
I don't get any conflicts applying it on 24.05.x, now that you've got bug 35942 - did you try to apply this one before that one?
Backported to 24.05.x for upcoming 24.05.02
Pushed to 23.11.x for 23.11.07 There are no other typos : > git grep Entrollment => empty
Is this needed for 23.05?
No, the typo didn't make it back past 23.11.