From a7451a505734cd4d45e389df50f752f89886deba Mon Sep 17 00:00:00 2001 From: Maximilian Grundke Date: Wed, 14 Mar 2018 14:53:02 +0100 Subject: [PATCH] Add RfCs with comments --- app/helpers/statistics_helper.rb | 7 +++++++ config/locales/de.yml | 1 + config/locales/en.yml | 1 + 3 files changed, 9 insertions(+) diff --git a/app/helpers/statistics_helper.rb b/app/helpers/statistics_helper.rb index ed2d82b7..058cf4c1 100644 --- a/app/helpers/statistics_helper.rb +++ b/app/helpers/statistics_helper.rb @@ -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 diff --git a/config/locales/de.yml b/config/locales/de.yml index 281d349d..9b3aeb37 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -748,5 +748,6 @@ de: percent_solved: "Beantwortete Anfragen" percent_unsolved: "Unbeantwortete Anfragen" percent_soft_solved: "Ungelöst mit voller Punktzahl" + with_comments: "Anfragen mit Kommentaren" users: currently_active: "Aktiv (5 Minuten)" diff --git a/config/locales/en.yml b/config/locales/en.yml index c5e05183..93b095be 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -748,5 +748,6 @@ en: percent_solved: "Solved Requests" percent_unsolved: "Unsolved Requests" percent_soft_solved: "Unsolved with full score" + with_comments: "RfCs with Comments" users: currently_active: "Active (5 minutes)"