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

Allow SCM team members to move AMA cases #13786

Merged
merged 17 commits into from
Mar 30, 2020

Conversation

hschallhorn
Copy link
Contributor

@hschallhorn hschallhorn commented Mar 24, 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

  • Reassign ama case at judge assign to another judge by acting on a JudgeAssignTask assigned to a judge
  • Assign ama tasks to an attorney by acting on a JudgeAssignTask assigned to a judge
  • 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
  • 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
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 
                                         └────────────────────────────────────────────────────────────────────┘
  1. Select "Re-assign to a judge" and reassign to "JudgeHasAttorneys_Cases"
  2. Task tree shows cancelled original assign task, new task is assigned to BVARERDMAN and assigned by BVARDUNKLE
                                         ┌───────────────────────────────────────────────────────────────────────┐
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 
                                         └───────────────────────────────────────────────────────────────────────┘
  1. Go back to the case details of this case, assigned to and assigned by are updated
  2. Select "Assign to attorney" and assign to "Steve Casper"
  3. 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
                                         ┌───────────────────────────────────────────────────────────────────────┐
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 
                                         └───────────────────────────────────────────────────────────────────────┘
  1. Go back to the case details of this case, assigned to and assigned by are updated
  2. Select "Assign to attorney" and assign to "Lexi Brown"
  3. Task tree shows the updated assignee of BVALBROWN
                                         ┌───────────────────────────────────────────────────────────────────────┐
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 
                                         └───────────────────────────────────────────────────────────────────────┘
  1. Go back to the case details of this case, assigned to is updated
  2. Select "Cancel task"
  3. Task tree shows cancelled attorney and judge decision review task, new. judge assign task assigned to BVAAABSHIRE
                                         ┌───────────────────────────────────────────────────────────────────────┐
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 
                                         └───────────────────────────────────────────────────────────────────────┘
  • Reassign ama case at judge assign to another judge by acting on a JudgeAssignTask assigned to a judge
  • Assign ama tasks to an attorney by acting on a JudgeAssignTask assigned to a judge
  • 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
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 
                                └───────────────────────────────────────────────────────────────────────┘
  1. Go to the case details page for this case (/queue/appeals/92d5c3a6-32b4-4e9e-8a74-e1bfab94f17a)
  2. Select "Re-assign to a judge" and reassign to "JudgeHasAttorneys_Cases"
  3. Task tree shows cancelled original assigne task, new task is assigned to BVARERDMAN and assigned by BVARDUNKLE, keeps the completed attorney child task
                                ┌────────────────────────────────────────────────────────────────────────┐
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 
                                └────────────────────────────────────────────────────────────────────────┘
  1. Go back to the case details of this case, assigned to and assigned by are updated
  • Reassign ama case at judge review to another judge by acting on a JudgeDecisionReviewTask assigned to a judge

@@ -84,6 +93,6 @@ def cancel_parent_judge_review
end

def open_judge_assign_task
JudgeAssignTask.create!(appeal: appeal, parent: appeal.root_task, assigned_to: assigned_by)
JudgeAssignTask.create!(appeal: appeal, parent: appeal.root_task, assigned_to: parent.assigned_to)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensures the JudgeAssignTask does not get assigned to the assigning SCM user if an attorney task is cancelled.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure the Judge on the JDRTask is who should always be the assigning judge in the case of cancelling? Pondering this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this affect AVLJ cases?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to think of a normal scenario that this would affect, but cannot come up with one.
Judge assigns a case to Attorney. They are both the assigner of the attorney task and the assignee of the attorney tasks parent. The parent cannot be reassigned until the attorney task is completed. If cancelled, it will go back to the Judge either way.
I don't know of a scenario that would affect AVLJ cases either.

@codeclimate
Copy link

codeclimate bot commented Mar 24, 2020

Code Climate has analyzed commit 68ef04b and detected 0 issues on this pull request.

View more on Code Climate.

@hschallhorn hschallhorn self-assigned this Mar 24, 2020
@hschallhorn hschallhorn requested a review from lomky March 27, 2020 15:16
Copy link
Contributor

@lomky lomky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple questions and thoughts!

@lomky
Copy link
Contributor

lomky commented Mar 27, 2020

On AMA at judge assign Step 13 of the testing: Select "Cancel task"

The cancel prompt mistakenly states that cancelling the task will return the case to Dunkle, as opposed to Erdman
image

Copy link
Contributor

@lomky lomky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GTG once the test go green! :shipit: 🎉

@hschallhorn hschallhorn added the Ready-to-Merge This PR is ready to be merged and will be picked up by va-bot to automatically merge to master label Mar 30, 2020
@va-bot va-bot merged commit a167f15 into master Mar 30, 2020
@va-bot va-bot deleted the alec/12424-scm-perform-judge-actions-ama branch March 30, 2020 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready-to-Merge This PR is ready to be merged and will be picked up by va-bot to automatically merge to master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants