Bug 31516

Summary: Missing error handling for accessing deleted/non-existent club enrollment
Product: Koha Reporter: Joonas Kylmälä <joonas.kylmala>
Component: PatronsAssignee: Joonas Kylmälä <joonas.kylmala>
Status: CLOSED FIXED QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: minor    
Priority: P5 - low CC: david, gmcharlt, kyle.m.hall, lucas, martin.renvoize, victor
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This adds an error message when viewing enrollments for a non-existent club. Previously, a page with an empty title and table were displayed.
Version(s) released in:
22.11.00, 22.05.07
Circulation function:
Attachments: Bug 31516: Add error message for viewing enrollments for a non-existent club
Bug 31516: Add error message for viewing enrollments for a non-existent club
Bug 31516: Add error message for viewing enrollments for a non-existent club
Bug 31516: Add error message for viewing enrollments for a non-existent club

Description Joonas Kylmälä 2022-09-02 18:43:55 UTC
If you visit in staff interface club enrollment page for a non-existent club you get a somewhat broken page, e.g. http://localhost:8081/cgi-bin/koha/clubs/club-enrollments.pl?id=1010101001000

We should provide a clear error message that the club the user tried to view doesn't exists.
Comment 1 Joonas Kylmälä 2022-09-02 18:48:48 UTC Comment hidden (obsolete)
Comment 2 Joonas Kylmälä 2022-09-02 18:52:03 UTC
Created attachment 140179 [details] [review]
Bug 31516: Add error message for viewing enrollments for a non-existent club

To test:
 1) Go to non-existent club's enrollment page, e.g.
    http://localhost:8081/cgi-bin/koha/clubs/club-enrollments.pl?id=1010101001000
 2) Notice the not fully filled header text and empty table
 3) Apply patch and revisit the page to see the proper error message given
Comment 3 David Nind 2022-09-07 20:17:11 UTC
Created attachment 140326 [details] [review]
Bug 31516: Add error message for viewing enrollments for a non-existent club

To test:
 1) Go to non-existent club's enrollment page, e.g.
    http://localhost:8081/cgi-bin/koha/clubs/club-enrollments.pl?id=1010101001000
 2) Notice the not fully filled header text and empty table
 3) Apply patch and revisit the page to see the proper error message given

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 Martin Renvoize (ashimema) 2022-09-12 16:14:20 UTC
Created attachment 140475 [details] [review]
Bug 31516: Add error message for viewing enrollments for a non-existent club

To test:
 1) Go to non-existent club's enrollment page, e.g.
    http://localhost:8081/cgi-bin/koha/clubs/club-enrollments.pl?id=1010101001000
 2) Notice the not fully filled header text and empty table
 3) Apply patch and revisit the page to see the proper error message given

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Martin Renvoize (ashimema) 2022-09-12 16:14:38 UTC
Trivial fix, Passing QA
Comment 6 Tomás Cohen Arazi (tcohen) 2022-09-12 19:42:34 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 7 Lucas Gass (lukeg) 2022-10-31 21:23:05 UTC
Backported to 22.05.x for upcoming 22.05.07 release
Comment 8 Victor Grousset/tuxayo 2022-11-20 00:35:22 UTC
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.

Nothing to document it seems, marking resolved.