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

B 22227 #14698

Closed
wants to merge 22 commits into from
Closed

B 22227 #14698

wants to merge 22 commits into from

Conversation

r-mettler
Copy link
Contributor

@r-mettler r-mettler commented Jan 30, 2025

B-22227

Summary

The Prime API was not validating any addresses that the Prime enters like our City Finder tool does. This backlog adds in address validation checks in various endpoints for the Prime API.

Is there anything you would like reviewers to give additional scrutiny?

I think I got all of them, but is possible I missed an API or two that allows creating/updating of addresses. Please let me know if you find one.

Verification Steps for the Author

These are to be checked by the author.

  • Tested in the Experimental environment (for changes to containers, app startup, or connection to data stores)
  • Have the Agility acceptance criteria been met for this change?

Verification Steps for Reviewers

These are to be checked by a reviewer.

  • Has the branch been pulled in and checked out?
  • Have the BL acceptance criteria been met for this change?
  • Was the CircleCI build successful?
  • Has the code been reviewed from a standards and best practices point of view?

Setup to Run the Code

How to test

There are several endpoints that have been updated across the prime v1, prime v2, and prime v3 APIs. Here are the links to the swagger pages for quick access.

Prime V1
Prime V2
Prime V3

Access the PrimeV1 page and UpdateShipmentDestinationAddress and UpdateMTOShipmentAddress with valid and invalid address
Access the PrimeV2 page and CreateMTOShipment, UpdateMTOShipment with valid and invalid address
Access the PrimeV3 page and CreateMTOShipment, UpdateMTOShipment with valid and invalid address

For ease of use here is a template for the CreateMTOShipment endpoint where you can just modify the addresses:
TIP: There is a copy icon on the right side of the below box you can click so you don’t have to highlight it all then copy.

{
  "moveTaskOrderID": "8366f993-610a-4e12-994e-a24bad34f3fb",
  "requestedPickupDate": "2025-01-27",
  "primeEstimatedWeight": 4500,
  "customerRemarks": "handle with care",
  "agents": [
    {
      "firstName": "string",
      "lastName": "string",
      "email": "lS2ptUIaLqFAfL%aIaejqSH@-q5HBsWBkMUnxcmduiQaWKX3stwBIELyFJj6GWdy.UzpMweURRSVWxCxXCCWXAcVHPJy",
      "phone": "",
      "agentType": "RELEASING_AGENT"
    }
  ],
  "pickupAddress": {
    "streetAddress1": "123 Main Ave",
    "streetAddress2": "Apartment 9000",
    "city": "Swansea",
    "state": "IL",
    "postalCode": "62226",
    "country": "US",
    "county": "ST CLAIR",
    "isOconus": false
  },
  "secondaryPickupAddress": {
    "streetAddress1": "123 Main Ave",
    "streetAddress2": "Apartment 9000",
    "city": "Swansea",
    "state": "IL",
    "postalCode": "62226",
    "country": "US",
    "county": "ST CLAIR",
    "isOconus": false
  },
  "tertiaryPickupAddress": {
    "streetAddress1": "123 Main Ave",
    "streetAddress2": "Apartment 9000",
    "city": "Swansea",
    "state": "IL",
    "postalCode": "62226",
    "country": "US",
    "county": "ST CLAIR",
    "isOconus": false
  },
  "destinationAddress": {
    "streetAddress1": "123 Main Ave",
    "streetAddress2": "Apartment 9000",
    "city": "Swansea",
    "state": "IL",
    "postalCode": "62226",
    "country": "US",
    "county": "ST CLAIR",
    "isOconus": false
  },
  "secondaryDestinationAddress": {
    "streetAddress1": "123 Main Ave",
    "streetAddress2": "Apartment 9000",
    "city": "Swansea",
    "state": "IL",
    "postalCode": "62226",
    "country": "US",
    "county": "ST CLAIR",
    "isOconus": false
  },
  "tertiaryDestinationAddress": {
    "streetAddress1": "123 Main Ave",
    "streetAddress2": "Apartment 9000",
    "city": "Swansea",
    "state": "IL",
    "postalCode": "62226",
    "country": "US",
    "county": "ST CLAIR",
    "isOconus": false
  },
  "shipmentType": "HHG",
  "diversion": false,
  "pointOfContact": "string",
  "counselorRemarks": "counselor approved",
  "ppmShipment": {
    "expectedDepartureDate": "2025-01-27",
    "pickupAddress": {
      "streetAddress1": "123 Main Ave",
      "streetAddress2": "Apartment 9000",
      "city": "Swansea",
      "state": "IL",
      "postalCode": "62226",
      "country": "US",
      "county": "ST CLAIR",
      "isOconus": false
    },
    "secondaryPickupAddress": {
      "streetAddress1": "123 Main Ave",
      "streetAddress2": "Apartment 9000",
      "city": "Swansea",
      "state": "IL",
      "postalCode": "62226",
      "country": "US",
      "county": "ST CLAIR",
      "isOconus": false
    },
    "tertiaryPickupAddress": {
      "streetAddress1": "123 Main Ave",
      "streetAddress2": "Apartment 9000",
      "city": "Swansea",
      "state": "IL",
      "postalCode": "62226",
      "country": "US",
      "county": "ST CLAIR",
      "isOconus": false
    },
    "destinationAddress": {
      "streetAddress1": "123 Main Ave",
      "streetAddress2": "Apartment 9000",
      "city": "Swansea",
      "state": "IL",
      "postalCode": "62226",
      "country": "US",
      "county": "ST CLAIR",
      "isOconus": false
    },
    "secondaryDestinationAddress": {
      "streetAddress1": "123 Main Ave",
      "streetAddress2": "Apartment 9000",
      "city": "Swansea",
      "state": "IL",
      "postalCode": "62226",
      "country": "US",
      "county": "ST CLAIR",
      "isOconus": false
    },
    "tertiaryDestinationAddress": {
      "streetAddress1": "123 Main Ave",
      "streetAddress2": "Apartment 9000",
      "city": "Swansea",
      "state": "IL",
      "postalCode": "62226",
      "country": "US",
      "county": "ST CLAIR",
      "isOconus": false
    },
    "sitExpected": false,
    "estimatedWeight": 4200,
    "hasProGear": true,
    "proGearWeight": 0,
    "spouseProGearWeight": 0,
    "isActualExpenseReimbursement": false
  }
}

Frontend

  • There are no aXe warnings for UI.
  • This works in Supported Browsers and their phone views (Chrome, Firefox, Edge).
  • There are no new console errors in the browser devtools.
  • There are no new console errors in the test output.
  • If this PR adds a new component to Storybook, it ensures the component is fully responsive, OR if it is intentionally not, a wrapping div using the officeApp class or custom min-width styling is used to hide any states the would not be visible to the user.
  • This change meets the standards for Section 508 compliance.

Backend

Database

Any new migrations/schema changes:

  • Follows our guidelines for Zero-Downtime Deploys.
  • Have been communicated to #g-database.
  • Secure migrations have been tested following the instructions in our docs.

Screenshots

@r-mettler r-mettler self-assigned this Jan 30, 2025
@transcom transcom deleted a comment from robot-mymove Jan 30, 2025
@transcom transcom deleted a comment from robot-mymove Jan 31, 2025
@r-mettler r-mettler closed this Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1 participant