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-21942 #14544

Merged
merged 6 commits into from
Jan 8, 2025
Merged

MAIN B-21942 #14544

merged 6 commits into from
Jan 8, 2025

Conversation

danieljordan-caci
Copy link
Contributor

INT PR

Agility ticket

Summary

The powers that be want the Prime API to be able to see the destination GBLOC associated with shipment destination addresses. The GBLOC will be based off of the uspr_zip_id on the from the us_post_region_cities table. It's important that every address have these values.

Exceptions:

  • all USMC moves go to the USMC destination GBLOC
  • all USAF/USSF in AK Zone II go to the MBFL GBLOC
  • all other branches/zones go to their respective GBLOCs (lookin' at you postal_code_to_gblocs

This PR does the following:

  • adds a db function that returns the GBLOC associated with addresses, pending they have a us_post_region_cities_id - separates logic for CONUS & OCONUS shipments and exceptions for AK Zone II with USAF/USSF
  • updates addresses struct with a DestinationGbloc value - adding a db:"-" tells Pop to go kick rocks and it knows it's just a calculated/computed value
  • updated getMoveTaskOrder service object to send back the destination GBLOC on the destination address
  • tests

How to test

  1. Create a move, add a shipment or two with and without an AK Zone II address (query re_oconus_rate_areas with WHERE rate_area_id = '5a27e806-21d4-4672-aa5e-29518f10c0aa' to see all us_post_region_cities.id associated with AK Zone II
  2. Approve as SC, approve as TOO to make the move available to Prime
  3. Fire up Prime V3 Swagger UI or Postman
  4. Query the move associated with the shipments you just created
  5. You should now see the destinationGbloc value in mtoShipments[i].destinationAddress object in the return value

Screenshots

Screenshot 2024-12-20 at 4 38 10 PM

@danieljordan-caci danieljordan-caci added Mountain Movers Movin' Mountains 1 Sprint at a time MAIN labels Jan 8, 2025
@danieljordan-caci danieljordan-caci self-assigned this Jan 8, 2025
@danieljordan-caci
Copy link
Contributor Author

Differences between INT and MAIN are because B-21702 removed the code adjusted in postal_code_validator_test.go

as well as db-truncate being addressed in the same above mentioned PR

@danieljordan-caci danieljordan-caci marked this pull request as ready for review January 8, 2025 21:52
@danieljordan-caci danieljordan-caci requested a review from a team as a code owner January 8, 2025 21:52
@deandreJones deandreJones merged commit bce4f53 into main Jan 8, 2025
42 of 43 checks passed
@deandreJones deandreJones deleted the MAIN-B-21942 branch January 8, 2025 22:21
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