Bugzilla – Attachment 170571 Details for
Bug 37542
Patron search is incorrectly parsing entries as dates and fetching the wrong patron if dateofbirth in search fields
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37542: Fix patron search when dateofbirth is a DefaultPatronSearchField
Bug-37542-Fix-patron-search-when-dateofbirth-is-a-.patch (text/plain), 1.59 KB, created by
Brendan Lawlor
on 2024-08-21 16:01:39 UTC
(
hide
)
Description:
Bug 37542: Fix patron search when dateofbirth is a DefaultPatronSearchField
Filename:
MIME Type:
Creator:
Brendan Lawlor
Created:
2024-08-21 16:01:39 UTC
Size:
1.59 KB
patch
obsolete
>From 6bda91806dd8d9593a76e9d17de2188d79c02830 Mon Sep 17 00:00:00 2001 >From: Brendan Lawlor <blawlor@clamsnet.org> >Date: Wed, 21 Aug 2024 15:52:24 +0000 >Subject: [PATCH] Bug 37542: Fix patron search when dateofbirth is a > DefaultPatronSearchField > >This patch updates the call to dayjs to use strict parsing for patron search. See https://day.js.org/docs/en/parse/string-format > >To test: >1. Create a patron with dateofbirth 1994-07-27 >2. Add dateofbirth to DefaultPatronSearchFields >3. In patron or checkout search, type a cardnumber like '2908800092528' >4. Note the patron with that birth date is found in autocomplete >5. Apply patch and restart_all >6. Repeat step 3 and notice the patron is no longer found >7. In patron or checkout search, try searches using a formatted date >8. Confirm searches for '07/27/1994' and '1994-07-27' find the patron >--- > koha-tmpl/intranet-tmpl/prog/en/includes/js-date-format.inc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/js-date-format.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/js-date-format.inc >index b9ef294f96..bce0620c48 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/js-date-format.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/js-date-format.inc >@@ -91,7 +91,7 @@ > > window.$date_to_rfc3339 = function(value, options) { > var dateformat = (options&&options.dateformat)||def_date_format; >- let m = dayjs(value, get_date_pattern(dateformat)); >+ let m = dayjs(value, get_date_pattern(dateformat), true); > return m.format("YYYY-MM-DD"); > } > >-- >2.39.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 37542
:
170571
|
170609