[Bug 27768] New: Saving an item with an invalid dateaccessioned or replacementpricedate throws
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27768 Bug ID: 27768 Summary: Saving an item with an invalid dateaccessioned or replacementpricedate throws Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: phil@chetcolibrary.org QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl Steps to reproduce: 1. Edit any item, change either the "d - Date acquired" or "w - Price effective from" to anything not-a-date (I like 24.99, due to mispasting Replacement price into Price effective from 2. Save the record Actual result: Invalid value passed, items.replacementpricedate=2 expected type is date at /usr/share/perl5/Exception/Class/Base.pm line 88 You can hit Back in the browser to go back and fix it, assuming you know what an items.replacementpricedate is or have an English speaker handy to tell you it's the Дата, для якої чинна ціна заміни. Expected result: Human readable message in a popup or in the page itself, giving the name of the field in the editor, rather than the name of the field in the database -- 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=27768 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Saving an item with an |Saving an item with an |invalid dateaccessioned or |invalid dateaccessioned or |replacementpricedate throws |replacementpricedate throws | |no helpful error --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I haven't been able to replicate the problem on 21.05/master, but when you enter an invalid date there is no error at all now. The date widget only shows for $d Date acquired, but it would be nice if it showed for the other fields as well. Maybe we could detect the data type in the database or we could add an option to the frameworks to say "is a date". Instead when you open the record again, it shows as 0000-00-00. So there are still some changes needed to have a helpful error message. -- 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=27768 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Current master as of today: Trying to save 24.99 does no longer work. Trying to save free text like 'test' does not work. An empty field results in date of today in record (no problem). But unfortunately I can still get 0000-00-00 into my records by entering 0000-00-00 into the date field. It is displayed by the date picker as 00-1-11-30 (meaning: November 30 of year -1 ??) but gets stored as 0000-00-00. Also note: I can also save 0000-01-01. Or 0001-01-01, 0002-02-01, etc. Years like 0001 are displayed in the date picker as 1901 ? -- 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=27768 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=29815 -- 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=27768 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=29958 -- 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=27768 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also|https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=29815 | -- 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=27768 --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Marcel de Rooy from comment #2)
Current master as of today:
Trying to save 24.99 does no longer work. Trying to save free text like 'test' does not work.
An empty field results in date of today in record (no problem).
But unfortunately I can still get 0000-00-00 into my records by entering 0000-00-00 into the date field. It is displayed by the date picker as 00-1-11-30 (meaning: November 30 of year -1 ??) but gets stored as 0000-00-00.
Also note: I can also save 0000-01-01. Or 0001-01-01, 0002-02-01, etc. Years like 0001 are displayed in the date picker as 1901 ?
https://github.com/flatpickr/flatpickr/issues/1524 -- 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=27768 --- Comment #4 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Marcel de Rooy from comment #2)
But unfortunately I can still get 0000-00-00 into my records by entering 0000-00-00 into the date field. It is displayed by the date picker as 00-1-11-30 (meaning: November 30 of year -1 ??) but gets stored as 0000-00-00.
I don't recreate that, I am getting a 500 with Invalid value passed, dateaccessioned=00-1-11-30 expected type is date at /usr/share/perl5/Exception/Class/Base.pm line 88 -- 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=27768 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #4)
I don't recreate that, I am getting a 500 with
Invalid value passed, dateaccessioned=00-1-11-30 expected type is date at /usr/share/perl5/Exception/Class/Base.pm line 88
Set sql mode to 0. Assuming that this still is the case for a regular install. -- 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=27768 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Saving an item with an |Flatpickr allows entering |invalid dateaccessioned or |invalid dates |replacementpricedate throws | |no helpful error | -- 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=27768 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Flatpickr allows entering |Flatpickr allows entering |invalid dates |invalid dates (from | |cataloguing plugin | |dateaccessioned.pl) -- 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=27768 --- Comment #6 from Phil Ringnalda <phil@chetcolibrary.org> --- What I filed this on, the case where you have a date field for items which doesn't use the dateaccessioned plugin, is unchanged. You can enter a non-date, and we throw an unhelpful error. "Flatpickr doesn't let you enter an invalid date unless you work really hard at it" only answers that issue if instead of making its use a default (that can be changed), only in new installs, we make item date fields the only bib framework fields where you cannot change the plugin used. -- 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=27768 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #7 from Lucas Gass <lucas@bywatersolutions.com> --- Does Bug 33703 prevent you from being able to directly enter an invlaid date? -- 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=27768 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=36488 -- 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=27768 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE Status|NEW |RESOLVED --- Comment #8 from Phil Ringnalda <phil@chetcolibrary.org> --- And look at us, we're doing comment 6 in bug 37398 *** This bug has been marked as a duplicate of bug 37398 *** -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org