Closed sgoodswen closed 8 years ago
Those two dates probably deliberately dealt as such given the example upload spreadsheet I see has vastly different, invalid date strings.
If put these two dates fields into their fields, they have to pass sanitation check. What do you want to happen if the check fails?
As discussed, the only acceptable format for the values entered in “sample-date” and “collection_date” should be Year-month-day e.g. 2016-03-31
When using the [Upload samples] option, an informative error should be displayed to the user if the dates entered for “sample-date” and “collection_date” are not in the required format.
Sometimes the user may not know the month and/or day. Is it possible to enter a 0 as a replacement value e.g. 2016-00-00 or 2016-03-00?
These two fields are date fields in database and I tested 2016-00-00 and 2016-03-00, both failed to convert. If we do not want to change model, user has to give a proper date string, aka a valid date.
@sgoodswen, my previous statement may not very accurate.
I need to double check with you: current code only puts those two date fields into note field when it sees invalid dates: year only, free text and etc. If they are valid, it puts into correct fields.
That's to say, it does not force data to be valid for these two fields. It also cannot violate database requirement. The work around is to put them into note.
Do you want to force user to enter valid dates?
Yes, we should force the user to enter valid dates e.g. Year-month-day with no 0 replacements
@sgoodswen could you please to test if this problem is fixed on dev?
This issue is fixed
The values in “sample-date” and “collection_date” of the Excel sheet are incorrectly appended to “samples notes” rather than their correct fields of “Sample date” and “Collection date”