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-21941 TOO Queue Filtering For Destination Only Requests #14465

Draft
wants to merge 33 commits into
base: integrationTesting
Choose a base branch
from

Conversation

traskowskycaci
Copy link
Contributor

@traskowskycaci traskowskycaci commented Dec 24, 2024

Agility ticket

Summary

This query gave me a run for my money - to filter out moves from the main TOO queue with only destination requests, we have to do some joins and check for destination requests, like destination SIT or destination address changes - as well as check that we only have those and not anything else that should keep the move in the TOO main queue (such as excess weight warnings).

I added a locator check in the tooDestinationOnlyRequestsFilter function, otherwise it would pull in moves with excess weight on every search, in addition to the move searched for.

How to test

Some test cases to try - please try various combos of these as you see fit.

Test cases:

1. New move
2. SC counsels
3. TOO approves
4. Prime adds origin SIT service items
5. Check TOO queue - should appear
6. TOO approves origin SIT service items
7. Check too queue - should not appear
8. Prime adds dest SIT service items
9. Check TOO queue - should not appear
10. Check dest queue - should appear
11. Approves dest SIT service items
12. Check TOO queue - should still not appear
13. Check dest queue - should not appear
14. Update dest address to have a delivery address update request ( > 50 miles)
15. Check too queue - should not appear
16. Check dest queue - should appear
17. Trigger move for excess weight as prime
18. Check TOO queue - should appear
19. Check dest queue - should not appear
1. New move
2. SC counsels
3. TOO approves
4. Prime adds origin SIT service items
5. Check TOO queue - should appear
6. TOO approves origin SIT service items
7. Check TOO queue - should not appear
8. Prime adds dest SIT service items
9. Check TOO queue - should not appear
10. Check dest queue - should appear
11. Trigger move for excess weight as prime
12. Check TOO queue - should appear
13. Check dest queue - should not appear
14. Approve dest SIT service items
15. Check TOO queue - should still not appear
16. Check dest queue - should not appear
17. Update dest address to have a delivery address update request ( > 50 miles)
18. Check TOO queue - should not appear
19. Check dest queue - should appear
1. New move
2. SC
3. TOO approve
4. Prime addes origin SIT service items
5. Check TOO queue - should appear
6. Prime adds dest SIT service items
7. check too queue - should appear
8. check dest queue - should appear
9. approve dest SIT service items
10. check too queue - should still appear
11. check dest queue - should not appear

samaysofo and others added 27 commits December 18, 2024 20:06
…on-Submit-move-details-task-order-with-files
…t-move-details-task-order-with-files

Main b 21373 validation submit move details task order with files
@traskowskycaci traskowskycaci self-assigned this Dec 24, 2024
@traskowskycaci traskowskycaci added Mountain Movers Movin' Mountains 1 Sprint at a time INTEGRATION Slated for Integration Testing labels Dec 24, 2024
@traskowskycaci traskowskycaci marked this pull request as ready for review December 24, 2024 14:24
@traskowskycaci traskowskycaci requested review from a team as code owners December 24, 2024 14:24
}, nil)

suite.NotNil(shipment)
// newTestUUID := uuid.UUID{}
Copy link
Contributor

Choose a reason for hiding this comment

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

left in a comment here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Whoops! Fixed here

})

suite.Run("task order queue does not return move with ONLY requested destination SIT service items", func() {
// officeUser, _, session := setupTestData()
Copy link
Contributor

Choose a reason for hiding this comment

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

comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Whoops! Fixed here

func tooDestinationOnlyRequestsFilter(role roles.RoleType, locator *string) QueryOption {
return func(query *pop.Query) {
if role == roles.RoleTypeTOO {
if locator != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

So I have a question on this part. It seems like this allows them to use the column filter to filter by a move code that wasn't in the table. Is that the desired behavior? It seems kind of odd to me, but maybe that's what they asked 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.

Great catch - pushing up a change now to address that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed this here but broke a test - moving PR back to draft, will pick back up when I come back next week

} else {
query.Where(`
(
(mto_service_items.status IS NULL OR (mto_service_items.status = 'SUBMITTED' AND re_services.code IN ('DOFSIT', 'DOASIT', 'DODSIT', 'DOSHUT', 'DOSFSC', 'IOFSIT', 'IOASIT', 'IODSIT', 'IOSHUT')))
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this not apply to other origin services like IOPSIT, ICRT, IOSFSC?

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 here

@traskowskycaci traskowskycaci marked this pull request as draft December 27, 2024 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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.

6 participants