-
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
Identify problem with or collect information on RoundRobin Automatic Task Assignments #14629
Comments
1 |
2 | |||||
3 | ||||
5 |
8 | Current algorithm only uses the last assignment made. Implement as a rails log
Why 2?
Why 3?
|
Created PR #14897 for adding logging but we won't need to merge it. Lines 604 to 612 in 79907dd
because automatically_assign_org_task? returns true for the Colocated org:Lines 614 to 616 in 79907dd
The root causes occur when assigning this new child task:
These cause the caseflow/app/models/round_robin_task_distributor.rb Lines 22 to 36 in e5d5df6
These 2 causes (plus new Collocated members being added) explain the 4531 task assignments made between May 15th and Aug 5th. I could not explain 2 assignments having task IDs 1011751 and 1071485. Notes about the spreadsheet:
This explains the "VLJ Support: Task auto-distribution discrepancy" in #14084. See hackMD for detailed notes, but here's how to create the spreadsheet: # Kat's code fix was made on May 12th, so start in mid-May
interval = DateTime.new(2020,5,15,0,0,0)..DateTime.new(2020,8,5,0,0,0)
assignee_pool = Colocated.singleton.non_admins.sort_by(&:id);
assignee_ids = assignee_pool.pluck(:id);
# this will make it easier to tell if assignment is out of order
pool=assignee_pool.each_with_index.map {|a,i| [a.id,i]}.to_h;
assigned_tasks = Task.visible_in_queue_table_view.where(assigned_to: assignee_ids, created_at: interval).order(:id);
require 'csv'
CSV.open( 'rr.csv', 'w' ) do |writer|
counter=pool[assigned_tasks.first.assigned_to_id]
pool_size=assignee_pool.size
match_list = assigned_tasks.map{|t|
# does assignee match round-robin ordering
match = (counter % pool_size) == pool[t.assigned_to_id]
# what the next assignee should be
counter = pool[t.assigned_to_id] + 1
# count of tasks that were closed at (almost) the same time this task was created; captures task reassignment
closed_count = t.appeal.tasks.order(:id).where(closed_at: (t.created_at-0.5)..(t.created_at+0.5)).count
# are there prior tasks in this appeal assigned to the same assignee?
prior_task = t.appeal.tasks.order(:id).where(assigned_to_id: t.assigned_to_id).where('created_at < ?', t.created_at).last
writer << [ pool[t.assigned_to_id], match, closed_count, t.id, prior_task&.id, t.created_at ]
};
end I'll create another ticket to implement a fix to account for the 2 root causes. |
Replaced with #14914 |
Description
We are seeing unexpectedly unbalanced distribution of tasks from the round robin assignment of VLJ support tasks. We want to collect what is actually happening in order to correct this.
Data we would like to capture
Background/context/resources
Investigation
Technical notes
The text was updated successfully, but these errors were encountered: