Add soft solved rfcs

This commit is contained in:
Maximilian Grundke
2018-03-14 13:16:00 +01:00
parent 119cc9ee71
commit 0564c88105
3 changed files with 10 additions and 1 deletions

View File

@ -87,10 +87,17 @@ module StatisticsHelper
unit: '%',
url: request_for_comments_path + '?q%5Bsolved_not_eq%5D=0'
},
{
key: 'percent_soft_solved',
name: t('statistics.entries.request_for_comments.percent_soft_solved'),
data: (100.0 / RequestForComment.count * RequestForComment.unsolved.where(full_score_reached: true).count).round(1),
unit: '%',
url: request_for_comments_path
},
{
key: 'percent_unsolved',
name: t('statistics.entries.request_for_comments.percent_unsolved'),
data: (100.0 / RequestForComment.count * RequestForComment.where(solved: false).count).round(1),
data: (100.0 / RequestForComment.count * RequestForComment.unsolved.count).round(1),
unit: '%',
url: request_for_comments_path + '?q%5Bsolved_not_eq%5D=1'
},

View File

@ -687,5 +687,6 @@ de:
request_for_comments:
percent_solved: "Beantwortete Anfragen"
percent_unsolved: "Unbeantwortete Anfragen"
percent_soft_solved: "Ungelöst mit voller Punktzahl"
users:
currently_active: "Aktiv (5 Minuten)"

View File

@ -687,5 +687,6 @@ en:
request_for_comments:
percent_solved: "Solved Requests"
percent_unsolved: "Unsolved Requests"
percent_soft_solved: "Unsolved with full score"
users:
currently_active: "Active (5 minutes)"