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

Main b 21506 prime port update failure #14501

Merged
merged 12 commits into from
Jan 3, 2025

Conversation

brianmanley-caci
Copy link
Contributor

Agility ticket

INT PR

Summary

This story was created to handle the common error cases when updating the port for a service item. By the time I got around to working this story I realized that all the common error cases were already handle in the upstream story for updating the port (B-21505). This story will still be used for testing these error cases so the testing load on B-21505 isn't too high. Since there was no validation code needed for the port error handling we decided to use this story to update the port locations model to be readonly as this reflects the current business rules which weren't settled on until recently.

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

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: the functionality for ordering POEFSC and PODFSC service items does not yet exist. Therefore in order to test you will need to manually create either a POEFSC or PODFSC service item for a shipment.

  1. Create an INTL UB shipment as a customer (CONUS -> AK or AK -> CONUS)
  2. Manually create the mto_service_items table for the shipment: INSERT INTO mto_service_items ( id, mto_shipment_id, move_id, re_service_id, status, created_at, updated_at, approved_at ) VALUES ( uuid_generate_v4(), '8eeba537-bb40-4f58-a534-74ea9ff64590', '813b7a43-2e3f-42f3-8c4e-eca95390d5ca', '388115e8-abe9-441d-96cf-a39f24baa0a3', 'APPROVED'::service_item_status, NOW(), NOW(), NOW() );
  3. In the prime v3 api, call getMoveTaskOrder using the move_id for the service item you created in step 2. You will need the etag for the newly created service item for the next step.
  4. In the prime v1 api, call updateMTOServiceItem using a payload like this (adjust for you specific service item ID): { "id": "40b7e71a-6b03-4413-8601-dea694253ee3", "modelType": "UpdateMTOServiceItemInternationalPortFSC", "portCode": "ABC", "reServiceCode": "PODFSC" }
  5. Verify that you receive an error response like this: { "detail": "Unsupported port code (ABC): No port location found for port code ABC", "instance": "cffb4ea1-311b-4842-bdf3-bfad74e6f722", "title": "Validation Error", "invalidFields": {} }
  6. In the prime v1 api, call updateMTOServiceItem using a payload like this (if you're service item is for PODFSC, pass in POEFSC and vice versa): { "id": "af98b57c-f3dc-46c2-b12e-0e42ba221b02", "modelType": "UpdateMTOServiceItemInternationalPortFSC", "portCode": "PDX", "reServiceCode": "POEFSC" }
  7. Verify that you receive an error response like this: { "detail": "ID: af98b57c-f3dc-46c2-b12e-0e42ba221b02 is in a conflicting state POE Location can only be updated for service item POEFSC", "instance": "6c023056-221b-46bd-b1bb-c2e8cf0dd231", "title": "Conflict Error" }
  8. In the prime v1 api, call updateMTOServiceItem using a payload like this{ "id": "af98b57c-f3dc-46c2-b12e-0e42ba221b02", "modelType": "UpdateMTOServiceItemInternationalPortFSC", "portCode": "PDX", "reServiceCode": "IUBPK" }
  9. Verify that you receive an error response like this: { "title": "Validation Error", "instance": "bd14418a-b11f-4409-be69-26df3fc29c08", "detail": "reServiceCode in body should be one of [PODFSC POEFSC]" }

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

@danieljordan-caci danieljordan-caci left a comment

Choose a reason for hiding this comment

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

Matches up

@brianmanley-caci brianmanley-caci merged commit 8a3c33d into main Jan 3, 2025
42 of 43 checks passed
@brianmanley-caci brianmanley-caci deleted the MAIN-B-21506-Prime-Port-Update-Failure branch January 3, 2025 18:38
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.

4 participants