From c211acfadcbb6e20ba5df45f18524cf7565fb2d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E8=BE=B0=E8=BD=A9?= Date: Mon, 26 Dec 2022 16:30:17 +0800 Subject: [PATCH] * Fix bug for story finished percent. --- module/product/model.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/module/product/model.php b/module/product/model.php index ffffb80b3b..858e21638e 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -1871,13 +1871,17 @@ class productModel extends model $finishClosedStory = $this->dao->select('product, count(1) as finish')->from(TABLE_STORY) ->where('deleted')->eq(0) ->andWhere('status')->eq('closed') + ->andWhere('type')->eq('story') ->andWhere('closedReason')->eq('done') - ->fetchPairs('product', 'finish'); + ->groupBy('product') + ->fetchPairs(); $unclosedStory = $this->dao->select('product, count(1) as unclosed')->from(TABLE_STORY) ->where('deleted')->eq(0) + ->andWhere('type')->eq('story') ->andWhere('status')->ne('closed') - ->fetchPairs('product', 'unclosed'); + ->groupBy('product') + ->fetchPairs(); $plans = $this->dao->select('product, count(*) AS count') ->from(TABLE_PRODUCTPLAN)