From 79221c6a61042e223b23302dd29fbc41559eb967 Mon Sep 17 00:00:00 2001 From: zhouxin Date: Tue, 24 Dec 2024 16:07:43 +0800 Subject: [PATCH] * [misc] include epic and requirement in annual report. --- module/report/model.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/report/model.php b/module/report/model.php index 9f4641861d..80f739114d 100644 --- a/module/report/model.php +++ b/module/report/model.php @@ -475,11 +475,12 @@ class reportModel extends model if($objectType == 'bug') $table = TABLE_BUG; if(empty($table)) return array(); + $objectTypeList = $objectType == 'story' ? array('story', 'requirement', 'epic') : array($objectType); $months = $this->getYearMonths($year); $stmt = $this->dao->select('t1.*, t2.status, t2.deleted')->from(TABLE_ACTION)->alias('t1') ->leftJoin($table)->alias('t2')->on('t1.objectID=t2.id') - ->where('t1.objectType')->eq($objectType) - ->andWhere('LEFT(t1.date, 4)')->eq($year) + ->where('LEFT(t1.date, 4)')->eq($year) + ->andWhere('t1.objectType')->in($objectTypeList) ->andWhere('t1.action')->in($this->config->report->annualData['monthAction'][$objectType]) ->beginIF($accounts)->andWhere('t1.actor')->in($accounts)->fi() ->query();