From 81da2b6326ad2138369785412c2d23741764f356 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Wed, 27 Mar 2019 10:58:42 +0800 Subject: [PATCH] * Fix burn select condition. --- module/project/model.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/project/model.php b/module/project/model.php index 61ae7e1279..46fd1e2592 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -897,6 +897,7 @@ class projectModel extends model $burns = $this->dao->select('project, date AS name, `left` AS value') ->from(TABLE_BURN) ->where('project')->in($projectKeys) + ->andWhere('task')->eq(0) ->orderBy('date desc') ->fetchGroup('project', 'name'); @@ -1876,7 +1877,7 @@ class projectModel extends model public function fixFirst($projectID) { $project = $this->getById($projectID); - $burn = $this->dao->select('*')->from(TABLE_BURN)->where('project')->eq($projectID)->andWhere('date')->eq($project->begin)->fetch(); + $burn = $this->dao->select('*')->from(TABLE_BURN)->where('project')->eq($projectID)->andWhere('task')->eq(0)->andWhere('date')->eq($project->begin)->fetch(); $withLeft = $this->post->withLeft ? $this->post->withLeft : 0; $data = fixer::input('post') @@ -1904,7 +1905,7 @@ class projectModel extends model $project = $this->getById($projectID); /* If the burnCounts > $itemCounts, get the latest $itemCounts records. */ - $sets = $this->dao->select('date AS name, `left` AS value, estimate')->from(TABLE_BURN)->where('project')->eq((int)$projectID)->orderBy('date DESC')->fetchAll('name'); + $sets = $this->dao->select('date AS name, `left` AS value, estimate')->from(TABLE_BURN)->where('project')->eq((int)$projectID)->andWhere('task')->eq(0)->orderBy('date DESC')->fetchAll('name'); $count = 0; $burnData = array();