From fc1b4ce11d39c8b3d9baaaa753b644d75b07fef3 Mon Sep 17 00:00:00 2001 From: songchenxuan Date: Mon, 4 Nov 2024 17:07:52 +0800 Subject: [PATCH] [misc] add count_of_monthly_fixed_bug_in_project class and getResult method. --- .../count_of_monthly_fixed_bug_in_project.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/module/metric/calc/project/scale/count_of_monthly_fixed_bug_in_project.php b/module/metric/calc/project/scale/count_of_monthly_fixed_bug_in_project.php index 1d10a3feb8..b913a71c51 100644 --- a/module/metric/calc/project/scale/count_of_monthly_fixed_bug_in_project.php +++ b/module/metric/calc/project/scale/count_of_monthly_fixed_bug_in_project.php @@ -18,3 +18,17 @@ * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html) * @Link https://www.zentao.net */ +class count_of_monthly_fixed_bug_in_project extends baseCalc +{ + public $dataset = 'getProjectBugs'; + + public $fieldList = array('t1.id', 't1.project', 't1.resolution', 't1.closedDate'); + + public $result = array(); + + public function getResult($options = array()) + { + $records = $this->getRecords(array('project', 'year', 'month', 'value')); + return $this->filterByOptions($records, $options); + } +}