Bug 35942: OPAC user can enroll several times to the same club [23.05.x]
authorKyle M Hall <kyle@bywatersolutions.com>
Tue, 30 Jan 2024 15:58:02 +0000 (10:58 -0500)
committerAleisha Amohia <aleishaamohia@hotmail.com>
Tue, 27 Feb 2024 01:49:06 +0000 (01:49 +0000)
commited41eca3938d20d2197ad40c651f029da353d765
tree5739d5f25f8ea7a4716475fa17228314a017f4c2
parentb080170d8fe32f6ddf46a37ea60ba2abfecc9916
Bug 35942: OPAC user can enroll several times to the same club [23.05.x]

Test Plan:

1) Create 3 clubs, 1 limited to library A, 1 limited to library B and one not limited
2) Use a patron with home library A.
3) Go to the opac-user page, "Clubs" tab show 0/2 (the one from library B is not listed)
4) Browse to /cgi-bin/koha/svc/club/enroll?id=1
5) Reload that page a couple times
6) Note the patron is now enrolled in the same club multiple times
7) Delete those enrollments
8) Apply this patch
9) Restart all the things!
10) Repeat steps 2-7, note the lack of duplicate enrollments!
11) Repeat steps 2-10 for the staff interface

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9bdab108e22768b018b017ed7c0e0016270f2570)
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
opac/svc/club/enroll
svc/club/enroll