From c87e5c5b491f8a72bae2fe1628ecfc679a3f631f Mon Sep 17 00:00:00 2001 From: Pascal Chevrel Date: Tue, 7 Mar 2023 14:02:03 +0100 Subject: [PATCH] Issue #4: points for CCed people. 0.1 per person, total rounded down with floor() --- src/pchevrel/BzKarma/Scoring.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pchevrel/BzKarma/Scoring.php b/src/pchevrel/BzKarma/Scoring.php index 14b8304..33cff6b 100644 --- a/src/pchevrel/BzKarma/Scoring.php +++ b/src/pchevrel/BzKarma/Scoring.php @@ -69,6 +69,7 @@ class Scoring '?' => 1, '---' => 0, ], + 'cc' => 0.1, // Decimal point for each cc, we round the total value ]; /* @@ -76,7 +77,7 @@ class Scoring The list of fields retrieved are: id, type, summary, priority, severity, keywords, duplicates, regressions, cf_webcompat_priority, - cf_tracking_firefox_nightly, cf_tracking_firefox_beta, cf_tracking_firefox_release + cf_tracking_firefox_nightly, cf_tracking_firefox_beta, cf_tracking_firefox_release, cc The fields actually retrieved for tracking requests have release numbers, ex: cf_tracking_firefox112, cf_tracking_firefox111, cf_tracking_firefox110 @@ -137,6 +138,7 @@ public function getBugScoreDetails(int $bug): array 'tracking_firefox' . $this->nightly => 0, 'tracking_firefox' . $this->beta => 0, 'tracking_firefox' . $this->release => 0, + 'cc' => 0, ]; } @@ -179,6 +181,7 @@ public function getBugScoreDetails(int $bug): array 'duplicates' => count($this->bugsData[$bug]['duplicates']) * $this->karma['duplicates'], 'regressions' => count($this->bugsData[$bug]['regressions']) * $this->karma['regressions'], 'webcompat' => $webcompat, + 'cc' => (int) floor(count($this->bugsData[$bug]['cc']) * $this->karma['cc']), /* If a bug is tracked across all our releases, it is likely higher value.