* Fix bug#19273.

This commit is contained in:
xieqiyu
2022-03-31 13:42:28 +08:00
parent df2cda6e8b
commit 2ed1eedfcf
4 changed files with 54 additions and 18 deletions
+21 -4
View File
@@ -895,10 +895,12 @@ class bug extends control
* Edit a bug.
*
* @param int $bugID
* @param bool $comment
* @param string $kanbanGroup
* @access public
* @return void
*/
public function edit($bugID, $comment = false)
public function edit($bugID, $comment = false, $kanbanGroup = '')
{
if(!empty($_POST))
{
@@ -945,7 +947,21 @@ class bug extends control
}
}
}
if(isonlybody()) return print(js::reload('parent.parent'));
if(isonlybody())
{
$execution = $this->loadModel('execution')->getByID($bug->execution);
if(isset($execution->type) and $execution->type == 'kanban' and $this->app->tab == 'execution' and $kanbanGroup == 'default')
{
$kanbanData = $this->loadModel('kanban')->getRDKanban($bug->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'));
}
}
return print(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
}
@@ -1222,10 +1238,11 @@ class bug extends control
* Update assign of bug.
*
* @param int $bugID
* @parm string $kanbanGroup
* @access public
* @return void
*/
public function assignTo($bugID)
public function assignTo($bugID, $kanbanGroup = '')
{
$bug = $this->bug->getById($bugID);
$this->bug->checkBugExecutionPriv($bug);
@@ -1247,7 +1264,7 @@ class bug extends control
{
$bug = $this->bug->getById($bugID);
$execution = $this->loadModel('execution')->getByID($bug->execution);
if(isset($execution->type) and $execution->type == 'kanban' and $this->app->tab == 'execution')
if(isset($execution->type) and $execution->type == 'kanban' and $this->app->tab == 'execution' and $kanbanGroup == 'default')
{
$kanbanData = $this->loadModel('kanban')->getRDKanban($bug->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all');
$kanbanData = json_encode($kanbanData);