Bug 37882

Summary: Add classes to item statuses in SCO
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: Self checkoutAssignee: Nick Clemens (kidclamp) <nick>
Status: Failed QA --- QA Contact: Emily Lamancusa (emlam) <emily.lamancusa>
Severity: enhancement    
Priority: P5 - low CC: emily.lamancusa, lucas
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 37882: Add class for statuses to SCO module for holds and renewals
Bug 37882: Add class for statuses to SCO module for holds and renewals

Description Nick Clemens (kidclamp) 2024-09-10 11:37:52 UTC
For styling and customizing, it would be nice to have classes for more of the sco renewal and hold statuses
Comment 1 Nick Clemens (kidclamp) 2024-09-10 11:41:34 UTC
Created attachment 171246 [details] [review]
Bug 37882: Add class for statuses to SCO module for holds and renewals

This patch should have no visual impact, but will add several classes

To test:
1 - Place some holds and checkout items to a patron
    Ensure some items cannot renew, and set a hold with a library as
    pickup location, then unset library as a location in Library admin page
2 - View their record in sco
3 - Apply patch
4 - 'Finish' and start a new SCO session as same user
5 - No visual difference
6 - Inspect issues/hold to see if new psans are present
Comment 2 Lucas Gass (lukeg) 2024-09-10 15:59:49 UTC
Created attachment 171262 [details] [review]
Bug 37882: Add class for statuses to SCO module for holds and renewals

This patch should have no visual impact, but will add several classes

To test:
1 - Place some holds and checkout items to a patron
    Ensure some items cannot renew, and set a hold with a library as
    pickup location, then unset library as a location in Library admin page
2 - View their record in sco
3 - Apply patch
4 - 'Finish' and start a new SCO session as same user
5 - No visual difference
6 - Inspect issues/hold to see if new psans are present

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 3 Lucas Gass (lukeg) 2024-09-10 16:01:17 UTC
Thanks Nick, these patches are tremendously helpful for styling/changing text of certain error messages.
Comment 4 Emily Lamancusa (emlam) 2024-12-17 17:13:22 UTC
Ooh, this is a great addition!

Since this is a string patch that is partly for users, I am going to nitpick the strings a bit, though...

Do the classes need to exactly match the reason codes passed to the template? If not, I'd argue for the following changes for better consistency:

1. The classes should match our vocabulary conventions (for example, toomanyholdstoday instead of toomanyreservestoday)

2. Consistent use of underscores in class names

These don't have to be a blocker if there's a good reason to keep it as-is, but if we can have more consistency that will make it easier for users to write their own customizations, then I think we should. Setting to FQA for feedback.