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 21904 nts oconus int #14384

Open
wants to merge 55 commits into
base: integrationTesting
Choose a base branch
from
Open

Conversation

KonstanceH
Copy link
Contributor

@KonstanceH KonstanceH commented Dec 12, 2024

B-21904

Summary

This PR adds in the pre approved service items for international NTS shipments.

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?

How to test

  1. Login as a TOO
  2. Add an international NTS shipment to a move. Test the variations of the move:
    OCONUS -> OCONUS
    OCONUS -> CONUS... etc
  3. Click on Approve and send.
  4. Confirm on the next pageInternational Shipping and Linehaul and International Packing with NTS Pricing Factor are preapproved service items. Fuel Surcharge - PODFSC should only be pre approved if the shipment is OCONUS -> CONUS

Note: OCONUS -> CONUS etc are determined by the shipments pickupaddress and storage facility address.
Example: NTS Shipment
Pickup Address -> Storage Facility Address == Ordering Type
Alaska -> Alaska == OCONUS -> OCONUS
Iowa -> Alaska == CONUS -> OCONUS

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

OCONUS -> CONUS
Screenshot 2024-12-12 at 4 02 50 PM

OCONUS -> OCONUS
Screenshot 2024-12-12 at 4 01 45 PM

@KonstanceH KonstanceH self-assigned this Dec 12, 2024
@KonstanceH KonstanceH added ByteSize M&Ms Team ByteSized M&Ms INTEGRATION Slated for Integration Testing labels Dec 12, 2024
@KonstanceH KonstanceH marked this pull request as ready for review December 12, 2024 21:43
@KonstanceH KonstanceH requested review from a team as code owners December 12, 2024 21:43
Copy link
Contributor

@taeJungCaci taeJungCaci left a comment

Choose a reason for hiding this comment

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

Just 1 minor thing to check - everything else looks good to me.

taeJungCaci
taeJungCaci previously approved these changes Dec 13, 2024
Copy link
Contributor

@taeJungCaci taeJungCaci left a comment

Choose a reason for hiding this comment

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

LGTM!

JamesHawks224
JamesHawks224 previously approved these changes Dec 13, 2024
Copy link
Contributor

@JamesHawks224 JamesHawks224 left a comment

Choose a reason for hiding this comment

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

testing: success
code: lgtm

INSERT INTO re_service_items
(id, service_id, shipment_type, market_code, is_auto_approved, created_at, updated_at, sort)
VALUES
('2a560507-db09-4be1-b809-49c0f515b31b', '9f3d551a-0725-430e-897e-80ee9add3ae9' ,'HHG_INTO_NTS_DOMESTIC', 'i', true, now(), now(), 1),
Copy link
Contributor

Choose a reason for hiding this comment

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

The shipment type should be updated to HHG_INTO_NTS (remove DOMESTIC). I see we have B-21905 to update this so I think that BL should be an upstream to this one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea I saw that after I was already knee deep in this story so I figured since its just adding these records, it'd be okay to do the name change after. Tae's working the other story that's handling that name change and we had already talked about it. BUT I don't mind putting this on hold until his story gets in and then I can make the name change on this pr either.

Copy link
Contributor

Choose a reason for hiding this comment

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

I should be almost finished with name change story. Just need to test if anything is broken lol. I'd be okay with you holding this story until mine gets in. Then I don't have to do rename changes for your DB stuff.

Copy link
Contributor Author

@KonstanceH KonstanceH Dec 16, 2024

Choose a reason for hiding this comment

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

okay sounds like a plan to me. I have to wait for a response from the gov anyway. So I'll hold this until yours gets in.

Copy link
Contributor

@taeJungCaci taeJungCaci Dec 18, 2024

Choose a reason for hiding this comment

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

The changes for renaming NTS is in IntegrationBranch now and you should be able to merge in MAIN-B-21905-rename-nts-shipment-type to your Story Main branch and then make the name changes to your files -> then merge those changes here. This is the Main PR for ref.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added in the name change and the migration file from my main branch so this should be good to go for another review.

@KonstanceH
Copy link
Contributor Author

@KonstanceH adding this nil check fixed it, but should we consider shipment type in that check?

		if newShipment.MarketCode == models.MarketCodeInternational &&
			newShipment.PrimeEstimatedWeight != nil ||
			newShipment.PickupAddress != nil && dbShipment.PickupAddress != nil && newShipment.PickupAddress.PostalCode != dbShipment.PickupAddress.PostalCode ||
			newShipment.DestinationAddress != nil && dbShipment.DestinationAddress != nil && newShipment.DestinationAddress.PostalCode != dbShipment.DestinationAddress.PostalCode ||
			newShipment.RequestedPickupDate != nil && newShipment.RequestedPickupDate.Format("2006-01-02") != dbShipment.RequestedPickupDate.Format("2006-01-02") {

Yea I think there should be a shipment type check for NTS shipments because they're the only ones that there's a conversion from storage address to destination address that happens in the db. But that makes me think doesn't that happen right after the NTS is created?

Doesn't the TOO input the storage address if the customer created the NTS?

I don't think so? or at least I thought the customer could add the storage address from their creation of the nts.

@danieljordan-caci
Copy link
Contributor

I also have a question - when we have a domestic NTS shipment, but it has an OCONUS storage facility... Should that still have domestic service items or the international ones?

Trying to understand this. If it has an OCONUS storage facility, it wouldn't be a domestic NTS right?

Yeah we might have an upstream problem here because, in my head, if either the pickup/destination (in this case, pickup/storage) is OCONUS, the shipment needs to be international

@brianmanley-caci
Copy link
Contributor

Yeah we might have an upstream problem here because, in my head, if either the pickup/destination (in this case, pickup/storage) is OCONUS, the shipment needs to be international

Yes, I would agree with that.

@danieljordan-caci
Copy link
Contributor

@KonstanceH adding this nil check fixed it, but should we consider shipment type in that check?

		if newShipment.MarketCode == models.MarketCodeInternational &&
			newShipment.PrimeEstimatedWeight != nil ||
			newShipment.PickupAddress != nil && dbShipment.PickupAddress != nil && newShipment.PickupAddress.PostalCode != dbShipment.PickupAddress.PostalCode ||
			newShipment.DestinationAddress != nil && dbShipment.DestinationAddress != nil && newShipment.DestinationAddress.PostalCode != dbShipment.DestinationAddress.PostalCode ||
			newShipment.RequestedPickupDate != nil && newShipment.RequestedPickupDate.Format("2006-01-02") != dbShipment.RequestedPickupDate.Format("2006-01-02") {

Yea I think there should be a shipment type check for NTS shipments because they're the only ones that there's a conversion from storage address to destination address that happens in the db. But that makes me think doesn't that happen right after the NTS is created?

Doesn't the TOO input the storage address if the customer created the NTS?

I don't think so? or at least I thought the customer could add the storage address from their creation of the nts.

Customer only provides the pickup address for NTS

@KonstanceH
Copy link
Contributor Author

KonstanceH commented Jan 8, 2025

I also have a question - when we have a domestic NTS shipment, but it has an OCONUS storage facility... Should that still have domestic service items or the international ones?

They should have international ones. I must've messed something up on the creation I'm looking into now

I believe this is the same issue I raised @KonstanceH where the NTS is registering as dNTS instead of iNTS when the customer creates NTS and the TOO inputs the AK storage facility address.

OOH okay. Well then yea in that case we were just talking about this earlier. Its a bug. And its a special case for ONLY this case on editing dNTS shipments for the first time the shipment market code doesn't flip to international when the addresses are changed to OCONUS. I was waiting on direction from our scrum master to see how to go about getting the process started on reporting the bug.

@danieljordan-caci
Copy link
Contributor

danieljordan-caci commented Jan 8, 2025

I also have a question - when we have a domestic NTS shipment, but it has an OCONUS storage facility... Should that still have domestic service items or the international ones?

They should have international ones. I must've messed something up on the creation I'm looking into now

I believe this is the same issue I raised @KonstanceH where the NTS is registering as dNTS instead of iNTS when the customer creates NTS and the TOO inputs the AK storage facility address.

OOH okay. Well then yea in that case we were just talking about this earlier. Its a bug. And its a special case for ONLY this case on editing dNTS shipments for the first time the shipment market code doesn't flip to international when the addresses are changed to OCONUS. I was waiting on direction from our scrum master to see how to go about getting the process started on reporting the bug.

Wouldn't that be a blocker for this work?

@KonstanceH
Copy link
Contributor Author

KonstanceH commented Jan 8, 2025

I also have a question - when we have a domestic NTS shipment, but it has an OCONUS storage facility... Should that still have domestic service items or the international ones?

They should have international ones. I must've messed something up on the creation I'm looking into now

I believe this is the same issue I raised @KonstanceH where the NTS is registering as dNTS instead of iNTS when the customer creates NTS and the TOO inputs the AK storage facility address.

OOH okay. Well then yea in that case we were just talking about this earlier. Its a bug. And its a special case for ONLY this case on editing dNTS shipments for the first time the shipment market code doesn't flip to international when the addresses are changed to OCONUS. I was waiting on direction from our scrum master to see how to go about getting the process started on reporting the bug.

Wouldn't that be a blocker for this work?

I don't think so because the bug exists now in milmove. The code I'm adding works for this features AC. I think that bug has more to do with updating the shipment in general and that would effect more than the service items. But that's just my lowly dev thoughts lol I think this is a question for the government?

@taeJungCaci
Copy link
Contributor

taeJungCaci commented Jan 8, 2025

I also have a question - when we have a domestic NTS shipment, but it has an OCONUS storage facility... Should that still have domestic service items or the international ones?

They should have international ones. I must've messed something up on the creation I'm looking into now

I believe this is the same issue I raised @KonstanceH where the NTS is registering as dNTS instead of iNTS when the customer creates NTS and the TOO inputs the AK storage facility address.

OOH okay. Well then yea in that case we were just talking about this earlier. Its a bug. And its a special case for ONLY this case on editing dNTS shipments for the first time the shipment market code doesn't flip to international when the addresses are changed to OCONUS. I was waiting on direction from our scrum master to see how to go about getting the process started on reporting the bug.

Wouldn't that be a blocker for this work?

A workaround - If you "edit shipment" for the 2nd time and then save with AK address - it switches to iNTS

@danieljordan-caci
Copy link
Contributor

danieljordan-caci commented Jan 8, 2025

I also have a question - when we have a domestic NTS shipment, but it has an OCONUS storage facility... Should that still have domestic service items or the international ones?

They should have international ones. I must've messed something up on the creation I'm looking into now

I believe this is the same issue I raised @KonstanceH where the NTS is registering as dNTS instead of iNTS when the customer creates NTS and the TOO inputs the AK storage facility address.

OOH okay. Well then yea in that case we were just talking about this earlier. Its a bug. And its a special case for ONLY this case on editing dNTS shipments for the first time the shipment market code doesn't flip to international when the addresses are changed to OCONUS. I was waiting on direction from our scrum master to see how to go about getting the process started on reporting the bug.

Wouldn't that be a blocker for this work?

A workaround - If you "edit shipment" for the 2nd time and then save with AK address - it switches to iNTS

Is there an issue created for this bug? @KonstanceH @taeJungCaci

@KonstanceH
Copy link
Contributor Author

KonstanceH commented Jan 8, 2025

I also have a question - when we have a domestic NTS shipment, but it has an OCONUS storage facility... Should that still have domestic service items or the international ones?

They should have international ones. I must've messed something up on the creation I'm looking into now

I believe this is the same issue I raised @KonstanceH where the NTS is registering as dNTS instead of iNTS when the customer creates NTS and the TOO inputs the AK storage facility address.

OOH okay. Well then yea in that case we were just talking about this earlier. Its a bug. And its a special case for ONLY this case on editing dNTS shipments for the first time the shipment market code doesn't flip to international when the addresses are changed to OCONUS. I was waiting on direction from our scrum master to see how to go about getting the process started on reporting the bug.

Wouldn't that be a blocker for this work?

A workaround - If you "edit shipment" for the 2nd time and then save with AK address - it switches to iNTS

Yea this^^ also they could create a new shipment for the marketCode change and delete the old one

@KonstanceH
Copy link
Contributor Author

KonstanceH commented Jan 8, 2025

I also have a question - when we have a domestic NTS shipment, but it has an OCONUS storage facility... Should that still have domestic service items or the international ones?

They should have international ones. I must've messed something up on the creation I'm looking into now

I believe this is the same issue I raised @KonstanceH where the NTS is registering as dNTS instead of iNTS when the customer creates NTS and the TOO inputs the AK storage facility address.

OOH okay. Well then yea in that case we were just talking about this earlier. Its a bug. And its a special case for ONLY this case on editing dNTS shipments for the first time the shipment market code doesn't flip to international when the addresses are changed to OCONUS. I was waiting on direction from our scrum master to see how to go about getting the process started on reporting the bug.

Wouldn't that be a blocker for this work?

A workaround - If you "edit shipment" for the 2nd time and then save with AK address - it switches to iNTS

Is there an issue created for this bug? @KonstanceH @taeJungCaci

Yea @danieljordan-caci that was the part about waiting to hear back on how to report it lol
For bug issues can we just create them ourselves/follow the issue template and go on about our day? or is there more to it?
Because if I can just do it myself I'll make one now

@danieljordan-caci
Copy link
Contributor

Is there an issue created for this bug? @KonstanceH @taeJungCaci

Yea @danieljordan-caci that was the part about waiting to hear back on how to report it lol For bug issues can we just create them ourselves/follow the issue template and go on about our day? or is there more to it? Because if I can just do it myself I'll make one now

Oh yeah I create issues all the time! Ideal process is to create the issue, provide analysis & fix, testers confirm, get PO to create a BL from the issue -> fix the issue

@KonstanceH
Copy link
Contributor Author

Is there an issue created for this bug? @KonstanceH @taeJungCaci

Yea @danieljordan-caci that was the part about waiting to hear back on how to report it lol For bug issues can we just create them ourselves/follow the issue template and go on about our day? or is there more to it? Because if I can just do it myself I'll make one now

Oh yeah I create issues all the time! Ideal process is to create the issue, provide analysis & fix, testers confirm, get PO to create a BL from the issue -> fix the issue

oh nice! I'll get on it now and tag the issue in this pr

@danieljordan-caci
Copy link
Contributor

Is there an issue created for this bug? @KonstanceH @taeJungCaci

Yea @danieljordan-caci that was the part about waiting to hear back on how to report it lol For bug issues can we just create them ourselves/follow the issue template and go on about our day? or is there more to it? Because if I can just do it myself I'll make one now

Oh yeah I create issues all the time! Ideal process is to create the issue, provide analysis & fix, testers confirm, get PO to create a BL from the issue -> fix the issue

oh nice! I'll get on it now and tag the issue in this pr

Cool cool. For now if you can get a fix in for that nil check, rest looks good.

@KonstanceH
Copy link
Contributor Author

KonstanceH commented Jan 8, 2025

Is there an issue created for this bug? @KonstanceH @taeJungCaci

Yea @danieljordan-caci that was the part about waiting to hear back on how to report it lol For bug issues can we just create them ourselves/follow the issue template and go on about our day? or is there more to it? Because if I can just do it myself I'll make one now

Oh yeah I create issues all the time! Ideal process is to create the issue, provide analysis & fix, testers confirm, get PO to create a BL from the issue -> fix the issue

oh nice! I'll get on it now and tag the issue in this pr

Cool cool. For now if you can get a fix in for that nil check, rest looks good.

Okay cool the issue is created adding it here for reference:
https://www13.v1host.com/USTRANSCOM38/Issue.mvc/Summary?oidToken=Issue%3A1050704

@KonstanceH KonstanceH closed this Jan 8, 2025
@KonstanceH KonstanceH reopened this Jan 8, 2025
if newShipment.MarketCode == models.MarketCodeInternational &&
(newShipment.PrimeEstimatedWeight != nil ||
if dbShipment.PickupAddress != nil && dbShipment.DestinationAddress != nil &&
newShipment.ShipmentType == models.MTOShipmentTypeHHGIntoNTS || newShipment.ShipmentType == models.MTOShipmentTypeHHGOutOfNTSDom {
Copy link
Contributor

Choose a reason for hiding this comment

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

This specific function is addressing updating estimated pricing for this shipment type. Has the upstream db functions/procs been updated to accommodate international NTS & NTSr shipments?

Copy link
Contributor

Choose a reason for hiding this comment

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

You also are eliminating this check for iHHG moves, which is what it was originally created for.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay this should be good now. I'll see about these failing circleCI tests tomorrow @_@

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ByteSize M&Ms Team ByteSized M&Ms INTEGRATION Slated for Integration Testing
Development

Successfully merging this pull request may close these issues.

6 participants