stable
Clone or download
This closes request #29610 Importing artifact CSV content with datetimes using - throw a PHP fatal error Given a CSV file used to import artifacts, if I define artifact date content with datetimes using ```-``` as separator, then a PHP fatal error is thrown. Please note that the date format well supported by our CSV export/import tool is either ```dd/mm/YYYY``` or ```mm/dd/YYYY```. Using ```YYYY-mm-dd``` must not throw any fatal error, but it's handled at best effort. How to test ----------- * Export artifact in CSV with at least a date field (not submitted on) * Edit this value to use the format ```YYYY-mm-dd``` for a date with time (for instance 2022-11-14 17:32) * Import this edited CSV file => No fatal error must be thrown. The value is handled at best effort. Change-Id: Iea3c1fd7ac2d694bdb0fad3d4f36fdf6aaaf503b
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_Date.php | +17 | −2 | Go to diff View file |
M | plugins/tracker/tests/unit/Tracker/FormElement/Tracker_FormElement_Field_DateTest.php | +3 | −2 | Go to diff View file |