Summary: | Add visual indicator that bookings are expired | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
Component: | Staff interface | Assignee: | Paul Derscheid <paul.derscheid> |
Status: | RESOLVED FIXED | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | gmcharlt, lucas, martin.renvoize, paul.derscheid |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This enhancement adds a visual indicator for expired bookings in the bookings table by displaying a status column with 'Expired' and 'Active' labels, making it easier to identify expired bookings when viewing or filtering them.
**Sponsored by** *Büchereizentrale Schleswig-Holstein*
|
Version(s) released in: |
24.11.00
|
Circulation function: | bookings | ||
Bug Depends on: | 37141 | ||
Bug Blocks: | |||
Attachments: |
Bug 37574: Add visual indicator that bookings are expired
Bug 37574: (follow-up) disable ordering and searching on status column Bug 37574: Add visual indicator that bookings are expired Bug 37574: (follow-up) disable ordering and searching on status column Bug 37574: Add visual indicator that bookings are expired Bug 37574: (follow-up) disable ordering and searching on status column |
Description
Nick Clemens (kidclamp)
2024-08-06 11:45:13 UTC
Created attachment 170132 [details] [review] Bug 37574: Add visual indicator that bookings are expired Adds a status column to the table configuration that displays whether a booking is active or expired (at the moment). This column is conditionally shown in the 'Show Expired' state, meaning after expired bookings are loaded into the table. To test: 1) Create a couple booking for any item for a single patron. 2) Open a db shell with `koha-mysql <INSTANCE>` 3) Update one or two of the created bookings with: update bookings set start_date = '<date in the past>', end_date = '<date also in the past'> where booking_id = '<booking id of the booking you just created>'. 4) Go the the bookings tab of said item. 5) Click the 'Show Expired' option in the top left of the table. 6) Note that bookings are tagged with 'Expired' and 'Active'. 7) Repeat 5 and 6 for the bookings tab in the patron's details view. 8) Sign off. Note: the bootstrap classes for v5 are already included so they become colored once the patch is in. I'm getting an error when I try to reorder the table by status: ==> /var/log/koha/kohadev/plack-api-error.log <== [2024/08/07 14:14:59] [ERROR] GET /api/v1/bookings: unhandled exception (DBIx::Class::Exception)<<DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Unknown column 'me' in 'order clause' at /kohadevbox/koha/Koha/Objects.pm line 403>> Ah, thought that was client side. Will remove the 'orderable' property until there's a db column for it. Created attachment 170151 [details] [review] Bug 37574: (follow-up) disable ordering and searching on status column Created attachment 170159 [details] [review] Bug 37574: Add visual indicator that bookings are expired Adds a status column to the table configuration that displays whether a booking is active or expired (at the moment). This column is conditionally shown in the 'Show Expired' state, meaning after expired bookings are loaded into the table. To test: 1) Create a couple booking for any item for a single patron. 2) Open a db shell with `koha-mysql <INSTANCE>` 3) Update one or two of the created bookings with: update bookings set start_date = '<date in the past>', end_date = '<date also in the past'> where booking_id = '<booking id of the booking you just created>'. 4) Go the the bookings tab of said item. 5) Click the 'Show Expired' option in the top left of the table. 6) Note that bookings are tagged with 'Expired' and 'Active'. 7) Repeat 5 and 6 for the bookings tab in the patron's details view. 8) Sign off. Note: the bootstrap classes for v5 are already included so they become colored once the patch is in. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 170160 [details] [review] Bug 37574: (follow-up) disable ordering and searching on status column Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 170382 [details] [review] Bug 37574: Add visual indicator that bookings are expired Adds a status column to the table configuration that displays whether a booking is active or expired (at the moment). This column is conditionally shown in the 'Show Expired' state, meaning after expired bookings are loaded into the table. To test: 1) Create a couple booking for any item for a single patron. 2) Open a db shell with `koha-mysql <INSTANCE>` 3) Update one or two of the created bookings with: update bookings set start_date = '<date in the past>', end_date = '<date also in the past'> where booking_id = '<booking id of the booking you just created>'. 4) Go the the bookings tab of said item. 5) Click the 'Show Expired' option in the top left of the table. 6) Note that bookings are tagged with 'Expired' and 'Active'. 7) Repeat 5 and 6 for the bookings tab in the patron's details view. 8) Sign off. Note: the bootstrap classes for v5 are already included so they become colored once the patch is in. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 170383 [details] [review] Bug 37574: (follow-up) disable ordering and searching on status column Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Nice addition, all working as expected and doesn't block any future developments or cause any regressions. Passing QA, Thanks Paul! 1) Translatability This is in a .tt file, so we need the single underscore: + title: __("Status"), Fixed in a follow-up patch. I notice we have almost the same code in a .js as well, with the correct double underscore. Pushed for 24.11! Well done everyone, thank you! |