FEATURE: adds ignored flags to most_disagreed_flags report (#6554)

This commit is contained in:
Joffrey JAFFEUX 2018-11-02 11:08:00 +01:00 committed by GitHub
parent d84256a876
commit 4e0f033fae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -1195,6 +1195,11 @@ class Report
property: :agreed_flags,
title: I18n.t("reports.most_disagreed_flaggers.labels.agreed_flags")
},
{
type: :number,
property: :ignored_flags,
title: I18n.t("reports.most_disagreed_flaggers.labels.ignored_flags")
},
{
type: :number,
property: :score,
@ -1209,8 +1214,7 @@ class Report
CASE WHEN u.silenced_till IS NOT NULL THEN 't' ELSE 'f' END as silenced,
us.flags_disagreed AS disagreed_flags,
us.flags_agreed AS agreed_flags,
ROUND(us.flags_agreed::numeric / us.flags_disagreed::numeric, 2) as ratio,
us.flags_disagreed - us.flags_agreed AS spread,
us.flags_ignored AS ignored_flags,
ROUND((1-(us.flags_agreed::numeric / us.flags_disagreed::numeric)) *
(us.flags_disagreed - us.flags_agreed)) AS score
FROM users AS u
@ -1227,6 +1231,7 @@ class Report
flagger[:username] = row.username
flagger[:avatar_template] = User.avatar_template(row.username, row.avatar_id)
flagger[:disagreed_flags] = row.disagreed_flags
flagger[:ignored_flags] = row.ignored_flags
flagger[:agreed_flags] = row.agreed_flags
flagger[:score] = row.score

View File

@ -904,6 +904,7 @@ en:
user: User
agreed_flags: Agreed flags
disagreed_flags: Disagreed flags
ignored_flags: Ignored flags
score: Score
moderators_activity:
title: "Moderators activity"