-
Notifications
You must be signed in to change notification settings - Fork 19
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
Comments
Original offending line: https://github.com/department-of-veterans-affairs/caseflow/pull/12295/files#diff-9a9376e40c278cc9cd0d09a8ffc60f1dR67 |
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?
Why 2?
|
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 │ └────────────────────────────────────────────────────────────────────────────┘ ```
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
Background/context/resources
Example case
Technical notes
The text was updated successfully, but these errors were encountered: