-
Notifications
You must be signed in to change notification settings - Fork 38
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 19821 sit auth date to db int #12668
B 19821 sit auth date to db int #12668
Conversation
…to B-19821-sit-auth-date-to-db-INT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ran into an issue in your first scenario. Here's how to replicate:
- change auth end date in SIT panel (changes in db are good)
- change SIT entry date for origin 1st day SIT, change reflect in SIT panel but does not update the database
Need to also update SIT auth end date in the database when the SIT entry date update handler fires.
Great catch, fixing now |
Should be working now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Muuuuuuch better. Walked through each scenario and passed all test cases. Good work. This looked like it sucked. LGTM!
Do not merge before #12593
Agility ticket
Summary
The point of this story is to store the SIT authorized end date value in the database so that it can be sent to Homesafe. Previously, this SIT authorized end date was just being calculated on the front end but not stored anywhere.
The sitStatus holds most of the frontend calculations, with
pkg/services/sit_status/shipment_sit_status.go
being where a lot of the meat and potatoes are for the SIT panel on the MTO page.The work here captures that SIT authorized end date value (
sitStatus.CurrentSIT.SITAuthorizedEndDate
) and stores it in themto_shipments
table in either theorigin_sit_auth_end_date
column or thedest_sit_auth_end_date
column, dependent on whethersitStatus.CurrentSIT
isOrigin
orDestination
. Logic was added to the handlers for updating a service item (when the TOO approves the service items, this populates the SIT panel initially), changing the SIT entry date of the service item, a SIT extension creation and approval by the TOO, and approval of a SIT extension request from the prime.We also now return the SIT authorized end date stored on the shipment in the response for the prime v1, v2, and v3
getMoveTaskOrder
endpoints. SIT entry date was already being included in the response for this endpoint at the service item level. Now, HSC will have both the SIT start date and SIT authorized end date available to them which is what the feature is all about.How to test
Origin:
mto_shipments
table. You should see theorigin_sit_auth_end_date
value in the database populated with a value that matches what you see on the MTO page SIT panel for SIT authorized end date.getMoveTaskOrder
endpoint for the move you created (prime v1, v2, or v3). Ensure that you seeoriginSitAuthEndDate
in the response, as well as an accuratesitEntryDate
under theDOFSIT
service item.Request SIT Extension
8. As the prime, find the shipment you created for your new move that still has the current location as origin SIT.
9. "Request SIT Extension" as the prime
10. Go back to the MTO page as the TOO
11. Find the Review request next to "Additional Days Requested"
12. Reject the SIT extension. You can change the dates on the modal, but rejecting should NOT update the SIT auth end date or allowed days.
13. As the prime, request another SIT extension.
14. As the TOO, modify the SIT auth end date or days allowed and approve the extension.
15. Call the prime
getMoveTaskOrder
endpoint for the move you created (prime v1, v2, or v3). Ensure that you seeoriginSitAuthEndDate
in the response, as well as an accuratesitEntryDate
under theDOFSIT
service item.Destination:
mto_shipments
table. You should see thedest_sit_auth_end_date
value in the database populated with a value that matches what you see on the MTO page SIT panel for SIT authorized end date.getMoveTaskOrder
endpoint for the move you created (prime v1, v2, or v3). Ensure that you seedestinationSitAuthEndDate
in the response, as well as an accuratesitEntryDate
under theDDFSIT
service item.Request SIT Extension
8. As the prime, find the shipment you created for your new move that still has the current location as destination SIT.
9. "Request SIT Extension" as the prime
10. Go back to the MTO page as the TOO
11. Find the Review request next to "Additional Days Requested"
12. Reject the SIT extension. You can change the dates on the modal, but rejecting should NOT update the SIT auth end date or allowed days.
13. As the prime, request another SIT extension.
14. As the TOO, modify the SIT auth end date or days allowed and approve the extension.
15. Call the prime
getMoveTaskOrder
endpoint for the move you created (prime v1, v2, or v3). Ensure that you seeoriginSitAuthEndDate
in the response, as well as an accuratesitEntryDate
under theDOFSIT
service item.