Add RfCs with comments

This commit is contained in:
Maximilian Grundke
2018-03-14 14:53:02 +01:00
parent 593e9f520f
commit a7451a5057
3 changed files with 9 additions and 0 deletions

View File

@ -106,6 +106,13 @@ module StatisticsHelper
name: t('activerecord.models.comment.other'),
data: Comment.count
},
{
key: 'rfcs_with_comments',
name: t('statistics.entries.request_for_comments.with_comments'),
data: RequestForComment.joins('join "submissions" s on s.id = request_for_comments.submission_id
join "files" f on f.context_id = s.id and f.context_type = \'Submission\'
join "comments" c on c.file_id = f.id').group('request_for_comments.id').count.size
}
]
end