Bug 39903

Summary: Catalog details page emits error if librarian cannot moderate comments on the record
Product: Koha Reporter: Kyle M Hall (khall) <kyle>
Component: Staff interfaceAssignee: Kyle M Hall (khall) <kyle>
Status: Pushed to stable --- QA Contact: Marcel de Rooy <m.de.rooy>
Severity: minor    
Priority: P5 - low CC: cbrannon, gmcharlt, lucas, m.de.rooy
Version: unspecifiedKeywords: release-notes-needed
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
25.11.00,25.05.01
Circulation function:
Attachments: Bug 39903: Catalog details page emits error if librarian cannot moderate comments on the record
Bug 39903: Catalog details page emits error if librarian cannot moderate comments on the record
Bug 39903: Catalog details page emits error if librarian cannot moderate comments on the record
Bug 39903: Catalog details page emits error if librarian cannot moderate comments on the record

Description Kyle M Hall (khall) 2025-05-14 14:44:37 UTC
If a librarian cannot moderate comments and a bib has comments, the error "Something went wrong when loading the table." will pop up during the page load.
Comment 1 Kyle M Hall (khall) 2025-05-14 14:47:01 UTC
Created attachment 182454 [details] [review]
Bug 39903: Catalog details page emits error if librarian cannot moderate comments on the record

If a librarian cannot moderate comments and a bib has comments, the error "Something went wrong when loading the table." will pop up during the page load.

Test Plan:
1) Add a comment to a record
2) Log in to the staff interface with a librarian that cannot moderate
   comments
3) Browse to the "Normal" view for that record
4) Note the error message
5) Apply this patch
6) Reload the page
7) No error!
Comment 2 Christopher Brannon 2025-05-14 15:00:16 UTC
*** Bug 39702 has been marked as a duplicate of this bug. ***
Comment 3 Owen Leonard 2025-05-14 15:10:37 UTC
Created attachment 182456 [details] [review]
Bug 39903: Catalog details page emits error if librarian cannot moderate comments on the record

If a librarian cannot moderate comments and a bib has comments, the
error "Something went wrong when loading the table." will pop up during
the page load.

Test Plan:
1) Add a comment to a record
2) Log in to the staff interface with a librarian that cannot moderate
   comments
3) Browse to the "Normal" view for that record
4) Note the error message
5) Apply this patch
6) Reload the page
7) No error!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 4 Biblibre Sandboxes 2025-05-14 17:50:19 UTC
Created attachment 182462 [details] [review]
Bug 39903: Catalog details page emits error if librarian cannot moderate comments on the record

If a librarian cannot moderate comments and a bib has comments, the
error "Something went wrong when loading the table." will pop up during
the page load.

Test Plan:
1) Add a comment to a record
2) Log in to the staff interface with a librarian that cannot moderate
   comments
3) Browse to the "Normal" view for that record
4) Note the error message
5) Apply this patch
6) Reload the page
7) No error!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Christopher <cbrannon@cdalibrary.org>
Comment 5 Christopher Brannon 2025-05-14 17:51:07 UTC
Works as described.  Thank you!
Comment 6 Marcel de Rooy 2025-06-13 07:20:53 UTC
Created attachment 183226 [details] [review]
Bug 39903: Catalog details page emits error if librarian cannot moderate comments on the record

If a librarian cannot moderate comments and a bib has comments, the
error "Something went wrong when loading the table." will pop up during
the page load.

Test Plan:
1) Add a comment to a record
2) Log in to the staff interface with a librarian that cannot moderate
   comments
3) Browse to the "Normal" view for that record
4) Note the error message
5) Apply this patch
6) Reload the page
7) No error!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Christopher <cbrannon@cdalibrary.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 7 Lucas Gass (lukeg) 2025-06-23 15:53:00 UTC
Nice work everyone!

Pushed to main for 25.11
Comment 8 Paul Derscheid 2025-06-24 09:31:14 UTC
Nice work everyone!

Pushed to 25.05.x for 25.05.03