Skip to content

Editor: Schedule Exception dates not validated properly #561

@landonreed

Description

@landonreed

Observed behavior (please include a screenshot if possible)

When creating schedule exceptions in the Editor, the validation check for duplicate dates will only check against dates for exceptions that have been fully loaded in the UI (i.e., a GraphQL fetch has been performed for an individual schedule exception entity). So, it is very easy to create an exception with a duplicate date. Related: the server does not check that the date is duplicated before writing the update. Also shown in the screenshot, some pretty ugly formatting on the "New" button.

image

Expected behavior

When a schedule exception is being created, and a date is chosen (e.g., July 4th) that already has an exception defined (e.g., Independence Day), the duplicate date validation warning should be shown.

Steps to reproduce the problem

  1. Start from scratch in Editor
  2. Create exception for Independence Day. Set day to July 4th. Save.
  3. Deselect exception. Reload page.
  4. Create new exception for July 4th. Set day to July 4th. Save.

Step 4 should not be permitted to happen.

Any special notes on configuration used

N/A

Version of datatools-ui and datatools-server if applicable (exact commit hash or branch name)

latest dev.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions