+ [task#144626] add the getResult for count_of_created_bug_in_user metrics.

This commit is contained in:
wangzemei
2025-06-09 09:26:02 +08:00
committed by 曹延义
parent 7ca60f6ad7
commit b7bbec1e59
@@ -12,4 +12,17 @@ class count_of_created_bug_in_user extends baseCalc
if(!isset($this->result[$row->openedBy])) $this->result[$row->openedBy] = array();
$this->result[$row->openedBy][$row->id] = $row->id;
}
public function getResult($options = array())
{
foreach($this->result as $openedBy => $bugs)
{
if(!is_array($bugs)) continue;
$this->result[$openedBy] = count($bugs);
}
$records = $this->getRecords(array('user', 'value'));
return $this->filterByOptions($records, $options);
}
}