Skip to content

Instantly share code, notes, and snippets.

@gregblake
Last active June 5, 2019 16:41
Show Gist options
  • Select an option

  • Save gregblake/e366ea3b8e2ddac5f2aab8fc196f0230 to your computer and use it in GitHub Desktop.

Select an option

Save gregblake/e366ea3b8e2ddac5f2aab8fc196f0230 to your computer and use it in GitHub Desktop.
Date Validation Bug Fixes
  • Resolves an issue where validation errors would be applied incorrectly if the user's date range matched the team's date range. Here are the steps to recreate this issue in production:

    1. Create a team with the default dates, and a mentor.
    2. Add a team member with the default dates. It's possible to update the team.
    3. Click save a second time. It's not possible to update the team, because of the "must accommodate the date range" validation errors being applied incorrectly.
  • Resolves an issue when the user's dates overlapped with the team's dates. Here are the steps to recreate this issue in production:

    1. Create a team with the default dates.
    2. Add a team member with the default dates.
    3. Change the team member's end date to today (so it's before the team's default end date). It's not possible to update the team, because of the validation errors being applied where validation errors would be applied incorrectly.
  • Allows a user to be on the same team twice within the same quarter, so long as the user's date ranges don't overlap. This was changed a couple times on the PR, and I think we ended up with the same behavior that's currently on master. Which is good, because it should work for every territory (including Dallas).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment