[Bug 31149] New: Use dayjs to parse dates
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31149 Bug ID: 31149 Summary: Use dayjs to parse dates Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart+koha@gmail.com QA Contact: testopia@bugs.koha-community.org Depends on: 30310 We don't need our own JS functions to parse date, we can rely on dayjs for that. 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 the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31149 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=30673 -- 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=31149 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=31149 --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 137680 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137680&action=edit Bug 31149: Use dayjs to parse dates We can use the isValid's dayjs function instead of our own parsing functions. Test plan: Confirm that you cannot enter an invalid date when using a date picker widget. -- 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=31149 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| |martin.renvoize@ptfs-europe | |.com, oleonard@myacpl.org, | |tomascohen@gmail.com -- 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=31149 Paul Derscheid <paul.derscheid@lmscloud.de> 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=31149 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #137680|0 |1 is obsolete| | --- Comment #2 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 144680 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144680&action=edit Bug 31149: Use dayjs to parse dates We can use the isValid's dayjs function instead of our own parsing functions. Test plan: Confirm that you cannot enter an invalid date when using a date picker widget. Works as expected. Signed-off-by: LMSCloudPaulD <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31149 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144680|0 |1 is obsolete| | --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 144733 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144733&action=edit Bug 31149: Use dayjs to parse dates We can use the isValid's dayjs function instead of our own parsing functions. Test plan: Confirm that you cannot enter an invalid date when using a date picker widget. Works as expected. Signed-off-by: LMSCloudPaulD <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31149 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31149 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- This would be a PQA from me.. but we're blocked so marking as such. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31149 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |BLOCKED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31149 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|martin.renvoize@ptfs-europe | |.com | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31149 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31149 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144733|0 |1 is obsolete| | --- Comment #5 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 187511 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187511&action=edit Bug 31149: Use dayjs to parse dates We can use the isValid's dayjs function instead of our own parsing functions. Test plan: Confirm that you cannot enter an invalid date when using a date picker widget. Works as expected. Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31149 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|martin.renvoize@openfifth.c | |o.uk | --- Comment #6 from Jonathan Druart <jonathan.druart@gmail.com> --- This one got lost! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31149 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@openfifth.c | |o.uk 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=31149 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact| |martin.renvoize@openfifth.c | |o.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31149 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #7 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- It seems like calendar.js is not tidy -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31149 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #187511|0 |1 is obsolete| | --- Comment #8 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 187734 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187734&action=edit Bug 31149: Use dayjs to parse dates We can use the isValid's dayjs function instead of our own parsing functions. Test plan: Confirm that you cannot enter an invalid date when using a date picker widget. Works as expected. Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31149 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |25.11.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=31149 --- Comment #9 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31149 Pedro Amorim <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pedro.amorim@openfifth.co.u | |k --- Comment #10 from Pedro Amorim <pedro.amorim@openfifth.co.uk> --- This has broken the ILL list table, if it affects other tables, I don't know. Create an ILL request and visit the table, you get this: Uncaught TypeError: m.tz is not a function at window.$date (ill-requests.pl:1606:23) at render (ill-list-table_25.0600022.js:452:32) at Object._render (datatables.min_25.0600022.js:41:12213) at r.fnGetData (datatables.min_25.0600022.js:41:14938) Reset to the previous commit: git reset --hard 9f2216cf20584079bb3706b4d965d1e91e273016 Refresh, works fine. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31149 Pedro Amorim <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31149 --- Comment #11 from Pedro Amorim <pedro.amorim@openfifth.co.uk> --- Created attachment 187979 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187979&action=edit Bug 31149: Add dayjs plugins It seems dayjs is now being imported twice? With the second time overriding the first, but without the plugins. This patch "fixes" the issue by proving this, but there is likely a better solution than this copy-paste from js-date-format.inc -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31149 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | --- Comment #12 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- follow-up pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31149 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed --- Comment #13 from Jonathan Druart <jonathan.druart@gmail.com> --- Lucas, please revert this. The code has changed since I originally wrote it. It was wrong to switch it back to SO without fully tested it. I will have another look later, but I don't have time to deal with all the side-effects right now. I suspect the Cypress tests to fail because of this. You can also notice that flatpickr is broken right now ("Please enter a valid date (should match mm/dd/yyyy)") Sorry about that! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31149 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Failed QA --- Comment #14 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Reverted from main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31149 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|Failed QA |RESOLVED --- Comment #15 from Jonathan Druart <jonathan.druart@gmail.com> --- I think this is no longer needed, see bug 41061. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31149 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|25.11.00 | released in| | Keywords|additional_work_needed | Text to go in the| |REVERTED release notes| | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org