ucsd-ccbb / qiimp

Web application to collect metadata specifications from an experimenter and produce metadata input files with appropriate constraints
3 stars 7 forks source link

timestamp validation code is occasionally in error, if column format is changed from 'text'. #179

Open charles-cowart opened 5 years ago

charles-cowart commented 5 years ago

Amanda and I found the following:

If the user changes the default format of one or more cells in the collection_timestamp column from 'text' to a 'date-stamp' (Argentina(Spanish), US(English), etc.) an 'Invalid collection_timestamp' error will often appear when editing the cells afterward.

This occurs whether the cell's format has been changed either manually, or inadvertently from cutting and pasting a formatted column from another spreadsheet.

Specifically, using a freshly generated human stool template, if the user enters a valid date '2018-09-09' in the collection_timestamp column, an error message will not appear. If the same string is copied from another cell that's been formatted as a date stamp, the error will also not appear. However, if the value of this date-stamp-formatted cell is clicked and changed, the error will appear if the new value is of the form '2018-09-09', even though this is a valid value. The error will not appear if the new value is of the form '2018-09'.

As it is not really possible to force the user to paste special->text from other spreadsheets to a Qiimp template, it seems worthwhile to introduce new functionality into Qiimp. Specifically a user can upload a filled template back to Qiimp, and it would validate field formats, values, etc. using robust tooling such as Pandas, etc. Silent fixes, wizard-based dialogues, and error-messages would be produced as appropriate.

charles-cowart commented 5 years ago

In addition, error messages that currently prohibit the user to enter '2018-09-09' into the field can be relaxed into warning messages. This lets the user know there is a potential issue, but still allows them to enter the needed data for proper validation.