Merge branch 'fixbug_liumengyi_32633' into 'master'
* Fix bug 32603 32632 32633. See merge request easycorp/zentaopms!7142
This commit is contained in:
@@ -251,7 +251,7 @@
|
||||
<?php if($browserList):?>
|
||||
<p class='browserContent'>
|
||||
<?php foreach($browserList as $browser):?>
|
||||
<?php if($os) echo "<span class='label label-outline'>" . zget($lang->bug->browserList, $browser) . "</span>";?>
|
||||
<?php if($browser) echo "<span class='label label-outline'>" . zget($lang->bug->browserList, $browser) . "</span>";?>
|
||||
<?php endforeach;?>
|
||||
</p>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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', '')
|
||||
|
||||
Reference in New Issue
Block a user