+ [task#145330] add the count_of_verified_story_in_execution metric.

This commit is contained in:
wangzemei
2025-06-17 10:01:36 +08:00
parent 0945d51d77
commit 280a293bca
@@ -7,6 +7,18 @@ class count_of_verified_story_in_execution extends baseCalc
public $result = array();
public function calculate($row)
{
$execution = $row->project;
$stage = $row->stage;
$closedReason = $row->closedReason;
if(!isset($this->result[$execution])) $this->result[$execution] = 0;
if(in_array($stage, array('verified', 'delivering', 'delivered', 'released'))) $this->result[$execution] += 1;
if($closedReason == 'done') $this->result[$execution] += 1;
}
public function getResult($options = array())
{
$records = $this->getRecords(array('execution', 'value'));