* Finish task #48012.
This commit is contained in:
@@ -699,7 +699,7 @@ class bug extends control
|
||||
{
|
||||
$this->loadModel('kanban');
|
||||
$column = $this->kanban->getColumnByID($output['columnID']);
|
||||
$kanbanData = $this->kanban->getRDKanban($output['executionID'], 'all', 'id_desc', $column->region);
|
||||
$kanbanData = $this->kanban->getRDKanban($executionID, 'all', 'id_desc', $column->region);
|
||||
$kanbanData = json_encode($kanbanData);
|
||||
|
||||
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData, $column->region)"));
|
||||
@@ -1374,6 +1374,7 @@ class bug extends control
|
||||
*/
|
||||
public function confirmBug($bugID, $extra = '')
|
||||
{
|
||||
$bug = $this->bug->getById($bugID);
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$changes = $this->bug->confirm($bugID, $extra);
|
||||
@@ -1385,20 +1386,25 @@ class bug extends control
|
||||
|
||||
$extra = str_replace(array(',', ' '), array('&', ''), $extra);
|
||||
parse_str($extra, $output);
|
||||
if(isset($output['fromLaneID']) and isset($output['fromColID']) and isset($output['executionID']) and isonlybody())
|
||||
if(isonlybody())
|
||||
{
|
||||
$this->loadModel('kanban');
|
||||
$column = $this->kanban->getColumnByID($output['fromColID']);
|
||||
$kanbanData = $this->kanban->getRDKanban($output['executionID'], 'all', 'id_desc', $column->region);
|
||||
$kanbanData = json_encode($kanbanData);
|
||||
$execution = $this->loadModel('execution')->getByID($bug->execution);
|
||||
if($execution->type == 'kanban')
|
||||
{
|
||||
$regionID = isset($output['regionID']) ? $output['regionID'] : 0;
|
||||
$kanbanData = $this->loadModel('kanban')->getRDKanban($this->session->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all');
|
||||
$kanbanData = json_encode($kanbanData);
|
||||
|
||||
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData, $column->region)"));
|
||||
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
|
||||
}
|
||||
else
|
||||
{
|
||||
return print(js::closeModal('parent.parent'));
|
||||
}
|
||||
}
|
||||
if(isonlybody()) return print(js::closeModal('parent.parent'));
|
||||
return print(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
|
||||
}
|
||||
|
||||
$bug = $this->bug->getById($bugID);
|
||||
$productID = $bug->product;
|
||||
$this->bug->checkBugExecutionPriv($bug);
|
||||
$this->qa->setMenu($this->products, $productID, $bug->branch);
|
||||
@@ -1441,6 +1447,7 @@ class bug extends control
|
||||
*/
|
||||
public function resolve($bugID, $extra = '')
|
||||
{
|
||||
$bug = $this->bug->getById($bugID);
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$changes = $this->bug->resolve($bugID, $extra);
|
||||
@@ -1470,16 +1477,22 @@ class bug extends control
|
||||
|
||||
$extra = str_replace(array(',', ' '), array('&', ''), $extra);
|
||||
parse_str($extra, $output);
|
||||
if(isset($output['fromLaneID']) and isset($output['fromColID']) and isset($output['executionID']) and isonlybody())
|
||||
if(isonlybody())
|
||||
{
|
||||
$this->loadModel('kanban');
|
||||
$column = $this->kanban->getColumnByID($output['fromColID']);
|
||||
$kanbanData = $this->kanban->getRDKanban($output['executionID'], 'all', 'id_desc', $column->region);
|
||||
$kanbanData = json_encode($kanbanData);
|
||||
$execution = $this->loadModel('execution')->getByID($bug->execution);
|
||||
if($execution->type == 'kanban')
|
||||
{
|
||||
$regionID = isset($output['regionID']) ? $output['regionID'] : 0;
|
||||
$kanbanData = $this->loadModel('kanban')->getRDKanban($this->session->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all');
|
||||
$kanbanData = json_encode($kanbanData);
|
||||
|
||||
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData, $column->region)"));
|
||||
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
|
||||
}
|
||||
else
|
||||
{
|
||||
return print(js::closeModal('parent.parent'));
|
||||
}
|
||||
}
|
||||
if(isonlybody()) die(js::reload('parent.parent'));
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api')
|
||||
{
|
||||
die(array('status' => 'success', 'data' => $bugID));
|
||||
@@ -1491,7 +1504,6 @@ class bug extends control
|
||||
}
|
||||
|
||||
$projectID = $this->lang->navGroup->bug == 'project' ? $this->session->project : 0;
|
||||
$bug = $this->bug->getById($bugID);
|
||||
$productID = $bug->product;
|
||||
$users = $this->user->getPairs('noclosed');
|
||||
$assignedTo = $bug->openedBy;
|
||||
@@ -1547,6 +1559,7 @@ class bug extends control
|
||||
*/
|
||||
public function activate($bugID, $extra = '')
|
||||
{
|
||||
$bug = $this->bug->getById($bugID);
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$changes = $this->bug->activate($bugID, $extra);
|
||||
@@ -1559,11 +1572,27 @@ class bug extends control
|
||||
|
||||
$this->executeHooks($bugID);
|
||||
|
||||
if(isonlybody()) die(js::closeModal('parent.parent'));
|
||||
$extra = str_replace(array(',', ' '), array('&', ''), $extra);
|
||||
parse_str($extra, $output);
|
||||
if(isonlybody())
|
||||
{
|
||||
$execution = $this->loadModel('execution')->getByID($bug->execution);
|
||||
if($execution->type == 'kanban')
|
||||
{
|
||||
$regionID = isset($output['regionID']) ? $output['regionID'] : 0;
|
||||
$kanbanData = $this->loadModel('kanban')->getRDKanban($this->session->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all');
|
||||
$kanbanData = json_encode($kanbanData);
|
||||
|
||||
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
|
||||
}
|
||||
else
|
||||
{
|
||||
return print(js::closeModal('parent.parent'));
|
||||
}
|
||||
}
|
||||
die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
|
||||
}
|
||||
|
||||
$bug = $this->bug->getById($bugID);
|
||||
$productID = $bug->product;
|
||||
$this->bug->checkBugExecutionPriv($bug);
|
||||
$this->qa->setMenu($this->products, $productID, $bug->branch);
|
||||
@@ -1590,6 +1619,7 @@ class bug extends control
|
||||
*/
|
||||
public function close($bugID, $extra = '')
|
||||
{
|
||||
$bug = $this->bug->getById($bugID);
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$changes = $this->bug->close($bugID, $extra);
|
||||
@@ -1600,7 +1630,24 @@ class bug extends control
|
||||
|
||||
$this->executeHooks($bugID);
|
||||
|
||||
if(isonlybody()) die(js::closeModal('parent.parent'));
|
||||
$extra = str_replace(array(',', ' '), array('&', ''), $extra);
|
||||
parse_str($extra, $output);
|
||||
if(isonlybody())
|
||||
{
|
||||
$execution = $this->loadModel('execution')->getByID($bug->execution);
|
||||
if($execution->type == 'kanban')
|
||||
{
|
||||
$regionID = isset($output['regionID']) ? $output['regionID'] : 0;
|
||||
$kanbanData = $this->loadModel('kanban')->getRDKanban($this->session->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all');
|
||||
$kanbanData = json_encode($kanbanData);
|
||||
|
||||
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
|
||||
}
|
||||
else
|
||||
{
|
||||
return print(js::closeModal('parent.parent'));
|
||||
}
|
||||
}
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api')
|
||||
{
|
||||
die(array('status' => 'success', 'data' => $bugID));
|
||||
@@ -1611,7 +1658,6 @@ class bug extends control
|
||||
}
|
||||
}
|
||||
|
||||
$bug = $this->bug->getById($bugID);
|
||||
$productID = $bug->product;
|
||||
$this->bug->checkBugExecutionPriv($bug);
|
||||
$this->qa->setMenu($this->products, $productID, $bug->branch);
|
||||
|
||||
Reference in New Issue
Block a user