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-21427 & B-21430: Update & Populate Addresses is_oconus value #13849

Merged
merged 35 commits into from
Oct 15, 2024

Conversation

TevinAdams
Copy link
Contributor

@TevinAdams TevinAdams commented Oct 7, 2024

B-21427

B-21430

Summary

This PR includes the following changes:

  1. SQL script to update address records in the addresses table with a is_oconus value
  2. Populating the is_oconus value on the addresses table when an address is created
  3. Populating the is_oconus value on the addresses table when an address is updated

*At this time AK and HI is considered OCONUS

There are many areas throughout the mymove workflow and office workflow where an address is created and updated. It would be good to go through all workflows and make sure places where an address is updated or created works properly. is_oconus is not nullable so if an address is being created or updated without an is_oconus value it will throw an error.

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.

  • 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

*Note: AK and HI is considered OCONUS

How to test migration file

  1. Run the migrations
  2. Verify that the record in the addresses table have a true or false value for is_oconus
  3. If country is US or United States then is_oconus should be false. Anything, including state being AK or HI should make is_oconus true

How to test on address creation

  1. Log into MilMove as a customer
  2. Create a new shipment and add the address information
  3. Check the addresses table for the address you created and make sure is_oconus value is populated

How to test on service item creation

  1. Log in as Prime
  2. Go to a shipment
  3. Create a serviceItem on a shipment and add an address
  4. Check the addresses table for the address you entered and make sure is_oconus value is populated

How to test address update

  1. Log in as Prime
  2. Go to a move
  3. Update shipments destination address on a shipment and add an address
  4. Check the addresses table for the address you entered and make sure is_oconus value is populated

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

@TevinAdams TevinAdams added Mountain Movers Movin' Mountains 1 Sprint at a time INTEGRATION Slated for Integration Testing labels Oct 7, 2024
@TevinAdams TevinAdams self-assigned this Oct 7, 2024
@TevinAdams TevinAdams requested a review from a team as a code owner October 7, 2024 16:06
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.

Since we are treating Alaska and Hawaii as OCONUS, we also need to set is_oconus to true for the state values of AK or HI in addition to just checking the country

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.

whoops picked the wrong one

@TevinAdams TevinAdams marked this pull request as draft October 7, 2024 18:01
@TevinAdams TevinAdams marked this pull request as ready for review October 8, 2024 21:04
@danieljordan-caci
Copy link
Contributor

conflicts

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.

Running through customer flow with Alaska FF on - looks like current and backup addresses didn't get the is_oconus flag set to the right value for AK
image

@TevinAdams
Copy link
Contributor Author

Running through customer flow with Alaska FF on - looks like current and backup addresses didn't get the is_oconus flag set to the right value for AK image

Looking into this now

@TevinAdams
Copy link
Contributor Author

Running through customer flow with Alaska FF on - looks like current and backup addresses didn't get the is_oconus flag set to the right value for AK image

Looking into this now

Hey in your test case is the country_id populated? If so what is the country.country value on it?

@traskowskycaci
Copy link
Contributor

Hey in your test case is the country_id populated? If so what is the country.country value on it?

Discussing via slack with Tevin

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.

Would you be able to add the is_oconus value to the various payload to model files to return that value along with the other values in the address object? Similar to how it was done for the market_code

@TevinAdams
Copy link
Contributor Author

Would you be able to add the is_oconus value to the various payload to model files to return that value along with the other values in the address object? Similar to how it was done for the market_code

I intentionally did not add it in any payload because I wasn't aware of any work or requirements that needed it and didn't want to return more data than what's needed. There was a story or the market_code to be returned because current work needed it. There isn't a story to return the is_oconus value on addresses. In my opinion if that is not needed at this time it would be best to create a story to do that so i can move on to getting the marketCode displayed on the cards.

@traskowskycaci
Copy link
Contributor

Would you be able to add the is_oconus value to the various payload to model files to return that value along with the other values in the address object? Similar to how it was done for the market_code

I intentionally did not add it in any payload because I wasn't aware of any work or requirements that needed it and didn't want to return more data than what's needed. There was a story or the market_code to be returned because current work needed it. There isn't a story to return the is_oconus value on addresses. In my opinion if that is not needed at this time it would be best to create a story to do that so i can move on to getting the marketCode displayed on the cards.

Ok. I'll need it for my BL for the internal API and we would probably need it for the office API as there is office user UB work upcoming

@TevinAdams
Copy link
Contributor Author

Would you be able to add the is_oconus value to the various payload to model files to return that value along with the other values in the address object? Similar to how it was done for the market_code

I intentionally did not add it in any payload because I wasn't aware of any work or requirements that needed it and didn't want to return more data than what's needed. There was a story or the market_code to be returned because current work needed it. There isn't a story to return the is_oconus value on addresses. In my opinion if that is not needed at this time it would be best to create a story to do that so i can move on to getting the marketCode displayed on the cards.

Ok. I'll need it for my BL for the internal API and we would probably need it for the office API as there is office user UB work upcoming

Just pushed up a change returning Is_Oconus value where requested.

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.

Tested out and is_oconus values are looking good!

@TevinAdams TevinAdams merged commit cac1646 into integrationTesting Oct 15, 2024
30 checks passed
@TevinAdams TevinAdams deleted the B-21427-Update-addresses-is-oconus-INT branch October 15, 2024 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database INTEGRATION Slated for Integration Testing Mountain Movers Movin' Mountains 1 Sprint at a time
Development

Successfully merging this pull request may close these issues.

5 participants