-
Notifications
You must be signed in to change notification settings - Fork 17
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
[PART 3] Remove overtime status of appeal if case is reassigned #14453
[PART 3] Remove overtime status of appeal if case is reassigned #14453
Conversation
Code Climate has analyzed commit 3cb011e and detected 3 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
…to hschallhorn/14366-remove-ot-on-reassignment
Generated by 🚫 Danger |
@@ -96,6 +96,9 @@ def assign_to_judge | |||
# update the location to the assigned judge. | |||
QueueRepository.update_location_to_judge(appeal.vacols_id, assigned_to) | |||
|
|||
# Remove overtime status of an appeal when reassigning to a judge | |||
appeal.overtime = false if appeal.overtime? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not need a feature toggle check here as overtime?
returns false if the feature toggle is not enabled
@@ -145,6 +145,9 @@ class AssignToView extends React.Component { | |||
|
|||
return this.props.requestPatch(`/tasks/${task.taskId}`, payload, successMsg).then((resp) => { | |||
this.props.onReceiveAmaTasks(resp.body.tasks.data); | |||
if (task.type === 'JudgeAssignTask') { | |||
this.props.setOvertime(task.externalAppealId, false); | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On reassign of a judge assign task: Ensure we update the redux store to reflect that this appeal's overtime status is now false
@@ -557,6 +559,8 @@ export const legacyReassignToJudge = ({ | |||
dispatch(onReceiveTasks(_.pick(allTasks, ['tasks', 'amaTasks']))); | |||
|
|||
dispatch(showSuccessMessage(successMessage)); | |||
|
|||
dispatch(setOvertime(oldTask.externalAppealId, false)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On reassign of a legacy judge assign task: Ensure we update the redux store to reflect that this appeal's overtime status is now false
@@ -534,6 +534,8 @@ export const reassignTasksToUser = ({ | |||
dispatch(decrementTaskCountForAttorney({ | |||
id: previousAssigneeId | |||
})); | |||
|
|||
dispatch(setOvertime(oldTask.externalAppealId, false)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On reassign of an attorney assign task: Ensure we update the redux store to reflect that this appeal's overtime status is now false
@@ -59,6 +59,8 @@ class AssignToView extends React.Component { | |||
}; | |||
} | |||
|
|||
componentDidMount = () => this.props.resetSuccessMessages(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -47,6 +47,8 @@ class AssignToAttorneyWidget extends React.PureComponent { | |||
}; | |||
} | |||
|
|||
componentDidMount = () => this.props.resetSuccessMessages(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
06bcb47
into
hschallhorn/14225-proper-reassign-of-attorney-tasks
* User proper reassign params when reassigning an attorney task * Remove changes * [PART 3] Remove overtime status of appeal if case is reassigned (#14453) * Remove overtime status on judge or attorney reassignment * Wip * Properly set overtime to false when reassigning * Undo changes * lint * Clear suvccess messages
# FULL STACK PART 1: Remove attorney task cancellation hook #14448 PART 2: Perform "caseflow" reassign of attorney tasks #14452 PART 3: Remove overtime status of appeal if case is reassigned #14453 # THIS PR Resolves #14181 PART 1 in stack to implement #14366 PART 2 #14452 PART 3 #14453 ### Description Calls send_back_to_judge_assign! directly when cancelling an attorney task rather than relying on a callback. ### Acceptance Criteria - [x] Hook for sending a case back to judge reassign on attorney task cancellation is removed. ### Testing Plan 1. Log in as BVACASPER 1. Go to any ama attorney task 1. Select "Cancel Task & return to judge" 1. Ensure the attorney and judge decision review task are cancelled and a judge assign task was opened ```ruby uuid = "" Appeal.find_by_uuid(uuid).treee ┌────────────────────────────────────────────────────────────────────────┐ Appeal 682 (evidence_submission) │ ID │ STATUS │ ASGN_BY │ ASGN_TO │ UPDATED_AT │ └── RootTask │ 2027 │ on_hold │ │ Bva │ 2020-05-22 14:50:19 UTC │ ├── JudgeDecisionReviewTask │ 2028 │ cancelled │ │ BVAAABSHIRE │ 2020-06-02 18:19:56 UTC │ │ └── AttorneyTask │ 2029 │ cancelled │ BVAAABSHIRE │ BVAEERDMAN │ 2020-06-02 18:19:55 UTC │ └── JudgeAssignTask │ 2532 │ assigned │ │ BVAAABSHIRE │ 2020-06-02 18:19:56 UTC │ └────────────────────────────────────────────────────────────────────────┘ ``` 1. Cancel any attorney task by hand ```ruby task = AttorneyTask.open.last task.appeal.treee Appeal 545 (direct_review) ──── │ ID │ STATUS │ ASGN_BY │ ASGN_TO │ UPDATED_AT │ └── RootTask │ 1458 │ on_hold │ │ Bva │ 2020-05-22 14:47:39 UTC │ ├── DistributionTask │ 1459 │ completed │ │ Bva │ 2020-05-22 14:47:39 UTC │ ├── JudgeAssignTask │ 1460 │ completed │ │ BVAAABSHIRE │ 2020-06-01 14:34:38 UTC │ ├── JudgeDecisionReviewTask │ 2493 │ cancelled │ BVAAABSHIRE │ BVAAABSHIRE │ 2020-06-01 14:52:39 UTC │ │ └── AttorneyTask │ 2494 │ cancelled │ BVAAABSHIRE │ BVAEERDMAN │ 2020-06-01 14:52:39 UTC │ ├── JudgeAssignTask │ 2495 │ cancelled │ │ BVAAABSHIRE │ 2020-06-01 14:53:15 UTC │ ├── JudgeAssignTask │ 2496 │ completed │ BVAAABSHIRE │ BVAAABSHIRE │ 2020-06-01 18:17:36 UTC │ └── JudgeDecisionReviewTask │ 2523 │ on_hold │ BVARDUNKLE │ BVAAABSHIRE │ 2020-06-01 18:17:36 UTC │ └── AttorneyTask │ 2524 │ assigned │ BVARDUNKLE │ BVAEERDMAN │ 2020-06-01 18:17:36 UTC │ => nil task.cancelled! ``` 1. Ensure this does not close the judge review task and does not open a judge assign task ```ruby task.appeal.reload.treee Appeal 545 (direct_review) ID STATUS ASGN_BY ASGN_TO UPDATED_AT └── RootTask 1458 on_hold Bva 2020-05-22 14:47:39 UTC ├── DistributionTask 1459 completed Bva 2020-05-22 14:47:39 UTC ├── JudgeAssignTask 1460 completed BVAAABSHIRE 2020-06-01 14:34:38 UTC ├── JudgeDecisionReviewTask 2493 cancelled BVAAABSHIRE BVAAABSHIRE 2020-06-01 14:52:39 UTC │ └── AttorneyTask 2494 cancelled BVAAABSHIRE BVAEERDMAN 2020-06-01 14:52:39 UTC ├── JudgeAssignTask 2495 cancelled BVAAABSHIRE 2020-06-01 14:53:15 UTC ├── JudgeAssignTask 2496 completed BVAAABSHIRE BVAAABSHIRE 2020-06-01 18:17:36 UTC └── JudgeDecisionReviewTask 2523 assigned BVARDUNKLE BVAAABSHIRE 2020-06-02 19:45:16 UTC └── AttorneyTask 2524 cancelled BVARDUNKLE BVAEERDMAN 2020-06-02 19:45:16 UTC ``` ### User Facing Changes - [ ] None
Resolves #14366
PART 3 in stack to implement #14366
PART 1 #14448
PART 2 #14452
Description
If an appeal has been designated as "overtime approved" remove this status if the case is assigned to another judge or attorney.
Acceptance Criteria
Testing Plan
AMA Judge
AMA Attorney
Legacy Judge
User Facing Changes