Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor: Schedule Exception dates not validated properly #561

Closed
landonreed opened this issue Apr 22, 2020 · 0 comments
Closed

Editor: Schedule Exception dates not validated properly #561

landonreed opened this issue Apr 22, 2020 · 0 comments
Labels

Comments

@landonreed
Copy link
Contributor

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.

@landonreed landonreed added the bug label Apr 22, 2020
landonreed added a commit that referenced this issue Apr 23, 2020
This allows us to do better UI-side validation of whether there are duplicate dates in the
exceptions

re #561
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant