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

Create job to check for inactive users that are the task assignee or assigner #15269

Closed
1 task
yoomlam opened this issue Sep 17, 2020 · 3 comments
Closed
1 task
Assignees
Labels
Priority: Low Reported issue, not a blocker. "Last in" priority for new work. Product: caseflow-queue Team: Echo 🐬 Type: Metrics or Reporting

Comments

@yoomlam
Copy link
Contributor

yoomlam commented Sep 17, 2020

Resulting from #14307 investigation for stuck appeals.

Description

Create job to check for inactive users that are the assignee or assigner of open tasks?
Some are manually fixed in #14483

ius=User.inactive.pluck(:id);

# Inactive assignee users for all tasks
ts=Task.includes(:assigned_to).open.where(assigned_to_id: ius);
ts.count => 13
pp ts.group(:type).count
=> {"AttorneyRewriteTask"=>2,
  "AttorneyTask"=>3,
  "ReconsiderationMotionMailTask"=>1,
  "ReturnedUndeliverableCorrespondenceMailTask"=>1,
  "StatusInquiryMailTask"=>6}

# MailTask can be reassigned by an admin, so not actionable by engineer; limit query to ColocatedTasks
# Inactive assigner users of ColocatedTasks that will return to the inactive assigner once ColocatedTask completes
ts2=ColocatedTask.includes(:assigned_by).open.where(assigned_by_id: ius);
ts2.count => 39
pp ts2.group(:type).count
=> {"ExtensionColocatedTask"=>5,
 "FoiaColocatedTask"=>20,
 "IhpColocatedTask"=>2,
 "MissingRecordsColocatedTask"=>4,
 "OtherColocatedTask"=>7,
 "TranslationColocatedTask"=>1}

Acceptance criteria

  • regularly running job that reports inactive users that are the assignee or assigner of open tasks; along with tasks that need fixing.

Background/context/resources

#14307 comment A

Technical notes

Could be implemented as 2 checkers within a single job, or added to an existing checker such as StuckAppealsChecker.

@yoomlam
Copy link
Contributor Author

yoomlam commented Oct 13, 2020

Instead of a job, we can monitor the tasks in Metabase -- see https://query.prod.appeals.va.gov/dashboard/15, specifically https://query.prod.appeals.va.gov/question/122 and https://query.prod.appeals.va.gov/question/123, which resulted from #15410.

@yoomlam
Copy link
Contributor Author

yoomlam commented Jul 20, 2021

ius=User.inactive.pluck(:id);

# Inactive assignee users for all tasks
ts=Task.includes(:assigned_to).open.where(assigned_to_type: "User", assigned_to_id: ius);
ts.count => 123
pp ts.group(:type).count
=> {"AttorneyRewriteTask"=>2,
 "AttorneyTask"=>10,
 "ChangeHearingDispositionTask"=>1,
 "HearingAdminActionIncarceratedVeteranTask"=>1,
 "NoShowHearingTask"=>107,
 "TranscriptionTask"=>2}

Asked Tango about uptick in NoShowHearingTask: https://dsva.slack.com/archives/C3EAF3Q15/p1624901529219700

ts2=ColocatedTask.includes(:assigned_by).open.where(assigned_by_id: ius);
ts2.count
=> 54
=> {"AojColocatedTask"=>2,
 "ExtensionColocatedTask"=>2,
 "FoiaColocatedTask"=>26,
 "IhpColocatedTask"=>6,
 "MissingHearingTranscriptsColocatedTask"=>1,
 "OtherColocatedTask"=>8,
 "PoaClarificationColocatedTask"=>6,
 "RetiredVljColocatedTask"=>2,
 "TranslationColocatedTask"=>1}

@yoomlam
Copy link
Contributor Author

yoomlam commented Aug 4, 2021

See TasksAssignedToInactiveUsersChecker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Low Reported issue, not a blocker. "Last in" priority for new work. Product: caseflow-queue Team: Echo 🐬 Type: Metrics or Reporting
Projects
None yet
Development

No branches or pull requests

1 participant