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-21683 #14507

Merged
merged 16 commits into from
Jan 3, 2025
Merged

MAIN B-21683 #14507

merged 16 commits into from
Jan 3, 2025

Conversation

danieljordan-caci
Copy link
Contributor

INT PR

Agility ticket

Summary

This one is kind of a bear to test because we are lacking some handy functionality to populate us_post_region_cities_id and pod_location and poe_location, so there's some manual lifting on the frontend. Sorry..

We need to populate estimated pricing for service items related to iHHG and iUB shipments. This PR handles creating a stored proc that will do the heavy lifting for us. Please review thoroughly since this involves $$$$.

How to test

Manually run this in DBeaver (not yet merged into INT)

DELETE FROM ports;
DELETE FROM port_locations;

INSERT INTO ports (id,port_code,port_type,port_name,created_at,updated_at) VALUES
	 ('b393e767-0703-43c6-b1e9-12541dc3f15b'::uuid,'PDX','A','PORTLAND INTL','2024-11-22 14:52:24.739738','2024-11-22 14:52:24.739738'),
	 ('48569958-2889-41e5-8101-82c56ec48430'::uuid,'SEA','A','SEATTLE TACOMA INTL','2024-11-22 14:52:24.739738','2024-11-22 14:52:24.739738'),
	 ('aa33487c-0637-4c1a-b260-d12ed1dbcc39'::uuid,'TCM','A','MCCHORD FLD','2024-11-22 14:52:24.739738','2024-11-22 14:52:24.739738'),
	 ('5269b1ec-3478-414c-bdb1-c8db12ccd0b5'::uuid,'4G1','S','ASTORIA, OREGON','2024-11-22 15:09:55.189787','2024-11-22 15:09:55.189787'),
	 ('30dc0c1f-c2e2-4bf1-b9fd-5c24e21034d8'::uuid,'4H6','S','PORTLAND, OREGON','2024-11-22 15:09:55.189787','2024-11-22 15:09:55.189787'),
	 ('54a32fc7-c2a9-4ba6-b8dd-99a710730fda'::uuid,'4K1','S','COOS BAY, OREGON','2024-11-22 15:09:55.189787','2024-11-22 15:09:55.189787'),
	 ('581da305-3a67-4311-b7d5-1fec19b221f9'::uuid,'4B2','S','ANACORTES, NORTH WEST WASHINGTON','2024-11-22 15:09:55.189787','2024-11-22 15:09:55.189787'),
	 ('b8dc9c80-bd6d-4a2d-8bd3-f025ddef95fc'::uuid,'4C1','S','PORT ANGELES, WHIDBEY ISLAND','2024-11-22 15:09:55.189787','2024-11-22 15:09:55.189787'),
	 ('5355255c-3c9c-4d86-af2a-4b63004dee24'::uuid,'4DL','S','SEATTLE SDDC TERMINAL, PUGET SOUND','2024-11-22 15:09:55.189787','2024-11-22 15:09:55.189787'),
	 ('a9c24841-64e0-4e12-a872-ee7fb73a6300'::uuid,'4EA','S','TACOMA NAVAL STATION, WASHINGTON, PUGET SOUND','2024-11-22 15:09:55.189787','2024-11-22 15:09:55.189787'),
	 ('e4ba8867-bf70-43c7-b143-0f719ed0121f'::uuid,'2902','B','NEWPORT, OR','2024-10-17 13:50:08.046274','2024-10-17 13:50:08.046274'),
	 ('ae0667e0-b497-4dd3-bfb4-a20f457104d1'::uuid,'2904','B','PORTLAND, OR','2024-10-17 13:50:08.046274','2024-10-17 13:50:08.046274'),
	 ('e21ce23a-c261-4b54-a711-6dee965bcfe9'::uuid,'3001','B','SEATTLE, WA','2024-10-17 13:50:08.046274','2024-10-17 13:50:08.046274'),
	 ('27ce681f-6dd6-45fd-b3ab-9a5b459b814b'::uuid,'3002','B','TACOMA, WA','2024-10-17 13:50:08.046274','2024-10-17 13:50:08.046274');

INSERT INTO port_locations (id,port_id,cities_id,us_post_region_cities_id,country_id,is_active,created_at,updated_at) VALUES
	 ('b6e94f5b-33c0-43f3-b960-7c7b2a4ee5fc'::uuid,'b393e767-0703-43c6-b1e9-12541dc3f15b'::uuid,'026f9d81-7715-424e-b368-bfc7a673aaa2'::uuid,'40bf95e4-72f1-4d75-8bc5-5842f7f26c94'::uuid,'791899e6-cd77-46f2-981b-176ecb8d7098'::uuid,true,'2024-11-22 15:04:41.941865','2024-11-22 15:04:41.941865'),
	 ('43efe04d-0ca0-4571-9aa1-747193285d9e'::uuid,'48569958-2889-41e5-8101-82c56ec48430'::uuid,'836b9729-08b8-4d2c-b089-c4ea57425a23'::uuid,'aac7788f-0a0f-4397-9742-95394ce02346'::uuid,'791899e6-cd77-46f2-981b-176ecb8d7098'::uuid,true,'2024-11-22 15:04:41.941865','2024-11-22 15:04:41.941865'),
	 ('13b2f85a-7370-468b-b3f8-e6689e2bcdf6'::uuid,'aa33487c-0637-4c1a-b260-d12ed1dbcc39'::uuid,'baaf6ab1-6142-4fb7-b753-d0a142c75baf'::uuid,'a70a6356-a318-4426-af02-dbff793fbbb0'::uuid,'791899e6-cd77-46f2-981b-176ecb8d7098'::uuid,true,'2024-11-22 15:04:41.941865','2024-11-22 15:04:41.941865'),
	 ('a8f4471f-add6-4f5d-bbe0-48264ba24fda'::uuid,'5269b1ec-3478-414c-bdb1-c8db12ccd0b5'::uuid,'5065f129-c3fe-4533-a24c-408db08d0e28'::uuid,'5fd8306f-af71-4967-950a-4d415c18f415'::uuid,'791899e6-cd77-46f2-981b-176ecb8d7098'::uuid,true,'2024-11-22 15:17:22.131362','2024-11-22 15:17:22.131362'),
	 ('be6cb946-4033-43dd-a356-3213b3ba7b53'::uuid,'30dc0c1f-c2e2-4bf1-b9fd-5c24e21034d8'::uuid,'026f9d81-7715-424e-b368-bfc7a673aaa2'::uuid,'40bf95e4-72f1-4d75-8bc5-5842f7f26c94'::uuid,'791899e6-cd77-46f2-981b-176ecb8d7098'::uuid,true,'2024-11-22 15:17:22.131362','2024-11-22 15:17:22.131362'),
	 ('c5deb9d6-478b-46b4-ab61-da32fa575731'::uuid,'54a32fc7-c2a9-4ba6-b8dd-99a710730fda'::uuid,'9c7377d9-b175-4896-8acd-5a3fb9ecb48c'::uuid,'3b3d4a99-b6c2-4e01-8a10-7e4e780ecd92'::uuid,'791899e6-cd77-46f2-981b-176ecb8d7098'::uuid,true,'2024-11-22 15:17:22.131362','2024-11-22 15:17:22.131362'),
	 ('25e2f255-fd9b-4c21-a513-63332b5c30b9'::uuid,'581da305-3a67-4311-b7d5-1fec19b221f9'::uuid,'9fa66dfd-73b0-4d5f-b637-cac6e0d24676'::uuid,'7f3d3fdb-1d0f-4061-af3c-d2f401737d06'::uuid,'791899e6-cd77-46f2-981b-176ecb8d7098'::uuid,true,'2024-11-22 15:17:22.131362','2024-11-22 15:17:22.131362'),
	 ('adfe22d0-70ff-45c3-9b9e-08341f662377'::uuid,'b8dc9c80-bd6d-4a2d-8bd3-f025ddef95fc'::uuid,'999bcb30-edae-4b4d-8027-5e71cb8b015c'::uuid,'c4c4e9bf-631c-4ea0-9d03-bced40ab9189'::uuid,'791899e6-cd77-46f2-981b-176ecb8d7098'::uuid,true,'2024-11-22 15:17:22.131362','2024-11-22 15:17:22.131362'),
	 ('8d74a7c2-addd-49d2-a945-697befa686a2'::uuid,'5355255c-3c9c-4d86-af2a-4b63004dee24'::uuid,'836b9729-08b8-4d2c-b089-c4ea57425a23'::uuid,'aac7788f-0a0f-4397-9742-95394ce02346'::uuid,'791899e6-cd77-46f2-981b-176ecb8d7098'::uuid,true,'2024-11-22 15:17:22.131362','2024-11-22 15:17:22.131362'),
	 ('9e76c27d-fd4b-434e-9ffc-ef70abc88973'::uuid,'a9c24841-64e0-4e12-a872-ee7fb73a6300'::uuid,'baaf6ab1-6142-4fb7-b753-d0a142c75baf'::uuid,'a70a6356-a318-4426-af02-dbff793fbbb0'::uuid,'791899e6-cd77-46f2-981b-176ecb8d7098'::uuid,true,'2024-11-22 15:17:22.131362','2024-11-22 15:17:22.131362'),
	 ('75038c6c-cd38-453d-a0c3-74e39908bb81'::uuid,'e4ba8867-bf70-43c7-b143-0f719ed0121f'::uuid,'fc264968-eaff-404a-8efe-24c35e965e2f'::uuid,'9dcbb419-f0c9-4c06-82f4-c43381a55b89'::uuid,'791899e6-cd77-46f2-981b-176ecb8d7098'::uuid,true,'2024-11-22 15:26:06.764703','2024-11-22 15:26:06.764703'),
	 ('2a6b7d44-0b06-4c20-bad9-0bbe147c8e23'::uuid,'ae0667e0-b497-4dd3-bfb4-a20f457104d1'::uuid,'026f9d81-7715-424e-b368-bfc7a673aaa2'::uuid,'40bf95e4-72f1-4d75-8bc5-5842f7f26c94'::uuid,'791899e6-cd77-46f2-981b-176ecb8d7098'::uuid,true,'2024-11-22 15:26:06.764703','2024-11-22 15:26:06.764703'),
	 ('10625607-6785-49f0-8a26-36039612743b'::uuid,'e21ce23a-c261-4b54-a711-6dee965bcfe9'::uuid,'836b9729-08b8-4d2c-b089-c4ea57425a23'::uuid,'aac7788f-0a0f-4397-9742-95394ce02346'::uuid,'791899e6-cd77-46f2-981b-176ecb8d7098'::uuid,true,'2024-11-22 15:26:06.764703','2024-11-22 15:26:06.764703'),
	 ('a1a7ce07-94f2-45b3-b70a-59f1824778af'::uuid,'27ce681f-6dd6-45fd-b3ab-9a5b459b814b'::uuid,'baaf6ab1-6142-4fb7-b753-d0a142c75baf'::uuid,'a70a6356-a318-4426-af02-dbff793fbbb0'::uuid,'791899e6-cd77-46f2-981b-176ecb8d7098'::uuid,true,'2024-11-22 15:26:06.764703','2024-11-22 15:26:06.764703');
  1. Create a iHHG & iUB move as SC or customer
  2. Find the addresses you used for your pickup/destination addresses on the shipment and ensure there's a us_post_region_cities_id value
  3. Submit the move details as SC
  4. Log in as TOO and pull up the move
  5. Approve the iHHG shipment but not the iUB
  6. Confirm the service items were created in the db, verify that pricing_estimate is null for each
  7. Find the POD/POE service item that was created and update the poe/pod_location_id to this: 43efe04d-0ca0-4571-9aa1-747193285d9e
  8. Locate the shipment ID and copy it - while you're at it, update prime_estimated_weight to something. If there is no estimated weight, then we cannot give an estimated price.
  9. In DBeaver, run this:
CALL public.update_service_item_pricing(':shipmentId');
  1. You should now see the pricing_estimate columns populate for each service item
  2. To handle the iUB, we need to manually order the service items since that isn't in INT yet. Find the iUB shipment ID and In DBeaver:
CALL.public.create_approved_service_items_for_shipment(:shipmentId);
  1. Now go into mto_shipments and manually change the shipment status APPROVED (this isn't super necessary but feels wrong to not do)
  2. Continue on with the same steps of 6 - 10

Screenshot 2024-12-06 at 2 06 18 PM
Screenshot 2024-12-06 at 2 06 24 PM
Screenshot 2024-12-06 at 2 06 31 PM
Screenshot 2024-12-06 at 2 06 38 PM

@danieljordan-caci danieljordan-caci added Mountain Movers Movin' Mountains 1 Sprint at a time MAIN labels Jan 3, 2025
@danieljordan-caci danieljordan-caci requested a review from a team January 3, 2025 14:18
@danieljordan-caci danieljordan-caci self-assigned this Jan 3, 2025
@danieljordan-caci danieljordan-caci requested a review from a team as a code owner January 3, 2025 14:18
Copy link
Contributor

@cameroncaci cameroncaci left a comment

Choose a reason for hiding this comment

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

POA'd and commits are good

Copy link
Contributor

@traskowskycaci traskowskycaci left a comment

Choose a reason for hiding this comment

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

Changed files match up!

@cameroncaci
Copy link
Contributor

rerunning ci/cd, flaky failure on required step

@cameroncaci cameroncaci merged commit 21af774 into main Jan 3, 2025
43 checks passed
@cameroncaci cameroncaci deleted the main-b-21683 branch January 3, 2025 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MAIN Mountain Movers Movin' Mountains 1 Sprint at a time
Development

Successfully merging this pull request may close these issues.

3 participants