diff --git a/module/metric/calc/execution/scale/count_of_verified_story_in_execution.php b/module/metric/calc/execution/scale/count_of_verified_story_in_execution.php index 12921d098b..74ac6e4297 100755 --- a/module/metric/calc/execution/scale/count_of_verified_story_in_execution.php +++ b/module/metric/calc/execution/scale/count_of_verified_story_in_execution.php @@ -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'));