From 280a293bca00c74b3855a886a4de2ef6a619e97c Mon Sep 17 00:00:00 2001 From: wangzemei Date: Tue, 17 Jun 2025 10:01:36 +0800 Subject: [PATCH] + [task#145330] add the count_of_verified_story_in_execution metric. --- .../scale/count_of_verified_story_in_execution.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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'));