Bugzilla – Attachment 154891 Details for
Bug 34634
Expiration date does not display on reserve/request.pl if date is today or in the past
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34634: Show expirationdate of expired holds on reserve/request.pl
Bug-34634-Show-expirationdate-of-expired-holds-on-.patch (text/plain), 2.68 KB, created by
Lucas Gass (lukeg)
on 2023-08-28 22:31:52 UTC
(
hide
)
Description:
Bug 34634: Show expirationdate of expired holds on reserve/request.pl
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2023-08-28 22:31:52 UTC
Size:
2.68 KB
patch
obsolete
>From 0cd9806c02c787f8cda479e489819862a3e2c024 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Mon, 28 Aug 2023 22:24:24 +0000 >Subject: [PATCH] Bug 34634: Show expirationdate of expired holds on > reserve/request.pl > >To test: >1. Place some holds and go to /reserve/request.pl for that bib. >2. If the reserves.expirationdate is set to today or some date in the past the date does not display in the Flatpickr instance. >3. Change the reserves.expirationdate to sometime in the future, the date displays. >4. Aply patch, restart_all >5. Try steps 2-3 again. >6. This time if the expiration date is in the past you should see it displayed. However it will be uneditable. >7. Make sure holds with a expiration date in the future can still be properly edited. >--- > koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc | 6 +++++- > reserve/request.pl | 3 ++- > 2 files changed, 7 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >index 3c116d0ace..035ee0aa06 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >@@ -129,7 +129,11 @@ > [% END %] > </td> > <td> >- <input type="text" class="flatpickr" data-flatpickr-futuredate="true" value="[% hold.expirationdate | html %]" size="10" name="expirationdate" /> >+ [% UNLESS hold.expired %] >+ <input type="text" class="flatpickr" data-flatpickr-futuredate="true" value="[% hold.expirationdate | html %]" size="10" name="expirationdate" /> >+ [% ELSE %] >+ <span class="expiredon"><label>Expired:</label> [% hold.expirationdate | $KohaDates %]</span> >+ [% END %] > </td> > <td> > [%- IF ( hold.found ) -%] >diff --git a/reserve/request.pl b/reserve/request.pl >index f9c51cb4a4..f9f18aa62f 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -610,8 +610,9 @@ if ( ( $findborrower && $borrowernumber_hold || $findclub && $club_hold ) > $reserve{'item_level_hold'} = 1; > } > } >- > $reserve{'expirationdate'} = $res->expirationdate; >+ $reserve{'expired'} = 1 >+ if ( DateTime->compare( dt_from_string( $res->expirationdate ), dt_from_string() ) == -1 ); > $reserve{'date'} = $res->reservedate; > $reserve{'borrowernumber'} = $res->borrowernumber(); > $reserve{'biblionumber'} = $res->biblionumber(); >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34634
:
154891
|
154899
|
154905