Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

INT B-22272 #14752

Merged
merged 37 commits into from
Feb 7, 2025
Merged

INT B-22272 #14752

merged 37 commits into from
Feb 7, 2025

Conversation

danieljordan-caci
Copy link
Contributor

@danieljordan-caci danieljordan-caci commented Feb 5, 2025

Agility ticket

Summary

This has been previously tested using our typical queue backend code, but this new BL is using a db function instead with an addition of amove_to_dest_gbloc view, which will handle all of the unique affiliation filters we need.

This PR has quite a bit of setup so prepare yer butts. Unfortunately the only way to test this thoroughly is to create a metric butt ton of moves.

Per the BL in Agility, we want to add a new "Destination Requests" queue for TOO. This queue will contain moves that are in Approvals Requested status and have the following criteria based on the SHIPMENT'S DESTINATION ADDRESS GBLOC, not the destination duty location on the orders:

  • destination SIT requests (in SUBMITTED status)
  • shipment destination address requests (in REQUESTED status)
  • move is in APPROVALS REQUESTED status

There are these exceptions for USMC customers (service_members.affiliation)

  • all USMC moves go into the USMC GBLOC

There are these exceptions for USAF and Space Force customers (service_members.affiliation)

  • if the destination address is in Alaska Zone II (re_rate_areas.name) it needs to go to the MBFL GBLOC
  • if it is NOT in Alaska Zone II (re_rate_areas.name), it needs to go to the destination address' respective GBLOC
  • if the destination address is in Alaska Zone II & the customer is in any other branch (excluding USAF/SF/USMC), the move should be in the JEAT GBLOC

I would highly advise you to set up a tracker doc (I just used the Mac Notes app) so you can mark which GBLOC the moves should be in, as well as move codes, etc. - here's what I did.

USMC:

Move: HHX6VW
GBLOC: USMC
1 Cold St.
Tok, AK 99776
Zone II 
- Dest SIT

Move: VPK7PW
GBLOC: USMC
2 Cold St.
Sitka, AK 99836
Zone IV 
- Dest address

Move: 3P8MHV
GBLOC: USMC
3 Cold St.
Los Angeles, CA 90210
CONUS
- Dest shuttle


USAF:

Move: 6DC3YQ
GBLOC: MBFL
4 Cold St.
Tok, AK 99776
Zone II 
- Dest shuttle

Move: R6849P
GBLOC: MAPK
5 Cold St.
Sitka, AK 99836
Zone IV 
- Dest address

Move: Y7R8BB
GBLOC: KKFA
6 Cold St.
Los Angeles, CA 90210
CONUS
- Dest SIT


SF:

Move: VYMKYT
GBLOC: MBFL
7 Cold St.
Tok, AK 99776
Zone II 
- Dest shuttle

Move: FFD4W4
GBLOC: MAPK
8 Cold St.
Sitka, AK 99836
Zone IV 
- Dest address

Move: QJXY74
GBLOC: KKFA
9 Cold St.
Los Angeles, CA 90210
CONUS
- Dest SIT


ARMY:

Move: 9GCGYQ
GBLOC: JEAT
10 Cold St.
Tok, AK 99776
Zone II 
- Dest shuttle

Move: F7WJHQ
GBLOC: MAPK
11 Cold St.
Sitka, AK 99836
Zone IV 
- Dest address

Move: 4WP9PB
GBLOC: KKFA
12 Cold St.
Los Angeles, CA 99510
CONUS
- Dest SIT

How to test USMC

  1. Log in as a customer, set up with a USMC affiliation
  2. Create a move with orders that land somewhere in Alaska Zone II
  3. Add a shipment(s) (I've just been doing an HHG shipment)
  4. Sign and submit
  5. Create another move - this time we'll test a move that's NOT in Alaska Zone II (I typically use AK Zone IV)
  6. Follow steps 2-4, but use an AK Zone IV ZIP
  7. Create another move - this time just do a CONUS move, can be whatever, sign & submit
  8. You should now have 3 USMC moves
  9. Log in as a USMC SC and approve all 3 USMC moves
  10. Log in as USMC TOO and approve all 3 USMC moves
  11. Go in as Prime and request destination SIT on the CONUS move
  12. Do a destination address & destination shuttle on the other OCONUS moves
  13. Go back in as USMC TOO and view the Destination Requests tab
  14. You should see all three moves that need destination actions in the USMC destination queue
  15. Verify that you can't see the USMC moves in those respective GBLOCs (you'll have to # as other GBLOC users - I tend to use Safari for that while keeping Chrome up for the other) - JEAT is for AK Zone II & MAPK is for AK Zone IV

How to test USAF/SF in Alaska Zone II & non-Alaska Zone II

  1. Log in as a customer, set up one with USAF affiliation & one with SF affiliation (You'll have to run through these steps twice - one for USAF & one for SF)
  2. Create a move with orders that land somewhere in Alaska Zone II
  3. Add a shipment(s) (I've just been doing an HHG shipment)
  4. Sign and submit
  5. Create another move - this time we'll test a move that's NOT in Alaska Zone II (I typically use AK Zone IV)
  6. Follow steps 2-4, but use an AK Zone IV ZIP
  7. Create another move - this time just do a CONUS move, can be whatever, sign & submit
  8. You should now have 3 moves for each USAF & Space Force customer (Zone II, !Zone II, CONUS)
  9. Log in as a SC and approve all 6 moves
  10. Log in as TOO and approve all 6 moves
  11. Go in as Prime and request destination SIT on the CONUS moves
  12. Also ensure you do a destination address request & destination shuttle requests on the OCONUS moves
  13. Go back in as TOO and view the Destination Requests tab
  14. When logged in as a MBFL TOO, you should see AT A MINIMUM, the Alaska Zone II moves (1 for USAF, 1 for SF)
  15. Verify that you can see the moves in the destination queues of the GBLOCs you just looked up

How to test remaining queues

  1. Log in as a customer, set up with whatever remaining affiliation
  2. Create a move with orders that land somewhere in Alaska (testing Zone II for JEAT GBLOC)
  3. Add a shipment(s) (I've just been doing an HHG shipment)
  4. Sign and submit
  5. Create another move - this time we'll test a move that's NOT in Alaska Zone II
  6. Follow steps 3-4
  7. Create another move - this time just do a CONUS move, can be whatever, sign & submit
  8. You should now have 3 moves (Zone II, !Zone II, CONUS)
  9. Log in as a SC and approve all 3 moves
  10. Log in as TOO and approve all 3 moves
  11. Go in as Prime and request destination SIT on the CONUS move
  12. Also ensure you do a destination address request and destination shuttle on the OCONUS moves
  13. Go back in as a JEAT TOO and view the Destination Requests tab
  14. You should AT A MINIMUM, see the Alaska Zone II move (since it is not USAF/SF/USMC and in Alaska Zone II)
  15. Verify that you can see the moves in the destination queues of the GBLOCs you just looked up

Additional testing

  1. Since this queue does not use existing functionality and uses a database function, play with the queue
  2. Confirm you can search, filter, and just generally try to break it
  3. Test thoroughly as this is likely what we will be converting other queues to in order to reduce database calls and make the app a little more efficient

Screenshots

Screenshot 2025-02-04 at 4 34 31 PM

pambecker and others added 28 commits January 27, 2025 08:23
B 20636 MAIN - #26 Dependency Scan (Severity High) - ip 2.0.1 (DEV)
@danieljordan-caci danieljordan-caci added Mountain Movers Movin' Mountains 1 Sprint at a time INTEGRATION Slated for Integration Testing labels Feb 5, 2025
cameroncaci
cameroncaci previously approved these changes Feb 7, 2025
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.

Reapproving

begrohmann
begrohmann previously approved these changes Feb 7, 2025
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.

Seeing this error here when clicking on a move in the destination queue and then hitting the back button in the chrome browser. I do not see the same behavior for the normal queue

To recreate:

  1. View the destination queue
  2. Click on a move there to see the Move Details
  3. Click the back button on the browser
    image

Server logs:

2025-02-07T17:55:24.138Z        INFO    middleware/request_logger.go:87 Request {"git_branch": "B-21322-MAIN", "git_commit": "2ae6dc82f22fb8359aa5561d49a1bf628ca89777", "host": "officelocal:3000", "milmove_trace_id": "cb785013-2ab4-4b99-8131-0e8b8bbd9b7a", "session_id": "9AgkB61p1tPYFnQhnr_ENRbYbQqT2JToyNHh_LSzUgU", "accepted-language": "", "content-length": 0, "host": "officelocal:3000", "method": "GET", "named-server": "no-tls", "protocol-version": "HTTP/1.1", "referer": "http://officelocal:3000/destination-requests", "source": "127.0.0.1:64958", "url": "/internal/users/logged_in", "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36", "protocol": "http", "x-csrf-token": "R1cKgOl623GAkochdDcHZflJxugDNz/tRbhf9f7k/31J+X3lwaD2iJG/ssuS/SxAynJVml86cdUJPpaIt8f5RQ==", "headers": 8, "user-id": "8aa60d81-a83a-4990-8537-f44ae407b5a2", "office-user-id": "733a2366-e965-422d-b811-bfa6fd21aca4", "duration": "16.445041ms", "resp-size-bytes": 3686, "resp-status": 200}
[POP] 2025/02/07 17:55:24 sql - SELECT office_users.active, office_users.created_at, office_users.edipi, office_users.email, office_users.first_name, office_users.id, office_users.last_name, office_users.middle_initials, office_users.other_unique_id, office_users.rejection_reason, office_users.status, office_users.telephone, office_users.transportation_office_id, office_users.updated_at, office_users.user_id FROM office_users AS office_users WHERE office_users.id = $1 LIMIT 1 | ["733a2366-e965-422d-b811-bfa6fd21aca4"] (conn=tx-995762270905164925-SqKatM, tx=995762270905164925)
[POP] 2025/02/07 17:55:24 sql - SELECT transportation_offices.address_id, transportation_offices.created_at, transportation_offices.gbloc, transportation_offices.hours, transportation_offices.id, transportation_offices.latitude, transportation_offices.longitude, transportation_offices.name, transportation_offices.note, transportation_offices.provides_ppm_closeout, transportation_offices.services, transportation_offices.shipping_office_id, transportation_offices.updated_at FROM transportation_offices AS transportation_offices WHERE id = $1 | [cf5fee51-2f62-4de2-adee-6b48134fd597] (conn=tx-995762270905164925-SqKatM, tx=995762270905164925)
[POP] 2025/02/07 17:55:24 sql - SELECT privileges.created_at, privileges.id, privileges.privilege_name, privileges.privilege_type, privileges.updated_at FROM privileges AS privileges JOIN users_privileges ON users_privileges.privilege_id = privileges.id WHERE users_privileges.deleted_at IS NULL AND users_privileges.user_id = $1 | [8aa60d81-a83a-4990-8537-f44ae407b5a2] (conn=tx-995762270905164925, tx=995762270905164925)
[POP] 2025/02/07 17:55:24 sql - UPDATE "moves" AS moves SET "additional_documents_id" = :additional_documents_id, "approvals_requested_at" = :approvals_requested_at, "approved_at" = :approved_at, "available_to_prime_at" = :available_to_prime_at, "billable_weights_reviewed_at" = :billable_weights_reviewed_at, "cancel_reason" = :cancel_reason, "closeout_office_id" = :closeout_office_id, "contractor_id" = :contractor_id, "counseling_transportation_office_id" = :counseling_transportation_office_id, "excess_unaccompanied_baggage_weight_acknowledged_at" = :excess_unaccompanied_baggage_weight_acknowledged_at, "excess_unaccompanied_baggage_weight_qualified_at" = :excess_unaccompanied_baggage_weight_qualified_at, "excess_weight_acknowledged_at" = :excess_weight_acknowledged_at, "excess_weight_qualified_at" = :excess_weight_qualified_at, "excess_weight_upload_id" = :excess_weight_upload_id, "financial_review_flag" = :financial_review_flag, "financial_review_flag_set_at" = :financial_review_flag_set_at, "financial_review_remarks" = :financial_review_remarks, "locator" = :locator, "lock_expires_at" = :lock_expires_at, "locked_by" = :locked_by, "orders_id" = :orders_id, "ppm_type" = :ppm_type, "prime_counseling_completed_at" = :prime_counseling_completed_at, "reference_id" = :reference_id, "sc_assigned_id" = :sc_assigned_id, "service_counseling_completed_at" = :service_counseling_completed_at, "shipment_seq_num" = :shipment_seq_num, "show" = :show, "status" = :status, "submitted_at" = :submitted_at, "tio_assigned_id" = :tio_assigned_id, "tio_remarks" = :tio_remarks, "too_assigned_id" = :too_assigned_id, "updated_at" = :updated_at WHERE moves.id = :id | ["1ed3a1d5-abe2-419e-82f4-a5baa30f5b5d"] (conn=tx-995762270905164925, tx=995762270905164925)
[POP] 2025/02/07 17:55:24 sql - ROLLBACK Transaction --- (conn=tx-995762270905164925, tx=995762270905164925)
2025-02-07T17:55:24.145Z        INFO    middleware/request_logger.go:87 Request {"git_branch": "B-21322-MAIN", "git_commit": "2ae6dc82f22fb8359aa5561d49a1bf628ca89777", "host": "officelocal:3000", "milmove_trace_id": "8e294ac6-6ef7-4a48-8ecc-d9302f917a0a", "session_id": "9AgkB61p1tPYFnQhnr_ENRbYbQqT2JToyNHh_LSzUgU", "accepted-language": "", "content-length": 0, "host": "officelocal:3000", "method": "GET", "named-server": "no-tls", "protocol-version": "HTTP/1.1", "referer": "http://officelocal:3000/destination-requests", "source": "127.0.0.1:64956", "url": "/ghc/v1/queues/destination-requests?page=1&perPage=20&sort=status&order=asc", "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36", "protocol": "http", "x-csrf-token": "R1cKgOl623GAkochdDcHZflJxugDNz/tRbhf9f7k/31J+X3lwaD2iJG/ssuS/SxAynJVml86cdUJPpaIt8f5RQ==", "headers": 8, "user-id": "8aa60d81-a83a-4990-8537-f44ae407b5a2", "office-user-id": "733a2366-e965-422d-b811-bfa6fd21aca4", "duration": "23.213167ms", "resp-size-bytes": 0, "resp-status": 500}
pments.pro_gear_weight

@danieljordan-caci
Copy link
Contributor Author

Seeing this error here when clicking on a move in the destination queue and then hitting the back button in the chrome browser. I do not see the same behavior for the normal queue

To recreate:

  1. View the destination queue
  2. Click on a move there to see the Move Details
  3. Click the back button on the browser
    image

Server logs:

2025-02-07T17:55:24.138Z        INFO    middleware/request_logger.go:87 Request {"git_branch": "B-21322-MAIN", "git_commit": "2ae6dc82f22fb8359aa5561d49a1bf628ca89777", "host": "officelocal:3000", "milmove_trace_id": "cb785013-2ab4-4b99-8131-0e8b8bbd9b7a", "session_id": "9AgkB61p1tPYFnQhnr_ENRbYbQqT2JToyNHh_LSzUgU", "accepted-language": "", "content-length": 0, "host": "officelocal:3000", "method": "GET", "named-server": "no-tls", "protocol-version": "HTTP/1.1", "referer": "http://officelocal:3000/destination-requests", "source": "127.0.0.1:64958", "url": "/internal/users/logged_in", "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36", "protocol": "http", "x-csrf-token": "R1cKgOl623GAkochdDcHZflJxugDNz/tRbhf9f7k/31J+X3lwaD2iJG/ssuS/SxAynJVml86cdUJPpaIt8f5RQ==", "headers": 8, "user-id": "8aa60d81-a83a-4990-8537-f44ae407b5a2", "office-user-id": "733a2366-e965-422d-b811-bfa6fd21aca4", "duration": "16.445041ms", "resp-size-bytes": 3686, "resp-status": 200}
[POP] 2025/02/07 17:55:24 sql - SELECT office_users.active, office_users.created_at, office_users.edipi, office_users.email, office_users.first_name, office_users.id, office_users.last_name, office_users.middle_initials, office_users.other_unique_id, office_users.rejection_reason, office_users.status, office_users.telephone, office_users.transportation_office_id, office_users.updated_at, office_users.user_id FROM office_users AS office_users WHERE office_users.id = $1 LIMIT 1 | ["733a2366-e965-422d-b811-bfa6fd21aca4"] (conn=tx-995762270905164925-SqKatM, tx=995762270905164925)
[POP] 2025/02/07 17:55:24 sql - SELECT transportation_offices.address_id, transportation_offices.created_at, transportation_offices.gbloc, transportation_offices.hours, transportation_offices.id, transportation_offices.latitude, transportation_offices.longitude, transportation_offices.name, transportation_offices.note, transportation_offices.provides_ppm_closeout, transportation_offices.services, transportation_offices.shipping_office_id, transportation_offices.updated_at FROM transportation_offices AS transportation_offices WHERE id = $1 | [cf5fee51-2f62-4de2-adee-6b48134fd597] (conn=tx-995762270905164925-SqKatM, tx=995762270905164925)
[POP] 2025/02/07 17:55:24 sql - SELECT privileges.created_at, privileges.id, privileges.privilege_name, privileges.privilege_type, privileges.updated_at FROM privileges AS privileges JOIN users_privileges ON users_privileges.privilege_id = privileges.id WHERE users_privileges.deleted_at IS NULL AND users_privileges.user_id = $1 | [8aa60d81-a83a-4990-8537-f44ae407b5a2] (conn=tx-995762270905164925, tx=995762270905164925)
[POP] 2025/02/07 17:55:24 sql - UPDATE "moves" AS moves SET "additional_documents_id" = :additional_documents_id, "approvals_requested_at" = :approvals_requested_at, "approved_at" = :approved_at, "available_to_prime_at" = :available_to_prime_at, "billable_weights_reviewed_at" = :billable_weights_reviewed_at, "cancel_reason" = :cancel_reason, "closeout_office_id" = :closeout_office_id, "contractor_id" = :contractor_id, "counseling_transportation_office_id" = :counseling_transportation_office_id, "excess_unaccompanied_baggage_weight_acknowledged_at" = :excess_unaccompanied_baggage_weight_acknowledged_at, "excess_unaccompanied_baggage_weight_qualified_at" = :excess_unaccompanied_baggage_weight_qualified_at, "excess_weight_acknowledged_at" = :excess_weight_acknowledged_at, "excess_weight_qualified_at" = :excess_weight_qualified_at, "excess_weight_upload_id" = :excess_weight_upload_id, "financial_review_flag" = :financial_review_flag, "financial_review_flag_set_at" = :financial_review_flag_set_at, "financial_review_remarks" = :financial_review_remarks, "locator" = :locator, "lock_expires_at" = :lock_expires_at, "locked_by" = :locked_by, "orders_id" = :orders_id, "ppm_type" = :ppm_type, "prime_counseling_completed_at" = :prime_counseling_completed_at, "reference_id" = :reference_id, "sc_assigned_id" = :sc_assigned_id, "service_counseling_completed_at" = :service_counseling_completed_at, "shipment_seq_num" = :shipment_seq_num, "show" = :show, "status" = :status, "submitted_at" = :submitted_at, "tio_assigned_id" = :tio_assigned_id, "tio_remarks" = :tio_remarks, "too_assigned_id" = :too_assigned_id, "updated_at" = :updated_at WHERE moves.id = :id | ["1ed3a1d5-abe2-419e-82f4-a5baa30f5b5d"] (conn=tx-995762270905164925, tx=995762270905164925)
[POP] 2025/02/07 17:55:24 sql - ROLLBACK Transaction --- (conn=tx-995762270905164925, tx=995762270905164925)
2025-02-07T17:55:24.145Z        INFO    middleware/request_logger.go:87 Request {"git_branch": "B-21322-MAIN", "git_commit": "2ae6dc82f22fb8359aa5561d49a1bf628ca89777", "host": "officelocal:3000", "milmove_trace_id": "8e294ac6-6ef7-4a48-8ecc-d9302f917a0a", "session_id": "9AgkB61p1tPYFnQhnr_ENRbYbQqT2JToyNHh_LSzUgU", "accepted-language": "", "content-length": 0, "host": "officelocal:3000", "method": "GET", "named-server": "no-tls", "protocol-version": "HTTP/1.1", "referer": "http://officelocal:3000/destination-requests", "source": "127.0.0.1:64956", "url": "/ghc/v1/queues/destination-requests?page=1&perPage=20&sort=status&order=asc", "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36", "protocol": "http", "x-csrf-token": "R1cKgOl623GAkochdDcHZflJxugDNz/tRbhf9f7k/31J+X3lwaD2iJG/ssuS/SxAynJVml86cdUJPpaIt8f5RQ==", "headers": 8, "user-id": "8aa60d81-a83a-4990-8537-f44ae407b5a2", "office-user-id": "733a2366-e965-422d-b811-bfa6fd21aca4", "duration": "23.213167ms", "resp-size-bytes": 0, "resp-status": 500}
pments.pro_gear_weight

Please review again - turned out when unlocking the move it needed moves.show which was not being returned in the SQL table from the db func. You'll need to re-run the migration or just copy/paste it and run it in DBeaver. Might have to drop first though.

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.

Alright ran through quite a few moves and figuring out the expected GBLOCs to check for them was fun. Looks good!

@deandreJones
Copy link
Contributor

Not finding any flaws, works as intended just found a test that might've been missed as an extra safeguard against future modifications.

Did my testing via db modification instead of move creation to save time

Wonder if we should start considering adding test scenarios to the test harness- to assist with folks setting up data to test PRs

@traskowskycaci
Copy link
Contributor

Not finding any flaws, works as intended just found a test that might've been missed as an extra safeguard against future modifications.
Did my testing via db modification instead of move creation to save time

Wonder if we should start considering adding test scenarios to the test harness- to assist with folks setting up data to test PRs

Absolutely - had the same thought

@danieljordan-caci
Copy link
Contributor Author

Not finding any flaws, works as intended just found a test that might've been missed as an extra safeguard against future modifications.
Did my testing via db modification instead of move creation to save time

Wonder if we should start considering adding test scenarios to the test harness- to assist with folks setting up data to test PRs

Not a bad idea.. Sounds like something I can knock out during Sprint 5 after breakdowns. I'd be down for it.

Copy link
Contributor

@deandreJones deandreJones left a comment

Choose a reason for hiding this comment

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

reviewed frontend specific.. looks good

@danieljordan-caci danieljordan-caci merged commit cdc4978 into integrationTesting Feb 7, 2025
6 checks passed
@danieljordan-caci danieljordan-caci deleted the INT-B-22272 branch February 7, 2025 19:56
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
INTEGRATION Slated for Integration Testing Mountain Movers Movin' Mountains 1 Sprint at a time
Development

Successfully merging this pull request may close these issues.

9 participants