Fix counts for archived tasks [SCI-6881] (#4132)

This commit is contained in:
artoscinote 2022-06-01 11:43:15 +02:00 committed by GitHub
parent 1edf5f5d13
commit 95a2cc5298
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -262,8 +262,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