* Fix bug of execution kanban.
This commit is contained in:
@@ -179,7 +179,7 @@ function createColumnCreateMenu(options)
|
||||
|
||||
if(col.type == 'backlog')
|
||||
{
|
||||
if(priv.canCreateStory) items.push({label: storyLang.create, url: $.createLink('story', 'create', 'productID=' + productID + '&branch=0&moduleID=0&storyID=0&objectID=0&bugID=0&planID=0&todoID=0&extra=executionID=' + executionID + ',laneID=' + laneID + ',columnID=' + col.id, '', true), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
if(priv.canCreateStory) items.push({label: storyLang.create, url: $.createLink('story', 'create', 'productID=' + productID + '&branch=0&moduleID=0&storyID=0&objectID=' + executionID + '&bugID=0&planID=0&todoID=0&extra=laneID=' + laneID + ',columnID=' + col.id, '', true), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
if(priv.canBatchCreateStory) items.push({label: executionLang.batchCreateStroy, url: $.createLink('story', 'batchcreate', 'productID=' + productID + '&branch=0&moduleID=0&storyID=0&executionID=' + executionID + '&plan=0&type=story&extra=laneID=' + laneID + ',columnID=' + col.id, '', true), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '90%'}});
|
||||
if(priv.canLinkStory) items.push({label: executionLang.linkStory, url: $.createLink('execution', 'linkStory', 'executionID=' + executionID + '&browseType=¶m=0&recTotal=0&recPerPage=50,&pageID=1&extra=laneID=' + laneID + ',columnID=' + col.id, '', true), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '90%'}});
|
||||
if(priv.canLinkStoryByPlane) items.push({label: executionLang.linkStoryByPlan, url: '#linkStoryByPlan', 'attrs' : {'data-toggle': 'modal', 'data-target': '#linkStoryByPlan','data-col' : col.id, 'data-lane' : laneID, 'class' : 'linkStoryByPlanButton'}});
|
||||
@@ -1020,7 +1020,8 @@ $(function()
|
||||
var planID = $('#plan').val();
|
||||
if(planID)
|
||||
{
|
||||
location.href = createLink('execution', 'importPlanStories', 'executionID=' + executionID + '&planID=' + planID + '&productID=0&fromMethod=kanban&extra=laneID='+ $('.linkStoryByPlanButton').data('lane') + ',columnID=' + $('.linkStoryByPlanButton').data('col'));
|
||||
var vars = $('.linkStoryByPlanButton').data('lane') != null ? '&extra=laneID='+ $('.linkStoryByPlanButton').data('lane') + ',columnID=' + $('.linkStoryByPlanButton').data('col') : '';
|
||||
location.href = createLink('execution', 'importPlanStories', 'executionID=' + executionID + '&planID=' + planID + '&productID=0&fromMethod=kanban' + vars);
|
||||
$.closeModal();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -2288,6 +2288,7 @@ class executionModel extends model
|
||||
$linkedStories = $this->dao->select('*')->from(TABLE_PROJECTSTORY)->where('project')->eq($executionID)->orderBy('order_desc')->fetchPairs('story', 'order');
|
||||
$lastOrder = reset($linkedStories);
|
||||
$storyList = $this->dao->select('id, status, branch')->from(TABLE_STORY)->where('id')->in(array_values($stories))->fetchAll('id');
|
||||
$execution = $this->getById($executionID);
|
||||
|
||||
$extra = str_replace(array(',', ' '), array('&', ''), $extra);
|
||||
parse_str($extra, $output);
|
||||
@@ -2297,7 +2298,18 @@ class executionModel extends model
|
||||
if(strpos($notAllowedStatus, $storyList[$storyID]->status) !== false) continue;
|
||||
if(isset($linkedStories[$storyID])) continue;
|
||||
|
||||
if(isset($output['laneID']) and isset($output['columnID'])) $this->loadModel('kanban')->addKanbanCell($executionID, $output['laneID'], $output['columnID'], 'story', $storyID);
|
||||
if($execution->type == 'kanban')
|
||||
{
|
||||
if(isset($output['laneID']) and isset($output['columnID']))
|
||||
{
|
||||
$this->loadModel('kanban')->addKanbanCell($executionID, $output['laneID'], $output['columnID'], 'story', $storyID);
|
||||
}
|
||||
else
|
||||
{
|
||||
$cell = $this->dao->select('lane,`column`')->from(TABLE_KANBANCELL)->where('type')->eq('story')->andWhere('kanban')->eq($executionID)->fetch();
|
||||
$this->loadModel('kanban')->addKanbanCell($executionID, $cell->lane, $cell->column, 'story', $storyID);
|
||||
}
|
||||
}
|
||||
|
||||
$data = new stdclass();
|
||||
$data->project = $executionID;
|
||||
|
||||
@@ -114,7 +114,7 @@ $lang->my->executionLinkList = array();
|
||||
if($config->systemMode == 'new')
|
||||
{
|
||||
$lang->my->executionLinkList['execution-all'] = '默认进入执行列表,可以查看所有的执行';
|
||||
$lang->my->executionLinkList['execution-task'] = '默认进入最近一个执行的任务列表或看板看板视图,可以查看当前迭代下的任务信息';
|
||||
$lang->my->executionLinkList['execution-task'] = '默认进入最近一个执行的任务列表或看板视图,可以查看当前迭代下的任务信息';
|
||||
$lang->my->executionLinkList['execution-executionkanban'] = '默认进入执行看板,可以查看进行中项目的执行情况';
|
||||
}
|
||||
if($config->systemMode == 'classic') $lang->my->executionLinkList['execution-task'] = "默认进入最近一个{$lang->executionCommon}的任务列表,可以查看当前{$lang->executionCommon}下的任务信息";
|
||||
|
||||
@@ -105,9 +105,20 @@ class story extends control
|
||||
|
||||
$storyID = $storyResult['id'];
|
||||
$productID = $this->post->product ? $this->post->product : $productID;
|
||||
$execution = $this->dao->findById((int)$objectID)->from(TABLE_EXECUTION)->fetch();
|
||||
|
||||
if(isset($output['executionID']) and isset($output['laneID']) and isset($output['columnID'])) $this->loadModel('kanban')->addKanbanCell($output['executionID'], $output['laneID'], $output['columnID'], 'story', $storyID);
|
||||
|
||||
if(!empty($execution) and $execution->type == 'kanban')
|
||||
{
|
||||
if(isset($output['laneID']) and isset($output['columnID']))
|
||||
{
|
||||
$this->loadModel('kanban')->addKanbanCell($objectID, $output['laneID'], $output['columnID'], 'story', $storyID);
|
||||
}
|
||||
else
|
||||
{
|
||||
$cell = $this->dao->select('lane,`column`')->from(TABLE_KANBANCELL)->where('type')->eq('story')->andWhere('kanban')->eq($objectID)->fetch();
|
||||
$this->loadModel('kanban')->addKanbanCell($objectID, $cell->lane, $cell->column, 'story', $storyID);
|
||||
}
|
||||
}
|
||||
if($storyResult['status'] == 'exists')
|
||||
{
|
||||
$response['message'] = sprintf($this->lang->duplicate, $this->lang->story->common);
|
||||
|
||||
Reference in New Issue
Block a user