[Bug 30717] New: Date format doesn't change in additem for dateaccessioned
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Bug ID: 30717 Summary: Date format doesn't change in additem for dateaccessioned Change sponsored?: --- Product: Koha Version: 21.11 Hardware: All OS: All Status: NEW Severity: critical Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: mengu@devinim.com.tr QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl Hi, After upgrade from 19.05 to 21.11.04 we got a problem with additem section. dateaccessioned area of additem doesn't seem correctly even we changed dateformat in systempreferences. I've removed the blank in the line var dateformat_pref = "[% Koha.Preference('dateformat') | html %]"; of calendar.inc -- 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=30717 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Date format doesn't change |Dates displayed in ISO |in additem for |format when editing items |dateaccessioned | CC| |jonathan.druart+koha@gmail. | |com Version|21.11 |unspecified Status|NEW |ASSIGNED Severity|critical |major Assignee|koha-bugs@lists.koha-commun |jonathan.druart+koha@gmail. |ity.org |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=30717 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |critical -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|critical |major --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- No data loss, that's not critical. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 134781 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134781&action=edit Bug 30717: Format dates when editing items This is a result of bug 29369 and bug 27526. Bug 29369 removed the format of the dates, and bug 27526 assumed that it was the correct behaviour. Here we don't want to let the controller know which fields is a date, or we will have to access the subfield structure to know which subfields have the "date cataloguing plugin". This patch suggests to use the altFormat options from flatpickr that will "Show the user a readable date (as per altFormat), but return something totally different to the server." It's actually an option we want to use for all our dates, that will reduce a lot the overhead in our controllers. Test plan: Edit items (additem.pl and in batch) and confirm that the subfields using the dateaccessioned plugin are displayed according to the dateformat syspref. Make sure the date is stored correctly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com, oleonard@myacpl.org Keywords| |rel_21_11_candidate, | |rel_22_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=30718 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Mengu Yazicioglu <mengu@devinim.com.tr> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=30659 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 David Nind <david@davidnind.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=30717 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134781|0 |1 is obsolete| | --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 134797 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134797&action=edit Bug 30717: Format dates when editing items This is a result of bug 29369 and bug 27526. Bug 29369 removed the format of the dates, and bug 27526 assumed that it was the correct behaviour. Here we don't want to let the controller know which fields is a date, or we will have to access the subfield structure to know which subfields have the "date cataloguing plugin". This patch suggests to use the altFormat options from flatpickr that will "Show the user a readable date (as per altFormat), but return something totally different to the server." It's actually an option we want to use for all our dates, that will reduce a lot the overhead in our controllers. Test plan: Edit items (additem.pl and in batch) and confirm that the subfields using the dateaccessioned plugin are displayed according to the dateformat syspref. Make sure the date is stored correctly. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |BLOCKED --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- QAing -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134797|0 |1 is obsolete| | --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 134947 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134947&action=edit Bug 30717: Format dates when editing items This is a result of bug 29369 and bug 27526. Bug 29369 removed the format of the dates, and bug 27526 assumed that it was the correct behaviour. Here we don't want to let the controller know which fields is a date, or we will have to access the subfield structure to know which subfields have the "date cataloguing plugin". This patch suggests to use the altFormat options from flatpickr that will "Show the user a readable date (as per altFormat), but return something totally different to the server." It's actually an option we want to use for all our dates, that will reduce a lot the overhead in our controllers. Test plan: Edit items (additem.pl and in batch) and confirm that the subfields using the dateaccessioned plugin are displayed according to the dateformat syspref. Make sure the date is stored correctly. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 134948 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134948&action=edit Bug 30717: (QA follow-up) Move to module We will probably use this a bit more :) Let's put it in a module (with a trivial test). Test plan: Repeat item edit. Run t/DateUtils.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- QA tools gives a false negative: FAIL Koha/DateUtils.pm OK critic OK forbidden patterns OK git manipulation OK pod OK pod coverage SKIP spelling FAIL valid Subroutine flatpickr_date_form -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Took me bit to figure out this qa tools warn, but this is the cause: perl -cw outputs: $VAR1 = 'Subroutine dt_from_string redefined at Koha/DateUtils.pm line 58. Subroutine output_pref redefined at Koha/DateUtils.pm line 269. Subroutine format_sqldatetime redefined at Koha/DateUtils.pm line 360. Subroutine flatpickr_date_format redefined at Koha/DateUtils.pm line 392. Koha/DateUtils.pm syntax OK '; The line Subroutine flatpickr_date_format redefined at Koha/DateUtils.pm line 392. goes thru the following regex: s/at .* line .*$// for @errors; And this regex is too generic. It already the last two letters at from the subroutine name! So it leaves: Subroutine flatpickr_date_form Which is no longer removed by the redefined regex.. s/^Subroutine .* redefined $// for @errors; Since redefined was already eaten. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 --- Comment #9 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, thanks to everybody involved 🦄 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_22_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 --- Comment #10 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Marcel de Rooy from comment #8)
Took me bit to figure out this qa tools warn, but this is the cause:
perl -cw outputs: $VAR1 = 'Subroutine dt_from_string redefined at Koha/DateUtils.pm line 58. Subroutine output_pref redefined at Koha/DateUtils.pm line 269. Subroutine format_sqldatetime redefined at Koha/DateUtils.pm line 360. Subroutine flatpickr_date_format redefined at Koha/DateUtils.pm line 392. Koha/DateUtils.pm syntax OK ';
The line Subroutine flatpickr_date_format redefined at Koha/DateUtils.pm line 392. goes thru the following regex: s/at .* line .*$// for @errors; And this regex is too generic. It already the last two letters at from the subroutine name! So it leaves: Subroutine flatpickr_date_form Which is no longer removed by the redefined regex.. s/^Subroutine .* redefined $// for @errors; Since redefined was already eaten.
Please report when you find bugs :) See https://gitlab.com/koha-community/qa-test-tools/-/issues/60 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nayema@mes.ac.in --- Comment #11 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- *** Bug 30659 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arthur.suzuki@biblibre.com, | |victor@tuxayo.net --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi, I think this still needs backporting as it was reported against 21.11.04? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |courtenay.johnson@gmail.com --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- *** Bug 30361 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable --- Comment #14 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- pushed to 21.11.x for 21.11.07, thx! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.05.00 |22.05.00, 21.11.07 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |29369 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29369 [Bug 29369] Use Flatpickr in dateaccessioned cataloging plugin -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |27526 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27526 [Bug 27526] Remove Mod/AddItemFromMarc from additem.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting --- Comment #15 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Missing dependencies for 21.05.x, it shouldn't be affected, no backport. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 --- Comment #16 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 137613 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137613&action=edit Bug 30717: Fix selenium tests Error while executing command: element not interactable: Element <input id="tag_952_subfield_w_810691" class="input_marceditor items.replacementpricedate noEnterSubmit flatpickr-input" name="items.replacementpricedate" type="hidden"> is not reachable by keyboard at /usr/share/perl5/Selenium/Remote/Driver.pm line 411. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_21_11_candidate |additional_work_needed --- Comment #17 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- No idea why this is not failing on 21.11 but git bisect led me to this bug. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 --- Comment #18 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Hum, we released 22.05 since this. Moving to its own bug report. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #137613|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=30717 Jonathan Druart <jonathan.druart+koha@gmail.com> 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=30717 --- Comment #19 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Selenium fix moved to bug 31139. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=31139 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=33345 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=33414 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |30540 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30540 [Bug 30540] Double processing invalid dates can lead to ISE -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |36432 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36432 [Bug 36432] Remove circular dependency from Koha::Object -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717 Bug 30717 depends on bug 36432, which changed state. Bug 36432 Summary: Remove circular dependency from Koha::Object https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36432 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org