When editing items that are date or datetime formatted without the dateaccessioned cataloging plugin it is quite easy to cause an error. To recreate: 1. Make sure some 952 field with dates (datelastseen, dateaccessioned ) are visible in the editor but make sure the dateaccessiond plugin is turned off. 2. Set the date format system preference to mm/dd/yyyy 3. Edit an item and attempt to edit one of the date fields to something in the correct dateformat, like 11/11/2018. 4. You get an error as Koha is expecting the SQL date type format of YYYY-MM-DD. I'm not sure how to best solve this. My first thought is that we should require the dateaccessioned.pl plugin on date fields. Or we could add a hint about format?
It looks like we already added dateaccessioned.pl to $w, so we could probably also add it to datelastseen? Just wondering, if that could cause problems with bug 31212 925 - tagfield: "952" 926 tagsubfield: "w" 927 liblibrarian: "Price effective from" 928 libopac: "Price effective from" 929 repeatable: 0 930 mandatory: 0 931 kohafield: items.replacementpricedate 932 tab: 10 933 authorised_value: "" 934 authtypecode: "" 935 value_builder: dateaccessioned.pl 936 isurl: 0 937 hidden: 0 938 frameworkcode: "" 939 seealso: "" 940 link: "" 941 defaultvalue:
Created attachment 146373 [details] [review] Bug 32168: Add dateaccessioned.pl to 952 (datelastseen) for new installs
> Just wondering, if that could cause problems with bug 31212 Yes, I am running into this problem while working on 31212.
My patch enables dateaccessioned.pl by default with 952$r but should we also do the same for other date fields?