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

Cancellation of an AttorneyRewriteTask should reactivate JudgeDecisionReviewTask, not JudgeAssignTask #15218

Closed
3 tasks
lomky opened this issue Sep 11, 2020 · 2 comments · Fixed by #15493
Closed
3 tasks
Assignees
Labels
Eng: Beginner Friendly Good tickets for new team members Priority: Low Reported issue, not a blocker. "Last in" priority for new work. Product: caseflow-queue Source: Bat Team Stakeholder: BVA Functionality associated with the Board of Veterans' Appeals workflows/feature requests Team: Echo 🐬 Type: Bug User: Attorney User: Judge

Comments

@lomky
Copy link
Contributor

lomky commented Sep 11, 2020

Description

AttorneyRewriteTasks inherit their behavior from AttorneyTasks. Upon cancelling an AttorneyTask we cancel the associated JudgeDecisionReviewTask and open a new JudgeAssignTask. This is correct behavior for a normal AttorneyTask. However when we have an AttorneyRewriteTask the JudgeDecisionReviewTask is properly working, and we should not cancelled it.

Override the cancel flow behavior in AttorneyRewriteTasks

Acceptance criteria

  • AttorneyRewriteTasks return control to the JudgeDecisionReviewTasks, instead of cancelling them and creating a JudgeAssignTask
  • Bulk Reassign handles this case properly
  • Update any Bat Team docs

Background/context/resources

Example case

Technical notes

@lomky lomky added Product: caseflow-queue Type: Bug User: Judge User: Attorney Stakeholder: BVA Functionality associated with the Board of Veterans' Appeals workflows/feature requests Source: Bat Team Team: Echo 🐬 Priority: Low Reported issue, not a blocker. "Last in" priority for new work. labels Sep 11, 2020
@hschallhorn
Copy link
Contributor

Original offending line: https://github.com/department-of-veterans-affairs/caseflow/pull/12295/files#diff-9a9376e40c278cc9cd0d09a8ffc60f1dR67
(all other attorney subclasses would be caught by this callback)
The og fix: bab4a7f#diff-9a9376e40c278cc9cd0d09a8ffc60f1dR67
(Explicitly check for the type)
Ticket to help catch some of these errors #14133
PR that reintroduced this: #14448

@hschallhorn hschallhorn changed the title Cancellation of an AttorneyRewriteTasks should reactivate JudgeDecisionReviewTask, not JudgeAssignTask Cancellation of an AttorneyRewriteTask should reactivate JudgeDecisionReviewTask, not JudgeAssignTask Sep 17, 2020
@ajspotts
Copy link
Contributor

what is this chart?

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

Check that task is an AttorneyTask rather than a child class of AttorneyTask.

Task trees during Decision phase

Offending line that sends any attorney task class back to judge assign: https://github.com/department-of-veterans-affairs/caseflow/pull/14448/files#diff-9a9376e40c278cc9cd0d09a8ffc60f1dR66

Why 1?

  • simple type == AttorneyTask.name before sending back to judge assign

Why 2?

  • Testing 😄

@lomky lomky added the Eng: Beginner Friendly Good tickets for new team members label Oct 16, 2020
@hschallhorn hschallhorn self-assigned this Oct 26, 2020
va-bot pushed a commit that referenced this issue Oct 26, 2020
Resolves #15218

### Description
Cancelling ONLY `AttorneyTask`s will send a case back to judge assign.

### Acceptance Criteria
- [ ] When cancelling a task, `AttorneyTask` _subtypes_ return control to their parent, instead of cancelling them and creating a `JudgeAssignTask`
- [ ] When cancelling a task, `AttorneyTasks` cancel their parent `JudgeDecisionReviewTask` and create a `JudgeAssignTask`

### Testing Plan
1. Log in as a dispatch user and send a case back to a judge
1. Log in as the judge and send the case back to an attorney
```ruby
Appeal.find_by_uuid("dc932435-af1b-4f07-8d37-f0a1088597ce").treee
                                               ┌──────────────────────────────────────────────────────────────────────────────┐
Appeal 346 (hearing) ───────────────────────── │ ID   │ STATUS      │ ASGN_BY       │ ASGN_TO       │ UPDATED_AT              │
└── RootTask                                   │ 972  │ on_hold     │               │ Bva           │ 2020-10-19 14:09:00 UTC │
    ├── DistributionTask                       │ 973  │ on_hold     │               │ Bva           │ 2020-10-19 14:09:00 UTC │
    │   └── HearingTask                        │ 974  │ on_hold     │               │ Bva           │ 2020-10-19 14:09:00 UTC │
    │       └── ScheduleHearingTask            │ 975  │ assigned    │               │ Bva           │ 2020-10-19 14:09:00 UTC │
    ├── JudgeDecisionReviewTask                │ 976  │ completed   │ CSS_ID17      │ BVAAWAKEFIELD │ 2020-10-19 14:09:01 UTC │
    │   └── AttorneyTask                       │ 977  │ completed   │ BVAAWAKEFIELD │ BVAABELANGER  │ 2020-10-19 14:09:00 UTC │
    └── BvaDispatchTask                        │ 978  │ on_hold     │               │ BvaDispatch   │ 2020-10-19 14:09:01 UTC │
        └── BvaDispatchTask                    │ 979  │ on_hold     │               │ BVAGWHITE     │ 2020-10-26 19:48:36 UTC │
            └── JudgeDispatchReturnTask        │ 3415 │ on_hold     │ BVAGWHITE     │ BVAAABSHIRE   │ 2020-10-26 20:07:39 UTC │
                └── AttorneyDispatchReturnTask │ 3416 │ in_progress │ BVAAABSHIRE   │ BVAEERDMAN    │ 2020-10-26 20:08:13 UTC │
                                               └──────────────────────────────────────────────────────────────────────────────┘
```
1. Log in as the attorney and cancel the task.
1. Confirm this does not send the case back to judge assign and instead makes the parent task "assigned"
```ruby
Appeal.find_by_uuid("dc932435-af1b-4f07-8d37-f0a1088597ce").treee
                                               ┌────────────────────────────────────────────────────────────────────────────┐
Appeal 346 (hearing) ───────────────────────── │ ID   │ STATUS    │ ASGN_BY       │ ASGN_TO       │ UPDATED_AT              │
└── RootTask                                   │ 972  │ on_hold   │               │ Bva           │ 2020-10-19 14:09:00 UTC │
    ├── DistributionTask                       │ 973  │ on_hold   │               │ Bva           │ 2020-10-19 14:09:00 UTC │
    │   └── HearingTask                        │ 974  │ on_hold   │               │ Bva           │ 2020-10-19 14:09:00 UTC │
    │       └── ScheduleHearingTask            │ 975  │ assigned  │               │ Bva           │ 2020-10-19 14:09:00 UTC │
    ├── JudgeDecisionReviewTask                │ 976  │ completed │ CSS_ID17      │ BVAAWAKEFIELD │ 2020-10-19 14:09:01 UTC │
    │   └── AttorneyTask                       │ 977  │ completed │ BVAAWAKEFIELD │ BVAABELANGER  │ 2020-10-19 14:09:00 UTC │
    └── BvaDispatchTask                        │ 978  │ on_hold   │               │ BvaDispatch   │ 2020-10-19 14:09:01 UTC │
        └── BvaDispatchTask                    │ 979  │ on_hold   │               │ BVAGWHITE     │ 2020-10-26 19:48:36 UTC │
            └── JudgeDispatchReturnTask        │ 3415 │ assigned  │ BVAGWHITE     │ BVAAABSHIRE   │ 2020-10-26 20:09:25 UTC │
                └── AttorneyDispatchReturnTask │ 3416 │ cancelled │ BVAAABSHIRE   │ BVAEERDMAN    │ 2020-10-26 20:09:25 UTC │
                                               └────────────────────────────────────────────────────────────────────────────┘
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Eng: Beginner Friendly Good tickets for new team members Priority: Low Reported issue, not a blocker. "Last in" priority for new work. Product: caseflow-queue Source: Bat Team Stakeholder: BVA Functionality associated with the Board of Veterans' Appeals workflows/feature requests Team: Echo 🐬 Type: Bug User: Attorney User: Judge
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants