Fix duplicated counters on task card [SCI-6825]

This commit is contained in:
Oleksii Kriuchykhin 2022-05-10 22:23:42 +02:00
parent b48d0710a4
commit 1e9dd95716

View file

@ -71,8 +71,8 @@ class ExperimentsController < ApplicationController
.left_outer_joins(:designated_users, :task_comments)
.preload(:tags, outputs: :to)
.preload(:my_module_status, :my_module_group, user_assignments: %i(user user_role))
.select('COUNT(users.id) as designated_users_count')
.select('COUNT(comments.id) as task_comments_count')
.select('COUNT(DISTINCT users.id) as designated_users_count')
.select('COUNT(DISTINCT comments.id) as task_comments_count')
.select('my_modules.*').group(:id)
end