* Fix bug.
This commit is contained in:
@@ -679,6 +679,7 @@ class block extends control
|
||||
->leftJoin(TABLE_PROJECTPRODUCT)->alias('t5')->on('t1.execution=t5.project')
|
||||
->where('t1.deleted')->eq('0')
|
||||
->beginIF(!$this->app->user->admin)->andWhere('t1.product')->in($this->app->user->view->products)->fi()
|
||||
->beginIF(!$this->app->user->admin)->andWhere('t1.execution')->in($this->app->user->view->sprints)->fi()
|
||||
->andWhere('t1.product = t5.product')
|
||||
->beginIF($this->params->type != 'all')->andWhere('t1.status')->eq($this->params->type)->fi()
|
||||
->orderBy('t1.id desc')
|
||||
|
||||
@@ -27,6 +27,10 @@ class build extends control
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$executionID = empty($executionID) ? $this->post->execution : $executionID;
|
||||
if(empty($executionID)) dao::$errors['execution'] = $this->lang->build->emptyExecution;
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$buildID = $this->build->create($executionID);
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
$this->loadModel('action')->create('build', $buildID, 'opened');
|
||||
@@ -42,7 +46,7 @@ class build extends control
|
||||
{
|
||||
$this->loadModel('project')->setMenu($projectID);
|
||||
$executions = $this->execution->getPairs($projectID);
|
||||
$executionID = $executionID == 0 ? key($executions) : $executionID;
|
||||
$executionID = empty($executionID) ? key($executions) : $executionID;
|
||||
$this->session->set('project', $projectID);
|
||||
}
|
||||
elseif($this->app->openApp == 'execution')
|
||||
@@ -113,7 +117,7 @@ class build extends control
|
||||
}
|
||||
elseif($this->app->openApp == 'exectuion')
|
||||
{
|
||||
$this->execution->setMenu($this->execution->getPairs($build->project), $build->execution);
|
||||
$this->execution->setMenu($build->execution);
|
||||
}
|
||||
|
||||
/* Get stories and bugs. */
|
||||
@@ -410,10 +414,12 @@ class build extends control
|
||||
die(js::locate(inlink('view', "buildID=$buildID&type=story"), 'parent'));
|
||||
}
|
||||
|
||||
$this->session->set('storyList', inlink('view', "buildID=$buildID&type=story&link=true¶m=" . helper::safe64Encode("&browseType=$browseType&queryID=$param")));
|
||||
$this->session->set('storyList', inlink('view', "buildID=$buildID&type=story&link=true¶m=" . helper::safe64Encode("&browseType=$browseType&queryID=$param")), 'product');
|
||||
|
||||
$build = $this->build->getById($buildID);
|
||||
$product = $this->loadModel('product')->getById($build->product);
|
||||
$this->loadModel('execution')->setMenu($this->execution->getPairs($build->project), $build->execution);
|
||||
|
||||
$this->loadModel('execution')->setMenu($build->execution);
|
||||
$this->loadModel('story');
|
||||
$this->loadModel('tree');
|
||||
$this->loadModel('product');
|
||||
@@ -429,9 +435,10 @@ class build extends control
|
||||
$this->config->product->search['actionURL'] = $this->createLink('build', 'view', "buildID=$buildID&type=story&link=true¶m=" . helper::safe64Encode("&browseType=bySearch&queryID=myQueryID"));
|
||||
$this->config->product->search['queryID'] = $queryID;
|
||||
$this->config->product->search['style'] = 'simple';
|
||||
$this->config->product->search['params']['plan']['values'] = $this->loadModel('productplan')->getForProducts(array($build->product => $build->product));
|
||||
$this->config->product->search['params']['module']['values'] = $this->tree->getOptionMenu($build->product, $viewType = 'story', $startModuleID = 0);
|
||||
$this->config->product->search['params']['plan']['values'] = $this->loadModel('productplan')->getForProducts(array($build->product => $build->product));
|
||||
$this->config->product->search['params']['module']['values'] = $this->tree->getOptionMenu($build->product, 'story', 0);
|
||||
$this->config->product->search['params']['status'] = array('operator' => '=', 'control' => 'select', 'values' => $this->lang->story->statusList);
|
||||
|
||||
if($product->type == 'normal')
|
||||
{
|
||||
unset($this->config->product->search['fields']['branch']);
|
||||
|
||||
Reference in New Issue
Block a user