-
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
Add SendCavcRemandProcessedLetterTask #15548
Add SendCavcRemandProcessedLetterTask #15548
Conversation
Code Climate has analyzed commit ab50611 and detected 0 issues on this pull request. View more on Code Climate. |
elsif task.is_a?(SendCavcRemandProcessedLetterTask) && task.assigned_to_type == "Organization" | ||
{ redirect_after: "/organizations/#{CavcLitigationSupport.singleton.url}" } |
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.
Stay in the "team cases" view after assigning a case.
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.
I wonder if a better play here would be to send the user back to the organization queue for all tasks that are assigned to an org
extras[:redirect_after] = "/organizations/#{task.assigned_to.url}" if task.assigned_to_type == Organization.name
Would cover both redirects for these special cases, but also provide redirecting that makes more sense when assigning any org task.
Thoughts? Out of scope of this pr?
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.
Using your suggestion, 2 tests failed. I think a separate ticket is appropriate.
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.
Checked bulk task assign as well! Looks great :trulyamazingpanda:
@@ -50,6 +29,7 @@ | |||
expect(RootTask.count).to eq 1 | |||
expect(DistributionTask.count).to eq 1 | |||
expect(CavcTask.count).to eq 1 | |||
expect(cavc_task.parent).to eq parent_task |
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.
Check for expected parent task in these 3 tests as well.
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.
Looks great!
Resolves #15076
Description
Add SendCavcRemandProcessedLetterTask when CavcTask is created.
Acceptance criteria
SendCavcProcessedLetterTask
,SendCavcCompleteLetterTask
Add Admin ActionLooks like we'll be removing this in Add Admin Actions to 'SendCavcRemandProcessedLetterTask' #15286, so leaving it out.I implemented task reassignment, but only for the user-task (task assigned to a user) not the org-task (task assigned to the CAVC Lit Support org). Reassignment of the org-task will cancel the existing org-task and create a user-task without an org-task parent, which is probably not what we want.
Testing Plan
appeal.reload.treee
ADD_ADMIN_ACTION; cancel it (Task.where(id: [3374, 3375]).map(&:cancelled!)
) or complete it as the assigned user to have the case assigned back to the assigner. Can also destroy the tasks (Task.where(id: [3374, 3375]).map(&:destroy)
).User Facing Changes
Code Documentation Updates