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

CM: Allow SCM Team members to perform actions for judges #12424

Closed
8 tasks done
lomky opened this issue Oct 17, 2019 · 7 comments · Fixed by #13942
Closed
8 tasks done

CM: Allow SCM Team members to perform actions for judges #12424

lomky opened this issue Oct 17, 2019 · 7 comments · Fixed by #13942
Assignees
Labels
Priority: High Escalations from Support, blocking issue/NO workaround, or "first in" priority for new work. Product: caseflow-queue Stakeholder: BVA Functionality associated with the Board of Veterans' Appeals workflows/feature requests Team: Echo 🐬 User: Judge

Comments

@lomky
Copy link
Contributor

lomky commented Oct 17, 2019

Update the following Judge actions to be available to Special case movement team (ie supersuers).

Acceptance Criteria

  • Supersuers can
    • Request Cases on behalf of the Judge (This is what is blocked by CM: CM Team can view Judge's Assign Queue #12423, can proceed on other 3 if we want to work the tickets in parallel)
    • Assign ama tasks to an attorney by acting on a JudgeAssignTask assigned to a judge
    • Assign legacy tasks to an attorney by acting on a JudgeLegacyAssignTask assigned to a judge
    • Reassign ama case at judge assign to another judge by acting on a JudgeAssignTask assigned to a judge
    • Reassign legacy case at judge assign to another judge by acting on a JudgeLegacyAssignTask assigned to a judge
    • Reassign ama case at judge review to another judge by acting on a JudgeDecisionReviewTask assigned to a judge
  • Functionality is tied to a feature flag.

Unclear if the abilities should be limited to those above, or if it would be acceptable to enable more options if that is the easier path to implement.

Part of #11801

@lomky
Copy link
Contributor Author

lomky commented Nov 14, 2019

What is this graph?

1 | 
2 | |||||
3 | ||||||||||
5 | |||
8 | 

Possibly implemented throught JudgeTeam functions. The logging as actual users should already work, just the assign by will need overridden. Consider breaking it into distinct PRs for the various AC.

Estimating at a 3. Possibly a 2 as it could be pretty straightforward. Repalce judge with admin, good test coverage, just adding the on behalf of. Possibly a 5 because touching a lot of places, unfamiliar to new teammates.

@hschallhorn
Copy link
Contributor

I think we should also confirm that the 'whodunnit' field in the papertrail is the actual user, not the judge

@hschallhorn hschallhorn changed the title SCM: Link Judge Actions to Admin, Crediting Judge SCM: Allow SCM Team members to perform actions for judges Feb 14, 2020
@hschallhorn
Copy link
Contributor

hschallhorn commented Feb 14, 2020

This ticket has been re-scoped to give these actions to the SCM team ONLY. Also, the actual user who made these changes should be credited in the assigned_by column of tasks assigned/reassigned and the whodunnit column of the versions table (should require no code changes).

@hschallhorn hschallhorn removed the blocked This is blocked label Feb 24, 2020
@kevmo kevmo removed their assignment Feb 24, 2020
@ajspotts ajspotts self-assigned this Mar 4, 2020
@hschallhorn hschallhorn added Stakeholder: BVA Functionality associated with the Board of Veterans' Appeals workflows/feature requests Product: caseflow-queue User: Judge Priority: High Escalations from Support, blocking issue/NO workaround, or "first in" priority for new work. labels Mar 4, 2020
@ajspotts
Copy link
Contributor

@hschallhorn Re: Assign legacy/ama tasks to an attorney by acting on a JudgeAssignTask - I had assumed that we wanted the "Assign to attorney" action in the CaseDetailsView return the list of the attorneys assigned to the judge. However @lomky pointed out that alternatively returning all attorneys could also be what the ticket was asking for (see gif below). Could you weigh in to clarify?

Mar-12-2020 12-19-43

@hschallhorn
Copy link
Contributor

hschallhorn commented Mar 12, 2020

I would say whichever is the easier lift (which I assume would be leaving as is). SCM users will have the full list of attorneys by selecting "Other". We can file a followup ticket if they'd like to se the judge's attorneys.

@yoomlam
Copy link
Contributor

yoomlam commented Mar 23, 2020

Should this be closed?

@hschallhorn
Copy link
Contributor

hschallhorn commented Mar 23, 2020

#13726 is still being worked

va-bot pushed a commit that referenced this issue Mar 30, 2020
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
@araposo-tistatech araposo-tistatech changed the title SCM: Allow SCM Team members to perform actions for judges CM: Allow SCM Team members to perform actions for judges Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: High Escalations from Support, blocking issue/NO workaround, or "first in" priority for new work. Product: caseflow-queue Stakeholder: BVA Functionality associated with the Board of Veterans' Appeals workflows/feature requests Team: Echo 🐬 User: Judge
Projects
None yet
7 participants