Summary: | Setting wrong dates on additional-contents.pl | ||
---|---|---|---|
Product: | Koha | Reporter: | Lucas Gass (lukeg) <lucas> |
Component: | Tools | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | normal | ||
Priority: | P5 - low | CC: | florian.bontemps, jonathan.druart, kyle, m.de.rooy, oleonard |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
21.11.00
|
|
Circulation function: | |||
Bug Depends on: | 28961 | ||
Bug Blocks: | |||
Attachments: |
Bug 29254: Fix date formatting on the additional contents form
Bug 29254: Fix date formatting on the additional contents form Bug 29254: Fix date formatting on the additional contents form |
Description
Lucas Gass (lukeg)
2021-10-15 17:43:37 UTC
Apologies, I may have been too quick in blaming this on Flatpickr or Bug 28961. This may have more to do with Bug 24387. It does appear to be Flatpickr and date Formats. When the dateformat string that is passed to the Flatpickr config is set to 'Y-m-d' it properly sets the date. With all other date formats it sets a wrong date. Created attachment 126418 [details] [review] Bug 29254: Fix date formatting on the additional contents form We are sending ymd but flatpickr is expecting a 'dateformat' formatted date. Test plan: Create a new content, set a date, save, edit again => The date must be displayed correctly Here is our friend again: FAIL koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt FAIL valid_template Attempt to reload Koha/Template/Plugin/Branches.pm aborted. Compilation failed in require at /usr/lib/x86_64-linux-gnu/perl5/5.28/Template/Plugins.pm line 206. Created attachment 126422 [details] [review] Bug 29254: Fix date formatting on the additional contents form We are sending ymd but flatpickr is expecting a 'dateformat' formatted date. Test plan: Create a new content, set a date, save, edit again => The date must be displayed correctly Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Taking liberty to PQA in one pass Created attachment 126451 [details] [review] Bug 29254: Fix date formatting on the additional contents form We are sending ymd but flatpickr is expecting a 'dateformat' formatted date. Test plan: Create a new content, set a date, save, edit again => The date must be displayed correctly Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Adding my sign-off here for good measure. Works with all dateformat options. Thanks Jonathan and Marcel. Pushed to master for 21.11, thanks to everybody involved! *** Bug 29276 has been marked as a duplicate of this bug. *** |