diff --git a/module/bug/view/view.html.php b/module/bug/view/view.html.php index 7f11fcfa4f..7cc63b0fa8 100644 --- a/module/bug/view/view.html.php +++ b/module/bug/view/view.html.php @@ -251,7 +251,7 @@

- " . zget($lang->bug->browserList, $browser) . "";?> + " . zget($lang->bug->browserList, $browser) . "";?>

diff --git a/module/common/model.php b/module/common/model.php index 0e10011cc8..0d9ffa989f 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -3047,6 +3047,14 @@ EOD; } if($productsStatus[$object->product] == 'closed') return false; } + elseif(!empty($object->product) and is_string($object->product) and empty($config->CRProduct)) + { + $products = array(0) + explode(',', $object->product); + $products = $app->control->loadModel('product')->getByIdList($products); + $productStatus = array(); + foreach($products as $product) $productStatus[$product->status] = 1; + if(!empty($productStatus['closed']) and count($productStatus) == 1) return false; + } /* Check the execution is closed. */ $productModuleList = array('story', 'bug', 'testtask'); diff --git a/module/execution/control.php b/module/execution/control.php index 0c473b3597..91312d698f 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1703,6 +1703,8 @@ class execution extends control global $lang; $lang->executionCommon = $lang->execution->stage; include $this->app->getModulePath('', 'execution') . 'lang/' . $this->app->getClientLang() . '.php'; + + $this->config->execution->create->requiredFields .= ',products0'; } $this->app->loadLang('program'); diff --git a/module/execution/model.php b/module/execution/model.php index df16b218f8..2b0bab014f 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -386,6 +386,8 @@ class executionModel extends model if(($project->model == 'waterfall' or $project->model == 'waterfallplus') and isset($this->config->setPercent) and $this->config->setPercent == 1) { + $_POST['products'] = array_filter($_POST['products']); + if(empty($_POST['products'])) dao::$errors['products0'] = $this->lang->project->errorNoProducts; $this->checkWorkload('create', $_POST['percent'], $project); if(dao::isError()) return false; } @@ -1883,7 +1885,7 @@ class executionModel extends model ->page($pager, 't1.id') ->fetchAll('id'); - if(empty($productID) and !empty($executions)) $projectProductIdList = $this->dao->select('project, product')->from(TABLE_PROJECTPRODUCT)->where('project')->in(array_keys($executions))->fetchPairs(); + if(empty($productID) and !empty($executions)) $projectProductIdList = $this->dao->select('project, GROUP_CONCAT(product) as product')->from(TABLE_PROJECTPRODUCT)->where('project')->in(array_keys($executions))->groupBy('project')->fetchPairs(); $hours = $this->loadModel('project')->computerProgress($executions); $burns = $this->getBurnData($executions); diff --git a/module/project/model.php b/module/project/model.php index ce5b643326..5ed1730316 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1521,6 +1521,7 @@ class projectModel extends model ->setDefault('team', $this->post->name) ->setDefault('lastEditedBy', $this->app->user->account) ->setDefault('lastEditedDate', helper::now()) + ->setDefault('days', '0') ->setIF($this->post->delta == 999, 'end', LONG_TIME) ->setIF($this->post->delta == 999, 'days', 0) ->setIF($this->post->begin == '0000-00-00', 'begin', '')