From a6802d6442f2b2c9bcce48dcf9ad2b76e2a920d1 Mon Sep 17 00:00:00 2001 From: wangzemei Date: Fri, 6 Jun 2025 16:56:42 +0800 Subject: [PATCH] + [task#144627] add the getResult for count_of_resolved_bug_in_user metrics. --- .../user/scale/count_of_resolved_bug_in_user.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/module/metric/calc/user/scale/count_of_resolved_bug_in_user.php b/module/metric/calc/user/scale/count_of_resolved_bug_in_user.php index 3de87bcaf1..79eb2bcef5 100755 --- a/module/metric/calc/user/scale/count_of_resolved_bug_in_user.php +++ b/module/metric/calc/user/scale/count_of_resolved_bug_in_user.php @@ -12,4 +12,17 @@ class count_of_resolved_bug_in_user extends baseCalc if(!isset($this->result[$row->resolvedBy])) $this->result[$row->resolvedBy] = array(); $this->result[$row->resolvedBy][$row->id] = $row->id; } + + public function getResult($options = array()) + { + foreach($this->result as $resolvedBy => $bugs) + { + if(!is_array($bugs)) continue; + + $this->result[$resolvedBy] = count($bugs); + } + + $records = $this->getRecords(array('user', 'value')); + return $this->filterByOptions($records, $options); + } }