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

increase state character limit to 4 #7846

Merged
merged 2 commits into from
Nov 28, 2023
Merged

Conversation

ntheanh201
Copy link
Contributor

@ntheanh201 ntheanh201 commented Oct 24, 2023

Closes: #6983

Increase state character limit to 4


Which Traffic Control components are affected by this PR?

  • Traffic Portal

What is the best way to verify this PR?

  • Step 1: Go to Topology/Phys Locations
  • Step 2: Create/Update Phys Location (State can have max 4 characters)

If this is a bugfix, which Traffic Control versions contained the bug?

PR submission checklist

@@ -42,7 +42,7 @@ var FormPhysLocationController = function(physLocation, $scope, $location, formU
{ name: 'shortName', type: 'text', required: true, maxLength: 100 },
{ name: 'address', type: 'text', required: true, maxLength: 128 },
{ name: 'city', type: 'text', required: true, maxLength: 128 },
{ name: 'state', type: 'text', required: true, maxLength: 2 },
{ name: 'state', type: 'text', required: true, maxLength: 4 },
Copy link
Contributor

Choose a reason for hiding this comment

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

This should match the limitations set by the API - and currently there is no max length in the API. You might arbitrarily choose something huge like 255 but 5+ characters is actually totally valid and our front-end ought to model that more accurately.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we also set the limit in Traffic Ops API?

Copy link
Contributor

Choose a reason for hiding this comment

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

You could do that, but that would be a breaking API change which would necessitate an APIv6, deprecation strategy, and a plan on how to eventually migrate old data to the new, more restrictive format.

It'd be a lot less work to just eliminate the requirement altogether in the UI.

@ocket8888 ocket8888 added bug something isn't working as intended Traffic Portal v1 related to Traffic Portal version 1 low impact affects only a small portion of a CDN, and cannot itself break one labels Nov 1, 2023
@ocket8888 ocket8888 self-assigned this Nov 1, 2023
@mitchell852 mitchell852 merged commit c3febc9 into apache:master Nov 28, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working as intended low impact affects only a small portion of a CDN, and cannot itself break one Traffic Portal v1 related to Traffic Portal version 1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Increase State Character Limit
3 participants