Bug 31516 - Missing error handling for accessing deleted/non-existent club enrollment
Summary: Missing error handling for accessing deleted/non-existent club enrollment
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Joonas Kylmälä
QA Contact: Martin Renvoize
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-02 18:43 UTC by Joonas Kylmälä
Modified: 2022-11-20 00:35 UTC (History)
6 users (show)

See Also:
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


Attachments
Bug 31516: Add error message for viewing enrollments for a non-existent club (1.63 KB, patch)
2022-09-02 18:48 UTC, Joonas Kylmälä
Details | Diff | Splinter Review
Bug 31516: Add error message for viewing enrollments for a non-existent club (1.57 KB, patch)
2022-09-02 18:52 UTC, Joonas Kylmälä
Details | Diff | Splinter Review
Bug 31516: Add error message for viewing enrollments for a non-existent club (1.62 KB, patch)
2022-09-07 20:17 UTC, David Nind
Details | Diff | Splinter Review
Bug 31516: Add error message for viewing enrollments for a non-existent club (1.69 KB, patch)
2022-09-12 16:14 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 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 2022-09-12 16:14:38 UTC
Trivial fix, Passing QA
Comment 6 Tomás Cohen Arazi 2022-09-12 19:42:34 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 7 Lucas Gass 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.