From 5f712c5ea4de02da0ffb1ea12c1fd38bd5c759aa Mon Sep 17 00:00:00 2001 From: qixinzhi Date: Mon, 27 Nov 2023 13:45:59 +0800 Subject: [PATCH] * Refactor metric of product. --- .../count_of_monthly_created_story_in_product.php | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/module/metric/calc/product/scale/count_of_monthly_created_story_in_product.php b/module/metric/calc/product/scale/count_of_monthly_created_story_in_product.php index c95466e0f3..52bdd7bd21 100755 --- a/module/metric/calc/product/scale/count_of_monthly_created_story_in_product.php +++ b/module/metric/calc/product/scale/count_of_monthly_created_story_in_product.php @@ -47,18 +47,7 @@ class count_of_monthly_created_story_in_product extends baseCalc public function getResult($options = null) { - $records = array(); - foreach($this->result as $product => $years) - { - foreach($years as $year => $months) - { - foreach($months as $month => $value) - { - $records[] = array('product' => $product, 'year' => $year, 'month' => $month, 'value' => $value); - } - } - } - + $records = $this->getRecords(array('product', 'year', 'month', 'value')); return $this->filterByOptions($records, $options); } }