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-21657 - Prime request service items ppm #14541

Merged
merged 5 commits into from
Jan 8, 2025

Conversation

MInthavongsay
Copy link
Contributor

B-21657

INT PR

Summary

This PR introduces another validation layer to the Prime operationId: createMTOServiceItem API (version 1) to exclude operation for PPM shipments. Service response will return 422 code indicating shipment type PPM is not allowable.

this article explains more about the approach used.

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

Note: operationId: createMTOServiceItem API is only at version 1. Changes were also applied to version 2 and version 3 handlers to ensure the changes are cascaded to all potential API versions.

  1. Login as customer and onboard/submit a move containing both HHG and PPM. For each use postal code 62226 for all pickup addresses and 02542 for all destination addresses. This is to ensure the entire workflow will be associated to the AGFM GBLOC.
  2. Login as New Service Counselor for AGFM. Find move and submit move details.
  3. Login as TOO for AGFM. Select HHG and Approve selected to add service items.
  4. Login as Prime Sim for AGFM. Find move and Add Service Item for PPM. Verify ALL service item types are prevented from executing. Make sure to open web developer tool and capture JSON payload. Service Response must return 422 -- Error: Unprocessable Entity.
    Screenshot 2024-12-17 at 11 07 07 AM
  5. Goto http://primelocal:3000/swagger-ui/prime.html#/mtoServiceItem/createMTOServiceItem . Copy and paste JSON payload from step 4 and execute API. Verify response is 422:
    Screenshot 2024-12-17 at 11 08 04 AM
  6. Verify shipment types NOT PPM can still create service items from Prime via Prime Sim, Swagger, Postman ..etc...

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

Copy link
Contributor

@antgmann antgmann left a comment

Choose a reason for hiding this comment

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

Commits match, only difference in merge diffs are reordering a migration correctly and importing the errors package on pkg/models/mto_shipments.go

@r-mettler r-mettler merged commit c3d53aa into main Jan 8, 2025
42 checks passed
@r-mettler r-mettler deleted the B-21657-Prime-request-service-items-PPM branch January 8, 2025 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants