* Code for task#59546. Update batch create story and change story.

This commit is contained in:
xieqiyu
2022-07-07 09:49:15 +08:00
parent 779e95fde9
commit 75d4bc213c
+37 -2
View File
@@ -500,7 +500,25 @@ class story extends control
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'idList' => $stories));
if(isonlybody()) return print(js::closeModal('parent.parent', 'this'));
if(isonlybody())
{
$executionID = $executionID ? $executionID : $this->session->execution;
$execution = $this->execution->getByID($executionID);
if($this->app->tab == 'execution' and $execution->type == 'kanban')
{
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
$kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, $execLaneType, 'id_desc', 0, $execGroupBy, $rdSearchValue);
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
}
else
{
return print(js::reload('parent.parent'));
}
}
if($storyID)
{
@@ -1022,7 +1040,24 @@ class story extends control
$module = $this->app->tab == 'project' ? 'projectstory' : 'story';
if(isonlybody()) return print(js::reload('parent.parent'));
if(isonlybody())
{
$execution = $this->execution->getByID($this->session->execution);
if($this->app->tab == 'execution' and $execution->type == 'kanban')
{
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
$kanbanData = $this->loadModel('kanban')->getRDKanban($this->session->execution, $execLaneType, 'id_desc', 0, $execGroupBy, $rdSearchValue);
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
}
else
{
return print(js::reload('parent.parent'));
}
}
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'success'));
return print(js::locate($this->createLink($module, 'view', "storyID=$storyID"), 'parent'));