diff --git a/module/build/control.php b/module/build/control.php index a658687809..51f89211ed 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -42,6 +42,10 @@ class build extends control $orderBy = 'status_asc, stage_asc, id_desc'; $stories = $this->story->getProjectStories($projectID, $orderBy); $bugs = $this->bug->getProjectBugs($projectID); + foreach($bugs as $key => $bug) + { + if($bug->status == 'closed') unset($bugs[$key]); + } /* Assign. */ $project = $this->loadModel('project')->getById($projectID); diff --git a/module/build/model.php b/module/build/model.php index 225d71712c..672b0ae2fc 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -125,8 +125,9 @@ class buildModel extends model $this->dao->insert(TABLE_BUILD)->data($build)->autoCheck()->batchCheck($this->config->build->create->requiredFields, 'notempty')->check('name', 'unique', "product = {$build->product}")->exec(); if(!dao::isError()) { + $buildID = $this->dao->lastInsertID(); $this->updateLinkedBug($build); - return $this->dao->lastInsertID(); + return $buildID; } } @@ -186,7 +187,7 @@ class buildModel extends model if(!$bugs) return false; foreach($bugs as $bug) { - if($bug->status == 'resolved') continue; + if($bug->status == 'resolved' or $bug->status == 'closed') continue; $bug->resolvedBy = $resolvedPairs[$bug->id]; $bug->resolvedDate = $now; diff --git a/module/build/view/edit.html.php b/module/build/view/edit.html.php index 8f845383a6..2c5ec6b3a3 100644 --- a/module/build/view/edit.html.php +++ b/module/build/view/edit.html.php @@ -105,7 +105,7 @@