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 22692 #14954

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Main b 22692 #14954

wants to merge 13 commits into from

Conversation

brianmanley-caci
Copy link
Contributor

Agility ticket

INT PR

Summary

Feature E-06260 is for adding the ability for the Prime to send an acknowledgement date for moves and shipments. This story does the DB work to prepare for that capability. We are adding a new prime_acknowledged_at column to the moves and mto_shipments tables to store that prime acknowledgement value. We are also adding a new function to take in the acknowledgement data sent by the prime, validate it, and update the prime_acknowledged_at DB values accordingly.

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.

  • 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 build successful?
  • Has the code been reviewed from a standards and best practices point of view?

Setup to Run the Code

How to test

One note for testing. The prime_acknowledged_at column can only be populated once. For repeated testing make sure to null out the column values, or you'll just get stuck with the initial value you populated.

  1. Run the migrations.
  2. Verify that the new prime_acknowledged_at column is on the moves and mto_shipments tables and the proc is there. You can run
    SELECT * FROM information_schema.columns WHERE table_name in ('moves', 'mto_shipments') AND column_name = 'prime_acknowledged_at';
    , and
    SELECT * FROM pg_proc p JOIN pg_namespace n ON p.pronamespace = n.oid WHERE n.nspname = 'public' AND p.proname = 'prime_acknowledge_moves_shipments';
    , or you can just look for them in DBeaver like a normal person.
  3. In DBeaver grab some move and shipment data from the database that can be used to pass to the procedure. You'll just need the move IDs and shipment IDs.
    select m.id as move_id, ms.id as shipment_id, m.prime_acknowledged_at as move_prime_acknowledged_at, ms.prime_acknowledged_at as shipment_prime_acknowledged_at from moves m join mto_shipments ms on m.id = ms.move_id;
  4. Call the new procedure to populate the prime_acknowledged_at columns for the moves/shipments you selected. Here is an example with a json string you can use, but you'll need to plug in your move and shipment IDs.
    CALL prime_acknowledge_moves_shipments( '[ { "id": "7c982615-d1e2-44ad-bfbb-b1d22ec29df3", "primeAcknowledgedAt": "2025-12-20T14:15:22Z", "mtoShipments": [ { "id": "d76ae57b-a0da-4dc7-b493-74f11fd6193d", "primeAcknowledgedAt": "2025-12-21T14:15:33Z" } ] }, { "id": "d4d95b22-2d9d-428b-9a11-284455aa87ba", "primeAcknowledgedAt": "2025-12-22T14:16:32Z", "mtoShipments": [ { "id": "acf7b357-5cad-40e2-baa7-dedc1d4cf04c", "primeAcknowledgedAt": "2025-12-23T14:16:44Z" } ] } ]'::jsonb );
  5. Query the moves and mto_shipments tables to verify the columns were populated. Make sure to plugin your move and shipment IDs.
    select m.id as move_id, ms.id as shipment_id, m.prime_acknowledged_at as move_prime_acknowledged_at, ms.prime_acknowledged_at as shipment_prime_acknowledged_at from moves m join mto_shipments ms on m.id = ms.move_id where m.id in ('7c982615-d1e2-44ad-bfbb-b1d22ec29df3', 'd4d95b22-2d9d-428b-9a11-284455aa87ba') and ms.id in ('d76ae57b-a0da-4dc7-b493-74f11fd6193d', 'acf7b357-5cad-40e2-baa7-dedc1d4cf04c');

Play around with some different scenarios that could break this:

  1. Non existent move and/or shipment IDs.
  2. Shipments nested in moves they don't belong to.
  3. ...

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

image

@brianmanley-caci brianmanley-caci self-assigned this Mar 4, 2025
@brianmanley-caci brianmanley-caci requested a review from a team as a code owner March 4, 2025 22:43
@brianmanley-caci brianmanley-caci requested a review from a team March 4, 2025 22:43
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.

Code and commits match up!

Copy link
Contributor

@msaki-caci msaki-caci left a comment

Choose a reason for hiding this comment

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

LGTM

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.

3 participants