* Finish task #85037.
This commit is contained in:
@@ -1876,7 +1876,6 @@ class execution extends control
|
||||
$this->view->title = $this->app->tab == 'execution' ? $this->lang->execution->createExec : $this->lang->execution->create;
|
||||
$this->view->position[] = $this->view->title;
|
||||
$this->view->gobackLink = (isset($output['from']) and $output['from'] == 'global') ? $this->createLink('execution', 'all') : '';
|
||||
$this->view->executions = array('' => '') + $this->execution->getList($projectID);
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->allProducts = $allProducts;
|
||||
$this->view->acl = $acl;
|
||||
@@ -1887,7 +1886,7 @@ class execution extends control
|
||||
$this->view->teams = array(0 => '') + $this->execution->getCanCopyObjects((int)$projectID);
|
||||
$this->view->allProjects = array(0 => '') + $this->project->getPairsByModel('all', 0, 'noclosed,multiple');
|
||||
$this->view->copyProjects = $copyProjects;
|
||||
$this->view->copyExecutions = array('' => '') + $this->execution->getList($copyProjectID);
|
||||
$this->view->copyExecutions = array('' => '') + $this->execution->getList($copyProjectID, 'all', 'all', 0, 0, 0, null, false);
|
||||
$this->view->executionID = $executionID;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->projectID = $projectID;
|
||||
@@ -4447,7 +4446,7 @@ class execution extends control
|
||||
*/
|
||||
public function ajaxGetCopyProjectExecutions($projectID = 0)
|
||||
{
|
||||
$executions = $this->execution->getList($projectID);
|
||||
$executions = $this->execution->getList($projectID, 'all', 'all', 0, 0, 0, null, false);
|
||||
echo json_encode($executions);
|
||||
}
|
||||
|
||||
|
||||
@@ -1742,10 +1742,11 @@ class executionModel extends model
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @param object $pager
|
||||
* @param bool $withChildren
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getList($projectID = 0, $type = 'all', $status = 'all', $limit = 0, $productID = 0, $branch = 0, $pager = null)
|
||||
public function getList($projectID = 0, $type = 'all', $status = 'all', $limit = 0, $productID = 0, $branch = 0, $pager = null, $withChildren = true)
|
||||
{
|
||||
if($status == 'involved') return $this->getInvolvedExecutionList($projectID, $status, $limit, $productID, $branch);
|
||||
|
||||
@@ -1762,6 +1763,7 @@ class executionModel extends model
|
||||
->beginIF($branch)->andWhere('t1.branch')->eq($branch)->fi()
|
||||
->beginIF($status != 'all' and $status != 'undone')->andWhere('status')->in($status)->fi()
|
||||
->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->sprints)->fi()
|
||||
->beginIF(!$withChildren)->andWhere('grade')->eq(1)->fi()
|
||||
->orderBy('order_desc')
|
||||
->page($pager)
|
||||
->beginIF($limit)->limit($limit)->fi()
|
||||
@@ -1778,6 +1780,7 @@ class executionModel extends model
|
||||
->beginIF($status == 'undone')->andWhere('status')->notIN('done,closed')->fi()
|
||||
->beginIF($status != 'all' and $status != 'undone')->andWhere('status')->in($status)->fi()
|
||||
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->sprints)->fi()
|
||||
->beginIF(!$withChildren)->andWhere('grade')->eq(1)->fi()
|
||||
->orderBy('order_desc')
|
||||
->page($pager)
|
||||
->beginIF($limit)->limit($limit)->fi()
|
||||
|
||||
@@ -309,15 +309,14 @@
|
||||
<div class='projectSelect'><?php echo html::select("project", $copyProjects, $projectID, "class='form-control chosen' required onchange='loadProjectExecutions(this.value)'");?></div>
|
||||
</div>
|
||||
<div class='modal-body'>
|
||||
<?php if(count($executions) == 1):?>
|
||||
<?php if(count($copyExecutions) == 1):?>
|
||||
<div class='alert with-icon'>
|
||||
<i class='icon-exclamation-sign'></i>
|
||||
<div class='content'><?php echo $lang->execution->copyNoExecution;?></div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div id='copyProjects' class='row'>
|
||||
<?php if($projectID == 0) $executions = $copyExecutions;?>
|
||||
<?php foreach($executions as $id => $execution):?>
|
||||
<?php foreach($copyExecutions as $id => $execution):?>
|
||||
<?php if(empty($id)):?>
|
||||
<?php if($copyExecutionID != 0):?>
|
||||
<div class='col-md-4 col-sm-6'><a href='javascript:;' data-id='' class='cancel'><?php echo html::icon($lang->icons['cancel']) . ' ' . $lang->execution->cancelCopy;?></a></div>
|
||||
|
||||
Reference in New Issue
Block a user