* Fix bug #18578,18536.
This commit is contained in:
@@ -59,7 +59,7 @@
|
||||
|
||||
.region .kanban-item {position: relative}
|
||||
|
||||
.kanban-card {height: auto !important; padding: 8px 14px !important}
|
||||
.kanban-card {height: auto !important; padding: 8px 14px !important; min-height: 60px;}
|
||||
|
||||
.cardcolor {width:40px; height: 14px; float: left; margin-left: 5px; margin-right: 5px; margin-top: 2px; border-radius: 2px;}
|
||||
#cardcolormenu {padding:2px 2px; width: 100px;}
|
||||
|
||||
@@ -964,7 +964,6 @@ function initKanban($kanban)
|
||||
displayCards: displayCards,
|
||||
createColumnText: kanbanLang.createColumn,
|
||||
addItemText: '',
|
||||
cardHeight: getCardHeight(),
|
||||
cardsPerRow: window.kanbanScaleSize,
|
||||
onAction: handleKanbanAction,
|
||||
onRenderLaneName: renderLaneName,
|
||||
|
||||
@@ -786,13 +786,13 @@ function createColumnCreateMenu(options)
|
||||
}
|
||||
else if(col.laneType == 'bug')
|
||||
{
|
||||
if(priv.canCreateBug) items.push({label: bugLang.create, url: $.createLink('bug', 'create', 'productID=0&moduleID=0&extra=executionID=' + executionID, '', true), className: 'iframe'});
|
||||
if(priv.canBatchCreateBug) items.push({label: bugLang.batchCreate, url: $.createLink('bug', 'batchcreate', 'productID=' + productID + '&moduleID=0&executionID=' + executionID, '', true), className: 'iframe'});
|
||||
if(priv.canCreateBug) items.push({label: bugLang.create, url: $.createLink('bug', 'create', 'productID=0&moduleID=0&extra=executionID=' + executionID, '', true), className: 'iframe', attrs: {'data-width': '80%'}});
|
||||
if(priv.canBatchCreateBug) items.push({label: bugLang.batchCreate, url: $.createLink('bug', 'batchcreate', 'productID=' + productID + '&moduleID=0&executionID=' + executionID, '', true), className: 'iframe', attrs: {'data-width': '90%'}});
|
||||
}
|
||||
else
|
||||
{
|
||||
if(priv.canCreateTask) items.push({label: taskLang.create, url: $.createLink('task', 'create', 'executionID=' + executionID, '', true), className: 'iframe'});
|
||||
if(priv.canBatchCreateTask) items.push({label: taskLang.batchCreate, url: $.createLink('task', 'batchcreate', 'executionID=' + executionID, '', true), className: 'iframe'});
|
||||
if(priv.canCreateTask) items.push({label: taskLang.create, url: $.createLink('task', 'create', 'executionID=' + executionID, '', true), className: 'iframe', attrs: {'data-width': '80%'}});
|
||||
if(priv.canBatchCreateTask) items.push({label: taskLang.batchCreate, url: $.createLink('task', 'batchcreate', 'executionID=' + executionID, '', true), className: 'iframe', attrs: {'data-width': '80%'}});
|
||||
}
|
||||
return items;
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ js::set('hasTaskButton', $hasTaskButton);
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class='panel' id='kanbanContainer'>
|
||||
<div class='panel-body'>
|
||||
<div class='panel-body region'>
|
||||
<div id='kanbans' class='kanban'></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -938,7 +938,7 @@ class kanbanModel extends model
|
||||
->fetchgroup('lane', 'column');
|
||||
|
||||
/* Get group objects. */
|
||||
if($browseType == 'all' or $browseType == 'story') $objectGroup['story'] = $this->loadModel('story')->getExecutionStories($executionID);
|
||||
if($browseType == 'all' or $browseType == 'story') $objectGroup['story'] = $this->loadModel('story')->getExecutionStories($executionID, 0, 0, 't1.`order`_desc', 'allStory');
|
||||
if($browseType == 'all' or $browseType == 'bug') $objectGroup['bug'] = $this->loadModel('bug')->getExecutionBugs($executionID);
|
||||
if($browseType == 'all' or $browseType == 'task') $objectGroup['task'] = $this->loadModel('execution')->getKanbanTasks($executionID, "id");
|
||||
|
||||
@@ -1017,7 +1017,7 @@ class kanbanModel extends model
|
||||
->fetchGroup('lane', 'id');
|
||||
|
||||
/* Get group objects. */
|
||||
if($browseType == 'all' or $browseType == 'story') $objectGroup['story'] = $this->loadModel('story')->getExecutionStories($executionID);
|
||||
if($browseType == 'all' or $browseType == 'story') $objectGroup['story'] = $this->loadModel('story')->getExecutionStories($executionID, 0, 0, 't1.`order`_desc', 'allStory');
|
||||
if($browseType == 'all' or $browseType == 'bug') $objectGroup['bug'] = $this->loadModel('bug')->getExecutionBugs($executionID);
|
||||
if($browseType == 'all' or $browseType == 'task') $objectGroup['task'] = $this->loadModel('execution')->getKanbanTasks($executionID, "id");
|
||||
|
||||
@@ -1116,7 +1116,7 @@ class kanbanModel extends model
|
||||
public function getKanban4Group($executionID, $browseType, $groupBy)
|
||||
{
|
||||
/* Get card data. */
|
||||
if($browseType == 'story') $cardList = $this->loadModel('story')->getExecutionStories($executionID);
|
||||
if($browseType == 'story') $cardList = $this->loadModel('story')->getExecutionStories($executionID, 0, 0, 't1.`order`_desc', 'allStory');
|
||||
if($browseType == 'bug') $cardList = $this->loadModel('bug')->getExecutionBugs($executionID);
|
||||
if($browseType == 'task') $cardList = $this->loadModel('execution')->getKanbanTasks($executionID, "id");
|
||||
|
||||
@@ -2147,7 +2147,7 @@ class kanbanModel extends model
|
||||
|
||||
if($laneType == 'story')
|
||||
{
|
||||
$stories = $this->loadModel('story')->getExecutionStories($executionID, 0, 0, 't1.`order`_desc', 'byModule', 0, 'story', $otherCardList);
|
||||
$stories = $this->loadModel('story')->getExecutionStories($executionID, 0, 0, 't1.`order`_desc', 'allStory', 0, 'story', $otherCardList);
|
||||
foreach($stories as $storyID => $story)
|
||||
{
|
||||
foreach($this->config->kanban->storyColumnStageList as $colType => $stage)
|
||||
|
||||
+22
-1
@@ -1983,6 +1983,8 @@ class storyModel extends model
|
||||
*/
|
||||
public function setStage($storyID)
|
||||
{
|
||||
$this->loadModel('kanban');
|
||||
|
||||
$storyID = (int)$storyID;
|
||||
$account = $this->app->user->account;
|
||||
|
||||
@@ -2014,7 +2016,11 @@ class storyModel extends model
|
||||
{
|
||||
$this->dao->update(TABLE_STORY)->set('stage')->eq('closed')->where('id')->eq($storyID)->exec();
|
||||
foreach($stages as $branch => $stage) $this->dao->replace(TABLE_STORYSTAGE)->set('story')->eq($storyID)->set('branch')->eq($branch)->set('stage')->eq('closed')->exec();
|
||||
foreach($executions as $execution => $branch) $this->dao->replace(TABLE_STORYSTAGE)->set('story')->eq($storyID)->set('branch')->eq($branch)->set('stage')->eq('closed')->exec();
|
||||
foreach($executions as $execution => $branch)
|
||||
{
|
||||
$this->dao->replace(TABLE_STORYSTAGE)->set('story')->eq($storyID)->set('branch')->eq($branch)->set('stage')->eq('closed')->exec();
|
||||
$this->kanban->updateLane($execution, 'story');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2167,6 +2173,21 @@ class storyModel extends model
|
||||
$this->dao->update(TABLE_STORY)->set('stage')->eq(current($stages))->where('id')->eq($storyID)->exec();
|
||||
}
|
||||
|
||||
$currentStory = $this->dao->findById($storyID)->from(TABLE_STORY)->fetch();
|
||||
if($story->stage != $currentStory->stage)
|
||||
{
|
||||
$executionIdList = $this->dao->select('t1.id')->from(TABLE_PROJECT)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECTSTORY)->alias('t2')->on('t1.id=t2.project')
|
||||
->where('t1.deleted')->eq(0)
|
||||
->andWhere('t1.type')->in('sprint,stage,kanban')
|
||||
->andWhere('t2.story')->eq($story)
|
||||
->fetchPairs();
|
||||
foreach($executionIdList as $executionID)
|
||||
{
|
||||
$this->kanban->updateLane($executionID, 'story');
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -458,7 +458,7 @@ class taskModel extends model
|
||||
if(!empty($changes)) $this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
|
||||
if(!isset($output['laneID']) or !isset($output['columnID'])) $this->kanban->updateLane($kanbanID, 'task');
|
||||
if(!isset($output['laneID']) or !isset($output['columnID'])) $this->kanban->updateLane($executionID, 'task');
|
||||
return $mails;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user