[Bug 32505] New: Cannot search by dateofbirth in specified dateformat
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Bug ID: 32505 Summary: Cannot search by dateofbirth in specified dateformat Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: lucas@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com To recreate: 1. Set DefaultPatronSearchFields to include dateofbirth 2. Set dateformat to something besides iso. I am using mm/dd/yyyy. 3. Set a patron to have a dateofbirth 4. Search for them in your specified dateformat. For me "04/24/1980". It doesn't return your patron. 5. Try ISO format, "1980-04-24". It works. We should be able to find patrons in a search based on the dateformat specified. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Avery Campbell (Butte County Library (CA)) <acampbell@buttecounty.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |acampbell@buttecounty.net --- Comment #1 from Avery Campbell (Butte County Library (CA)) <acampbell@buttecounty.net> --- "We should be able to find patrons in a search based on the dateformat specified." +1 on this. Maybe even having a system preference that sets our locale dateformat (we use mm/dd but many areas use dd/mm and yyyy/mm/dd). mm/dd/yyyy or mm-dd-yyyy is our locale dateformat so staff are much more used to typing dates in this dateformat (especially since it was possible before our recent update to 22.05). -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Daniel Gaghan <daniel.gaghan@pueblolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |daniel.gaghan@pueblolibrary | |.org --- Comment #2 from Daniel Gaghan <daniel.gaghan@pueblolibrary.org> --- Yup we use DOB to search for patron so this is a big priority fix for us at PCCLD. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 LINDA WATSON <linda.watson@marionfl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |linda.watson@marionfl.org --- Comment #3 from LINDA WATSON <linda.watson@marionfl.org> --- We are also having the same issue at Marion County Public Library System after the update. Unable to search for date of birth with slashes. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression Depends on| |14874 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Avery Campbell (Butte County Library (CA)) from comment #1)
"We should be able to find patrons in a search based on the dateformat specified." +1 on this. Maybe even having a system preference that sets our locale dateformat (we use mm/dd but many areas use dd/mm and yyyy/mm/dd).
There already is a system preference to set the date format: DateFormat :) This has worked before, I am marking it as a regression. I am linking the original bug that added the feature, but I think maybe the patron search rewrite could be to blame for the problem as this was not a well known feature. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14874 [Bug 14874] Add ability to search for patrons by date of birth from checkout and patron quick searches -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 144922 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144922&action=edit Bug 32505: Restore patron search by formatted dob Prior to the rewrite of the patron searches (bug 30063 and friends) it was possible to search for a patron using their date of birth, formatted following the dateformat syspref. Now it only works if the date is iso formatted. This patch is providing a fix to restore the behaviour, but does not make it consistent. Only searching patrons by date of birth is fixed here, when we actually want to fix the problem for the REST API DT wrapper instead. Test plan: Search for patrons given their date of birth. You need to select "date of birth" in the "Search field" dropdown, or set it in DefaultPatronSearchFields. Note that the column filtering is still not working, but I guess it was the case already in older versions. Ideally we will need to have a "datatype" attribute passed to the the 'th' and retrieved from datatables.js to add this same trick and build the query appropriately. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart+koha@gmail. |ity.org |com CC| |jonathan.druart+koha@gmail. | |com Severity|minor |normal -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144922|0 |1 is obsolete| | --- Comment #6 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 144937 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144937&action=edit Bug 32505: Restore patron search by formatted dob Prior to the rewrite of the patron searches (bug 30063 and friends) it was possible to search for a patron using their date of birth, formatted following the dateformat syspref. Now it only works if the date is iso formatted. This patch is providing a fix to restore the behaviour, but does not make it consistent. Only searching patrons by date of birth is fixed here, when we actually want to fix the problem for the REST API DT wrapper instead. Test plan: Search for patrons given their date of birth. You need to select "date of birth" in the "Search field" dropdown, or set it in DefaultPatronSearchFields. Note that the column filtering is still not working, but I guess it was the case already in older versions. Ideally we will need to have a "datatype" attribute passed to the the 'th' and retrieved from datatables.js to add this same trick and build the query appropriately. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |32559 --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Jonathan Druart from comment #5)
Note that the column filtering is still not working, but I guess it was the case already in older versions. Ideally we will need to have a "datatype" attribute passed to the the 'th' and retrieved from datatables.js to add this same trick and build the query appropriately.
See bug 32559. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32559 [Bug 32559] Support formatted date for column filtering (DT) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Is this at the right level? I'm wondering if we aught to instead have this bound to a data type in the field name or something so it can be used more generically in the ajax driven datatables stuff. I have a vague recollection of trying this stuff in another bug that got stuck. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Carolyn Hughesman <chughesman@cclsny.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chughesman@cclsny.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |kyle@bywatersolutions.com |y.org | CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144937|0 |1 is obsolete| | --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 145096 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145096&action=edit Bug 32505: Restore patron search by formatted dob Prior to the rewrite of the patron searches (bug 30063 and friends) it was possible to search for a patron using their date of birth, formatted following the dateformat syspref. Now it only works if the date is iso formatted. This patch is providing a fix to restore the behaviour, but does not make it consistent. Only searching patrons by date of birth is fixed here, when we actually want to fix the problem for the REST API DT wrapper instead. Test plan: Search for patrons given their date of birth. You need to select "date of birth" in the "Search field" dropdown, or set it in DefaultPatronSearchFields. Note that the column filtering is still not working, but I guess it was the case already in older versions. Ideally we will need to have a "datatype" attribute passed to the the 'th' and retrieved from datatables.js to add this same trick and build the query appropriately. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 145135 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145135&action=edit Bug 32505: [ALT] Use column 'type' to pre-process search patterns This patch adds the option to pass 'type' at the 'column' definition level and then binds on that type to add date parsing to queries. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |In Discussion -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Could you take a quick look at my alternative patch Jonathan? If you disagree with it, then we can just drop it and revert the status to PQA, but I wanted to show my option at the datatables.js level. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Passed QA --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Ack, ignore that.. this is about the left side search, not the column filters.. dropping my patch and reverting to PQA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #145135|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Suzanne <smhodson123extra@yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |smhodson123extra@yahoo.com --- Comment #13 from Suzanne <smhodson123extra@yahoo.com> --- I'm not too familiar or understanding with what is happening with possible patches to fix this, but just want to put in my two cents that we would love to see this resolved, as we use it all the time to avoid duplicate accounts. We want to be able to search by birthday without having to select "Date of Birth" as the type of search and certainly in our preferred format of mm/dd/yyyy. It would be a great administrative preference for libraries to be able to enter the format they would like to use to search birthdays, including dash or slash or both. Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to 23.05.x for the next release -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Jacob O'Mara <jacob.omara@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|23.05.00 |23.05.00,22.11.02 released in| | Status|Pushed to master |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 --- Comment #15 from Jacob O'Mara <jacob.omara@ptfs-europe.com> --- Nice work, thanks everyone! Pushed to 22.11.x for the next release. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|23.05.00,22.11.02 |23.05.00,22.11.02,22.05.09 released in| | --- Comment #16 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 22.05.x for upcoming 22.05.09 release -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to oldstable |RESOLVED CC| |arthur.suzuki@biblibre.com --- Comment #17 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- This one conflicts a lot when trying to apply on 21.11.x. Won't backport. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |30310 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30310 [Bug 30310] Replace Moment.js with Day.js -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 --- Comment #18 from Lucas Gass <lucas@bywatersolutions.com> --- This actually depends on Bug 30310 which is not in 22.05.x, so this still does not work in 22.05.x. I can be blamed here for not testing thoroughly enough before backporting. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 --- Comment #19 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 147377 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147377&action=edit Bug 32505: Use moment.js for 22.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 --- Comment #20 from Lucas Gass <lucas@bywatersolutions.com> --- I added a patch that will work with 22.05.x and moment.js. If someone can give me a sign-off/QA I could get it in for 22.05.10. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|FIXED |--- Status|RESOLVED |REOPENED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Andrew Fuerste-Henry <andrewfh@dubcolib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrewfh@dubcolib.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 --- Comment #21 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Lucas Gass from comment #20)
I added a patch that will work with 22.05.x and moment.js. If someone can give me a sign-off/QA I could get it in for 22.05.10.
Why don't you use .format("YYYY-MM-DD")? I think it would be better to fix date_to_rfc3339 to avoid future backports to fail like this one. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 --- Comment #22 from Lucas Gass <lucas@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #21)
(In reply to Lucas Gass from comment #20)
I added a patch that will work with 22.05.x and moment.js. If someone can give me a sign-off/QA I could get it in for 22.05.10.
Why don't you use .format("YYYY-MM-DD")? I think it would be better to fix date_to_rfc3339 to avoid future backports to fail like this one.
By backporting Bug 30310? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Needs Signoff |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |33132 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33132 [Bug 33132] Searching by DOB still broken in 22.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|33132 | --- Comment #23 from Lucas Gass <lucas@bywatersolutions.com> --- I am filed Bug 33132 to address this for oldstable Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33132 [Bug 33132] Searching by DOB still broken in 22.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 George Williams (NEKLS) <george@nekls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |george@nekls.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32505 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=34226 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org