symbiota-docs
symbiota-docs copied to clipboard
[Bug]: endDayOfYear automatically set as "-31" for specific cases of verbatimEventDate
Contact Details
Symbiota portal name
Ecdysis
What happened?
When entering specific date formats in the verbatimEventDate field, a value of -31 is automatically entered into the endDayOfYear field in the Occurrence Editor. This occurs whether or not a valid eventDate has already been entered. This value remains when the record is saved, and appears in subsequent exports of the record.
Since the endDayOfYear field is hidden by default, it is not clear that anything is amiss. This issue occurs whether or not the endDayOfYear field is expanded during verbatimEventDate entry.
This was found when entering date ranges copied directly from entomological specimen labels (often used when recording specimens from Malaise traps or on labels for entire collecting trips). Our default workflow is to enter the initial date as the eventDate, and record the exact label text in the verbatimEventDate field without alteration in its format. These can encompass a host of date formats including abbreviations, Roman numerals, etc.
Through testing the following date range formats cause this issue:
- "Oct 1 to 2 2023"
- "Oct 1 to Oct 2 2023"
- "x-1 to x-2 2023"
- "x 1 to 2 2023"
Broadly, this seems to occur in any instance when "to" is used but the verbatimEventDate range format is not "YYYY-MM-DD to YYYY-MM-DD" or "DD Mon YYYY to DD Mon YYYY". For example, "a to b" gives -31. See below demonstration of automatic filling, and the retention of the -31 value after saving the record.
https://github.com/BioKIC/symbiota-docs/assets/67758412/c424a2a5-43dc-47f5-aee7-5a88e30a4b0e
This error does not occur if the field is imported to the collection, in that case, the endDayOfYear field is left blank.
What operational systems are you seeing the problem on?
MacOS
What browsers are you seeing the problem on?
Chrome