Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow SCM team members to move AMA cases (#13786)
Bumps #12424 ### Description This PR addresses all of the AMA AC from #12424 except for Request Cases on behalf of the Judge which is addressed by #13727. Allows SCM users to perform all assigning and reassigning judges can on AMA cases. ### Acceptance Criteria - [x] Reassign ama case at judge assign to another judge by acting on a JudgeAssignTask assigned to a judge - [x] Assign ama tasks to an attorney by acting on a JudgeAssignTask assigned to a judge - [x] Reassign ama tasks to an attorney by acting on an AttorneyTask assigned to an attorney - [x] Cancel an ama AttorneyTask to send it back to the judge - [x] Reassign ama case at judge review to another judge by acting on a JudgeDecisionReviewTask assigned to a judge ### Testing Plan #### AMA at judge assign 1. Sign in as BVARDUNKLE and go to /queue/3/assign (BVAAAAABSHIRE's assign queue) 2. Pick an AMA assign task and go to the case details screen 3. Check the starting task tree ```ruby Appeal.find_by(uuid: "52eaece1-0f6a-403a-844d-8882f7adfe3b").treee ┌────────────────────────────────────────────────────────────────────┐ Appeal 338 (evidence_submission) ─────── │ ID │ STATUS │ ASGN_BY │ ASGN_TO │ UPDATED_AT │ └── RootTask │ 1581 │ on_hold │ │ Bva │ 2020-03-17 20:50:11 UTC │ ├── DistributionTask │ 1582 │ completed │ │ Bva │ 2020-03-17 20:50:53 UTC │ │ └── EvidenceSubmissionWindowTask │ 1583 │ assigned │ │ MailTeam │ 2020-03-17 20:50:11 UTC │ └── JudgeAssignTask │ 1584 │ assigned │ │ BVAAABSHIRE │ 2020-03-17 20:50:53 UTC │ └────────────────────────────────────────────────────────────────────┘ ``` 4. Select "Re-assign to a judge" and reassign to "JudgeHasAttorneys_Cases" 5. Task tree shows cancelled original assign task, new task is assigned to BVARERDMAN and assigned by BVARDUNKLE ```ruby ┌───────────────────────────────────────────────────────────────────────┐ Appeal 338 (evidence_submission) ─────── │ ID │ STATUS │ ASGN_BY │ ASGN_TO │ UPDATED_AT │ └── RootTask │ 1581 │ on_hold │ │ Bva │ 2020-03-17 20:50:11 UTC │ ├── DistributionTask │ 1582 │ completed │ │ Bva │ 2020-03-17 20:50:53 UTC │ │ └── EvidenceSubmissionWindowTask │ 1583 │ assigned │ │ MailTeam │ 2020-03-17 20:50:11 UTC │ ├── JudgeAssignTask │ 1584 │ cancelled │ │ BVAAABSHIRE │ 2020-03-23 16:03:58 UTC │ └── JudgeAssignTask │ 1604 │ assigned │ BVARDUNKLE │ BVARERDMAN │ 2020-03-23 16:03:58 UTC │ └───────────────────────────────────────────────────────────────────────┘ ``` 6. Go back to the case details of this case, assigned to and assigned by are updated 7. Select "Assign to attorney" and assign to "Steve Casper" 8. Task tree shows complete Assign task, new decision review task is assigned to BVARERDMAN, assigned by BVARDUNKLE, and a new attorney task assigned to BVASCASPER1, assigned by BVARDUNKLE ```ruby ┌───────────────────────────────────────────────────────────────────────┐ Appeal 338 (evidence_submission) ─────── │ ID │ STATUS │ ASGN_BY │ ASGN_TO │ UPDATED_AT │ └── RootTask │ 1581 │ on_hold │ │ Bva │ 2020-03-17 20:50:11 UTC │ ├── DistributionTask │ 1582 │ completed │ │ Bva │ 2020-03-17 20:50:53 UTC │ │ └── EvidenceSubmissionWindowTask │ 1583 │ assigned │ │ MailTeam │ 2020-03-17 20:50:11 UTC │ ├── JudgeAssignTask │ 1584 │ cancelled │ │ BVAAABSHIRE │ 2020-03-23 16:03:58 UTC │ ├── JudgeAssignTask │ 1604 │ completed │ BVARDUNKLE │ BVARERDMAN │ 2020-03-23 16:07:14 UTC │ └── JudgeDecisionReviewTask │ 1605 │ on_hold │ BVARDUNKLE │ BVARERDMAN │ 2020-03-23 16:07:15 UTC │ └── AttorneyTask │ 1606 │ assigned │ BVARDUNKLE │ BVASCASPER1 │ 2020-03-23 16:07:15 UTC │ └───────────────────────────────────────────────────────────────────────┘ ``` 9. Go back to the case details of this case, assigned to and assigned by are updated 10. Select "Assign to attorney" and assign to "Lexi Brown" 11. Task tree shows the updated assignee of BVALBROWN ```ruby ┌───────────────────────────────────────────────────────────────────────┐ Appeal 338 (evidence_submission) ─────── │ ID │ STATUS │ ASGN_BY │ ASGN_TO │ UPDATED_AT │ └── RootTask │ 1581 │ on_hold │ │ Bva │ 2020-03-17 20:50:11 UTC │ ├── DistributionTask │ 1582 │ completed │ │ Bva │ 2020-03-17 20:50:53 UTC │ │ └── EvidenceSubmissionWindowTask │ 1583 │ assigned │ │ MailTeam │ 2020-03-17 20:50:11 UTC │ ├── JudgeAssignTask │ 1584 │ cancelled │ │ BVAAABSHIRE │ 2020-03-23 16:03:58 UTC │ ├── JudgeAssignTask │ 1604 │ completed │ BVARDUNKLE │ BVARERDMAN │ 2020-03-23 16:07:14 UTC │ └── JudgeDecisionReviewTask │ 1605 │ on_hold │ BVARDUNKLE │ BVARERDMAN │ 2020-03-23 16:07:15 UTC │ └── AttorneyTask │ 1606 │ assigned │ BVARDUNKLE │ BVALBROWN │ 2020-03-23 16:09:47 UTC │ └───────────────────────────────────────────────────────────────────────┘ ``` 12. Go back to the case details of this case, assigned to is updated 13. Select "Cancel task" 14. Task tree shows cancelled attorney and judge decision review task, new. judge assign task assigned to BVAAABSHIRE ```ruby ┌───────────────────────────────────────────────────────────────────────┐ Appeal 338 (evidence_submission) ─────── │ ID │ STATUS │ ASGN_BY │ ASGN_TO │ UPDATED_AT │ └── RootTask │ 1581 │ on_hold │ │ Bva │ 2020-03-17 20:50:11 UTC │ ├── DistributionTask │ 1582 │ completed │ │ Bva │ 2020-03-17 20:50:53 UTC │ │ └── EvidenceSubmissionWindowTask │ 1583 │ assigned │ │ MailTeam │ 2020-03-17 20:50:11 UTC │ ├── JudgeAssignTask │ 1584 │ cancelled │ │ BVAAABSHIRE │ 2020-03-23 16:03:58 UTC │ ├── JudgeAssignTask │ 1604 │ completed │ BVARDUNKLE │ BVARERDMAN │ 2020-03-23 16:07:14 UTC │ ├── JudgeDecisionReviewTask │ 1605 │ cancelled │ BVARDUNKLE │ BVARERDMAN │ 2020-03-23 16:12:20 UTC │ │ └── AttorneyTask │ 1606 │ cancelled │ BVARDUNKLE │ BVALBROWN │ 2020-03-23 16:12:20 UTC │ └── JudgeAssignTask │ 1614 │ assigned │ │ BVAAABSHIRE │ 2020-03-23 16:15:38 UTC │ └───────────────────────────────────────────────────────────────────────┘ ``` - [x] Reassign ama case at judge assign to another judge by acting on a JudgeAssignTask assigned to a judge - [x] Assign ama tasks to an attorney by acting on a JudgeAssignTask assigned to a judge - [x] Reassign ama tasks to an attorney by acting on an AttorneyTask assigned to an attorney - [ ] Cancel an ama AttorneyTask to send it back to the judge #### AMA at judge decision review 1. Pick a judge decision review task assigned to BVAAABSHIRE ```ruby uuid = JudgeDecisionReviewTask.open.where(assigned_to: User.find(3)).first.appeal.uuid => "92d5c3a6-32b4-4e9e-8a74-e1bfab94f17a" Appeal.find_by(uuid: uuid).treee ┌───────────────────────────────────────────────────────────────────────┐ Appeal 52 (direct_review) ───── │ ID │ STATUS │ ASGN_BY │ ASGN_TO │ UPDATED_AT │ └── RootTask │ 585 │ on_hold │ │ Bva │ 2020-03-05 17:16:52 UTC │ └── JudgeDecisionReviewTask │ 586 │ assigned │ CSS_ID103 │ BVAAABSHIRE │ 2020-03-05 17:16:52 UTC │ └── AttorneyTask │ 587 │ completed │ BVAAABSHIRE │ BVASCASPER1 │ 2020-03-05 17:16:52 UTC │ └───────────────────────────────────────────────────────────────────────┘ ``` 2. Go to the case details page for this case (/queue/appeals/92d5c3a6-32b4-4e9e-8a74-e1bfab94f17a) 3. Select "Re-assign to a judge" and reassign to "JudgeHasAttorneys_Cases" 4. Task tree shows cancelled original assigne task, new task is assigned to BVARERDMAN and assigned by BVARDUNKLE, keeps the completed attorney child task ```ruby ┌────────────────────────────────────────────────────────────────────────┐ Appeal 52 (direct_review) ───── │ ID │ STATUS │ ASGN_BY │ ASGN_TO │ UPDATED_AT │ └── RootTask │ 585 │ on_hold │ │ Bva │ 2020-03-05 17:16:52 UTC │ ├── JudgeDecisionReviewTask │ 586 │ cancelled │ CSS_ID103 │ BVAAABSHIRE │ 2020-03-23 16:22:57 UTC │ └── JudgeDecisionReviewTask │ 1615 │ assigned │ BVARDUNKLE │ BVARERDMAN │ 2020-03-23 16:22:57 UTC │ └── AttorneyTask │ 587 │ completed │ BVAAABSHIRE │ BVASCASPER1 │ 2020-03-23 16:22:57 UTC │ └────────────────────────────────────────────────────────────────────────┘ ``` 5. Go back to the case details of this case, assigned to and assigned by are updated - [x] Reassign ama case at judge review to another judge by acting on a JudgeDecisionReviewTask assigned to a judge
- Loading branch information