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

ui/wizard: fix wizard character limit #2515

Merged
merged 8 commits into from
Oct 13, 2022
Merged

ui/wizard: fix wizard character limit #2515

merged 8 commits into from
Oct 13, 2022

Conversation

tony-tvu
Copy link
Collaborator

  • Identified the issue which this PR solves.
  • Read the CONTRIBUTING document.
  • Code builds clean without any errors or warnings.
  • Added appropriate tests for any new functionality.
  • All new and existing tests passed.
  • Added comments in the code, where necessary.
  • Ran make check to catch common errors. Fixed any that came up.

Description:

  • This PR fixes the issue where a 64 character limit exceeded error occurred whenever users entered a name less than 64 characters but exceeded the limit whenever suffixes or timezones were appended.
  • Suffixes are no longer appended, i.e. "Service", "Escalation Policy", "Rotation"
  • "Primary" and "Secondary" keywords are appended only if a service has two schedules
  • Rotations that have Follow the Sun (FTS) support will have their timezones appended to the rotation's name. This solution was implemented to resolve Name: already in use errors whenever a schedule is created with FTS support that has a rotation with a timezone different than its original timezone, which resulted in two rotations with the same names sent to the backend.
  • Name length validation error messages are now customized based on user's needs. For example, if a user creates a service with one schedule without FTS, then they will see cannot be more than 64 characters error when they've exceeded the limit. If a user creates a service that has two schedules without FTS, then they will see cannot be more than 54 characters error since ' Secondary' is an additional 10 characters subtracted from 64. These scenarios are accounted for in this PR's cypress test.

Which issue(s) this PR fixes:
#2488

@stale
Copy link

stale bot commented Sep 20, 2022

This pull request has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot added the stale This is inactive label Sep 20, 2022
@stale stale bot removed the stale This is inactive label Oct 3, 2022
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Collaborator

@KatieMSB KatieMSB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Collaborator

@KatieMSB KatieMSB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unit tests ( app/wizard/util.test.js) for the wizard also need updated to reflect the new expected output

@tony-tvu tony-tvu requested a review from KatieMSB October 10, 2022 20:58
@Forfold Forfold merged commit cf558d6 into master Oct 13, 2022
@Forfold Forfold deleted the wizard-char-limit branch October 13, 2022 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants