Bugzilla – Attachment 163743 Details for
Bug 35559
Can't change the pickup date of holds on the last day of expiration
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35559: Correctly parse previous flatpickr date
Bug-35559-Correctly-parse-previous-flatpickr-date.patch (text/plain), 2.64 KB, created by
Emily Lamancusa (emlam)
on 2024-03-22 20:29:00 UTC
(
hide
)
Description:
Bug 35559: Correctly parse previous flatpickr date
Filename:
MIME Type:
Creator:
Emily Lamancusa (emlam)
Created:
2024-03-22 20:29:00 UTC
Size:
2.64 KB
patch
obsolete
>From 2714edbc85a5dc72d7b905b9af94b4a523882ac3 Mon Sep 17 00:00:00 2001 >From: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >Date: Sun, 24 Mar 2024 16:07:16 -0400 >Subject: [PATCH] Bug 35559: Correctly parse previous flatpickr date > >The Flatpickr configuration for futuredate and futuredateinclusive is >meant to allow the preexisting date, even if it is in the past, to avoid >data loss. As of Bug 30718 - Use flatpickr's alt option everywhere, >that incoming date is in yyyy-mm-dd format, not the configured >human-readable format, and needs to be parsed accordingly. > >To test: >1. Place 2 holds on the same bib, both with an expiration date set >2. Set the expiration date for one of the holds to a date in the past > (e.g., in Koha Testing Docker, use the commands: > ktd --shell > koha-mysql kohadev > to access the database directly) >3. Reload the holds tab for that bib >--> Note that the future expiration date will be editable, and the past > expiration date will not be editable >4. In a new tab, go to Administration > Patron Categories >5. Edit one patron category to have an enrolment period date in the future >6. Edit another patron category to have an enrolment period date in the > past (e.g. by accessing the database directly, as above) >7. Reload the Edit pages for each of the above categories (in new tabs) >--> Note that the future enrolment period date will be retained in the > date field, but the past enrolment period date will be blanked out >8. Apply this patchset >9. Refresh the holds tab from step 3 >--> Note that both expiration dates are now editable >10. Refresh the 2 patron category tabs from step 7 >--> Note that both enrolment dates are now retained correctly >11. Open the date picker on one of the date fields that has a past date >--> Note that other past dates, besides the existing date, are prevented >--- > koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >index a3d213675c..842422ab37 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >@@ -143,7 +143,7 @@ > || $(input).data("flatpickr-futuredate") === true ) { > let original_date = $(input).val(); > if ( original_date ) { >- original_date = Date_from_syspref( original_date ).getTime(); >+ original_date = flatpickr.parseDate(original_date, 'Y-m-d').getTime(); > let tomorrow = new Date().fp_incr(1).getTime(); > > options['enable'] = [function(date){ >-- >2.34.1
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 35559
:
159807
|
163742
|
163743
|
165909