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

B-21608 alaska update search counseling office query #14329

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

Conversation

MInthavongsay
Copy link
Contributor

B-21608

INT PR

INT PR v2

Summary

This PR addresses the search counseling office issue when AK duty locations were migrated into the system from B-21481 where counseling office dropdown was not being populated when an AK duty location is selected.

NOTE: This PR does not address NSRA15 associated duty locations that were migrated. Side effect is that if a known NSRA15 location is selected, the search counseling offices FAILS and the dropdown does not get populated. A BL for this particular issue has been created to resolve this issue.

v2:

  1. Excluding JPPSO offices from the counseling offices dropdown
  2. Updated SQL to compute distance to properly sort offices from closest to furthest. NOTE: UI will still not display correct sort order because the data to compute distances are not present in table: zip3_distances. Beth Grohmann is aware and currently is looking into migrating this data when data is available.

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

  1. From the customer app, create users with following affiliations: AIR FORCE, SPACE FORCE, ARMY, MARINES, NAVY, COAST GUARDS.
  2. For each user login and start the move onboarding process. Search for known AK location names using file:
    GOOD-AK-data-1731517877769.csv . Click selection and verify Counseling Office dropdown gets populated. NOTE: there is an existing UI bug where if there is a search error, the dropdown will not clear the dropdown but will retain the dropdown state from the last successful search. This means that even if it fails, you might see a FALSE positive. Verify logs for every search! A duty location's counseling office is retrieved using its associative GBLOC for that address. Unlike the CONUS duty locations, AK locations will have another layer of business logic to determine what GLOC to use based on the ZONE the address location is assigned to. There are 5 known Zones --> Zone 1 to 5. Here are the business rules per Zone:
  • Zone I shipments will be processed by JPPSO Elmendorf-Richardson (GBLOC MBFL).
  • Zone II shipments are divided between JPPSO-NW (GBLOC JEAT) and JPPSO Elmendorf-Richardson (GBLOC MBFL) in the following manner: JPPSO-NW (GBLOC JEAT) will process all shipments that are aligned with Zone II excluding Air Force and Space Force personnel. Air Force and Space Force personnel in Zone II will be processed by JPPSO Elmendorf-Richardson (GBLOC MBFL).
  • Zone III shipments will be processed by USCG Base Kodiak (GBLOC MAPS).
  • Zone IV shipments will be processed by USCG Base Ketchikan (GBLOC MAPK) with the exception of Cordova which will be processed by USCG Base Kodiak (GBLOC MAPS).
  • Zone V -- NSRA15 -- search will not work -- reference file for known NSRA15 locations:
    NSRA15-duty-locations-data-1731515178779.csv

Zone 2 affiliated duty locations are the ones to pay attention to! Use TRDM file as reference to determine Zone affiliation.
(CUI) TRDM AK Duty Locations.xlsx

  1. To make testing a little easier first login using Air Force or Space Force affiliated service member. Sort the TRDM file for all ZONE 2. Do spot checks and verify the duty locations selected display the correct counseling offices
    select name from transportation_offices where gbloc = 'MBFL';

I've added DEBUG logging to help testing

Successful Duty Location Request:
2024-11-13T20:43:12.062Z DEBUG transportation_office/transportation_office_fetcher.go:285 Found specific department match -- serviceMember.Affiliation: AIR_FORCE, DutyLocaton: Fairbanks, AK 99710, GBLOC: MBFL, departmentIndicator: AIR_AND_SPACE_FORCE, RateAreaName: Alaska (Zone) II, dutyLocation.Address.ID: 33f9674d-0243-4c7e-9759-ca7f2c52f46a {"git_branch": "INT-B-21608-Alaska-Update-search-counseling-office-query", "git_commit": "f74a7071ad25b499d7cd6568ac804f95fd603a7d", "host": "milmovelocal:3000", "milmove_trace_id": "8307b5be-ebce-4eb9-ba6b-a8645dc0e981", "session_id": "CXpIw9j3BnGlEVbeDbUagOeObAUN57pAxc-TxWmZM40"}

Pay attention to GBLOC, departmentIndicator, RateAreaName information in the log output. It should match the business logic requirements for the Zone.

unsuccessful/NSRA15 Duty Location Request:
2024-11-13T20:46:05.985Z ERROR internalapi/transportation_offices.go:79 Error searching for Counseling Offices: {"git_branch": "INT-B-21608-Alaska-Update-search-counseling-office-query", "git_commit": "f74a7071ad25b499d7cd6568ac804f95fd603a7d", "host": "milmovelocal:3000", "milmove_trace_id": "7ed5738e-d8d5-4516-8ccb-a3884e6e3c2d", "session_id": "CXpIw9j3BnGlEVbeDbUagOeObAUN57pAxc-TxWmZM40", "error": "ImplementationError: Error: Cannot determine GBLOC -- serviceMember.Affiliation: AIR_FORCE, DutyLocaton: Adak, AK 99546, departmentIndicator: AIR_AND_SPACE_FORCE, dutyLocation.Address.ID: 78051891-ee44-4a61-9dab-4c1fd0344a76"}

  1. Login using ARMY affiliated service member. Follow steps outlined in step 3.
  2. FF for Hawaii was added to this BL. Search for known HI locations and verify there are no matches.
  3. see INT PR v2 Tests

GBLOC Office Mappings:
MBFL:
JPPSO - ANC JB Elmendorf- Richardson (MBFL)
PPPO Eielson AFB
PPPO JBER Travel Center- Elmendorf
PPPO JBER Travel Center- Richardson

JEAT:
JPPSO - North West (JEAT) - USA
PPPO Fort Leavenworth - USA
PPPO Fort Sill - USA
PPPO McChord Field - USA
PPPO Fort Greely
PPPO Fort Wainwright
PPPO Fort Leonard Wood - USA
PPPO NAVSUP FLC PS Everett - USN
PPPO NAVSUP FLC PS Whidbey Island - USN
PPPO JB Lewis-McChord (Fort Lewis) - USA
PPPO NAVSUP FLC Puget Sound - USN
PPPO Base Seattle - USCG
PPPO Fort Riley - USA

MAPS:
PPPO BSU Kodiak

MAPK:
PPPO Base Ketchikan

Backend

Copy link
Contributor

@antgmann antgmann left a comment

Choose a reason for hiding this comment

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

Matches the combined manual commits of both linked PRs.

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.

2 participants