Skip to content

[Bug]: endDayOfYear automatically set as "-31" for specific cases of verbatimEventDate #412

Open
@aidan-houlihan

Description

@aidan-houlihan

Contact Details

ah3789@drexel.edu

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.

Screenshot 2023-10-27 at 11 08 55

Screenshot 2023-10-30 at 10 58 08

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:

  1. "Oct 1 to 2 2023"
  2. "Oct 1 to Oct 2 2023"
  3. "x-1 to x-2 2023"
  4. "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.

Ecdysis_date_bug.mov

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions