* Fix bug for task #62935.

This commit is contained in:
liumengyi
2022-08-03 08:39:25 +08:00
parent 5977be1fde
commit 6d019f65e5
10 changed files with 39 additions and 18 deletions
+1 -1
View File
@@ -2473,7 +2473,7 @@ class execution extends control
unset($this->lang->kanban->type['all']);
}
if($groupBy == 'story' and $browseType == 'task' and !isset($this->lang->kanban->orderList[$orderBy])) $orderBy = 'pri_asc';
if($groupBy == 'story' and $browseType == 'task' and !isset($this->lang->kanban->orderList[$orderBy])) $orderBy = 'id_asc';
$kanbanGroup = $this->kanban->getExecutionKanban($executionID, $browseType, $groupBy, '', $orderBy);
if(empty($kanbanGroup))
{
+5
View File
@@ -37,6 +37,7 @@
.region .kanban-header-col > .title {margin: 0}
.region .kanban-header-col > .title > span {display: inline-block; overflow: hidden; padding-right:2px; position: initial; max-width: 85px !important;}
.region .kanban-header-col > .title > .storyColumn {margin-right: 30px;}
.region .kanban-header-col > .title > .storyColumn .text {font-weight: 700; color:rgb(51, 51, 51);}
.region .kanban-header-col > .title > .storyColumn + .dropdown-menu {top: 45px; left: auto;}
.region .kanban-header-col > .title > .text-grey {opacity: .5; font-weight: bold; color: #8b91a2;}
.region .kanban-header-col > .title > .count {opacity: .5; font-weight: bold; color: #8b91a2;}
@@ -116,3 +117,7 @@
#rdKanbanSearchInput {width: 150px;}
#rdSearchBox {display: none; width: 150px;}
.btn-link.querybox-toggle {background-color: rgba(0,0,0,0);}
#kanban .kanban-affixed .kanban-header-col .title.action-dbc {pointer-events: none;}
#kanban .kanban-affixed .kanban-header-col .title.action-dbc .storyColumn .text {color: #fff;}
#kanban .kanban-affixed .kanban-header-col .title.action-dbc .storyColumn .caret {display: none;}
+5
View File
@@ -29,6 +29,7 @@
.kanban-affixed .kanban-header-col > .title > .text,
.kanban-affixed .kanban-header-col > .title > .count {color: #fff!important;}
.kanban-header-col > .title > .text {max-width: 110px !important;}
.kanban-header-col > .title > .storyColumn .text {font-weight: 700; color:rgb(51, 51, 51);}
.kanban-header-col > .title > .storyColumn + .dropdown-menu {top: 45px; left: auto;}
#kanbanContainer {margin: 0;}
@@ -68,3 +69,7 @@
#teskKanbanSearchInput {width: 150px;}
#searchBox {display: none; width: 150px;}
.btn-link.querybox-toggle {background-color: rgba(0,0,0,0);}
#kanbans .kanban-affixed .kanban-header-col .title.action-dbc {pointer-events: none;}
#kanbans .kanban-affixed .kanban-header-col .title.action-dbc .storyColumn .text {color: #fff;}
#kanbans .kanban-affixed .kanban-header-col .title.action-dbc .storyColumn .caret {display: none;}
+7 -1
View File
@@ -361,6 +361,7 @@ function hideKanbanAction()
$('.contextmenu').removeClass('contextmenu-show');
$('.contextmenu .contextmenu-menu').removeClass('open').removeClass('in');
$('#moreTasks, #moreColumns').animate({right: -400}, 500);
$('.storyColumn').parent().removeClass('open');
}
/**
@@ -764,7 +765,7 @@ function renderCount($count, count, column)
+ ' <span class="text">' + (kanbanLang.orderList[orderBy] == undefined ? kanbanLang.orderList['pri_asc'] : kanbanLang.orderList[orderBy]) + '</span><span class="caret"></span>'
+ '</button>'
+ '<ul class="dropdown-menu">';
for(var order in kanbanLang.orderList) orderButton += '<li><a href="###" onclick="searchCards(rdSearchValue, \'' + order + '\')">' + kanbanLang.orderList[order] + '</a></li>';
for(var order in kanbanLang.orderList) orderButton += '<li class="' + (order == orderBy ? 'active' : '') + '"><a href="###" onclick="searchCards(rdSearchValue, \'' + order + '\')">' + kanbanLang.orderList[order] + '</a></li>';
orderButton += '</ul>';
$count.prev().replaceWith(orderButton);
@@ -1596,6 +1597,11 @@ $(function()
$('.color0 .cardcolor').css('border', '1px solid #fff');
});
document.addEventListener('scroll', function()
{
hideKanbanAction();
}, true);
/* Init sortable */
var sortType = '';
var $cards = null;
+6 -1
View File
@@ -345,7 +345,7 @@ function renderColumnCount($count, count, col)
+ ' <span class="text">' + (kanbanLang.orderList[orderBy] == undefined ? kanbanLang.orderList['pri_asc'] : kanbanLang.orderList[orderBy]) + '</span><span class="caret"></span>'
+ '</button>'
+ '<ul class="dropdown-menu">';
for(var order in kanbanLang.orderList) orderButton += '<li><a href="###" onclick="searchCards(searchValue, \'' + order + '\')">' + kanbanLang.orderList[order] + '</a></li>';
for(var order in kanbanLang.orderList) orderButton += '<li class="' + (order == orderBy ? 'active' : '') + '"><a href="###" onclick="searchCards(searchValue, \'' + order + '\')">' + kanbanLang.orderList[order] + '</a></li>';
orderButton += '</ul>';
$count.siblings('.storyColumn').remove();
@@ -1333,6 +1333,11 @@ $(function()
}
});
document.addEventListener('scroll', function()
{
$('.storyColumn').parent().removeClass('open');
}, true);
$('#type_chosen .chosen-single span').prepend('<i class="icon-kanban"></i>');
$('#group_chosen .chosen-single span').prepend(kanbanLang.laneGroup + ': ');
+2 -2
View File
@@ -216,10 +216,10 @@ $lang->kanban->error->childLimitNote = 'The sum of products in the child colu
$lang->kanban->error->importObjNotEmpty = 'Please select at least one import object.';
$lang->kanban->error->childLimitEmpty = 'Please set the WIP quantity of the sub column before operation.';
$lang->kanban->orderList['pri_asc'] = 'Story Priority Ascending';
$lang->kanban->orderList['pri_desc'] = 'Story Priority Descending';
$lang->kanban->orderList['id_asc'] = 'Story ID Ascending';
$lang->kanban->orderList['id_desc'] = 'Story ID Descending';
$lang->kanban->orderList['pri_asc'] = 'Story Priority Ascending';
$lang->kanban->orderList['pri_desc'] = 'Story Priority Descending';
$lang->kanban->orderList['stage_asc'] = 'Story Stage Ascending';
$lang->kanban->orderList['stage_desc'] = 'Story Stage Descending';
$lang->kanban->orderList['assignedTo'] = 'Assigned To';
+2 -2
View File
@@ -216,10 +216,10 @@ $lang->kanban->error->childLimitNote = 'The sum of products in the child colu
$lang->kanban->error->importObjNotEmpty = 'Please select at least one import object.';
$lang->kanban->error->childLimitEmpty = 'Please set the WIP quantity of the sub column before operation.';
$lang->kanban->orderList['pri_asc'] = 'Story Priority Ascending';
$lang->kanban->orderList['pri_desc'] = 'Story Priority Descending';
$lang->kanban->orderList['id_asc'] = 'Story ID Ascending';
$lang->kanban->orderList['id_desc'] = 'Story ID Descending';
$lang->kanban->orderList['pri_asc'] = 'Story Priority Ascending';
$lang->kanban->orderList['pri_desc'] = 'Story Priority Descending';
$lang->kanban->orderList['stage_asc'] = 'Story Stage Ascending';
$lang->kanban->orderList['stage_desc'] = 'Story Stage Descending';
$lang->kanban->orderList['assignedTo'] = 'Assigned To';
+2 -2
View File
@@ -216,10 +216,10 @@ $lang->kanban->error->childLimitNote = 'The sum of products in the child colu
$lang->kanban->error->importObjNotEmpty = 'Please select at least one import object.';
$lang->kanban->error->childLimitEmpty = 'Please set the WIP quantity of the sub column before operation.';
$lang->kanban->orderList['pri_asc'] = 'Story Priorité Ascendante';
$lang->kanban->orderList['pri_desc'] = 'Story Priorité Descendante';
$lang->kanban->orderList['id_asc'] = 'Story ID Ascendante';
$lang->kanban->orderList['id_desc'] = 'Story ID Descendante';
$lang->kanban->orderList['pri_asc'] = 'Story Priorité Ascendante';
$lang->kanban->orderList['pri_desc'] = 'Story Priorité Descendante';
$lang->kanban->orderList['stage_asc'] = 'Story Phase Ascendante';
$lang->kanban->orderList['stage_desc'] = 'Story Phase Descendante';
$lang->kanban->orderList['assignedTo'] = 'Assigné à';
+2 -2
View File
@@ -216,10 +216,10 @@ $lang->kanban->error->childLimitNote = '子列在制品数量之和不能大
$lang->kanban->error->importObjNotEmpty = '请至少选择一个导入对象';
$lang->kanban->error->childLimitEmpty = '请先设置子列的在制品数量后再操作';
$lang->kanban->orderList['pri_asc'] = '需求优先级正序';
$lang->kanban->orderList['pri_desc'] = '需求优先级倒序';
$lang->kanban->orderList['id_asc'] = '需求ID正序';
$lang->kanban->orderList['id_desc'] = '需求ID倒序';
$lang->kanban->orderList['pri_asc'] = '需求优先级正序';
$lang->kanban->orderList['pri_desc'] = '需求优先级倒序';
$lang->kanban->orderList['stage_asc'] = '需求阶段正序';
$lang->kanban->orderList['stage_desc'] = '需求阶段倒序';
$lang->kanban->orderList['assignedTo'] = '指派给';
+7 -7
View File
@@ -1393,7 +1393,7 @@ class kanbanModel extends model
* @access public
* @return array
*/
public function getExecutionKanban($executionID, $browseType = 'all', $groupBy = 'default', $searchValue = '', $orderBy = 'pri_asc')
public function getExecutionKanban($executionID, $browseType = 'all', $groupBy = 'default', $searchValue = '', $orderBy = 'id_asc')
{
if($groupBy != 'default') return $this->getKanban4Group($executionID, $browseType, $groupBy, $searchValue, $orderBy);
@@ -1521,7 +1521,7 @@ class kanbanModel extends model
* @access public
* @return array
*/
public function getKanban4Group($executionID, $browseType, $groupBy, $searchValue = '', $orderBy = 'pri_asc')
public function getKanban4Group($executionID, $browseType, $groupBy, $searchValue = '', $orderBy = 'id_asc')
{
/* Get card data. */
$cardList = array();
@@ -1547,7 +1547,7 @@ class kanbanModel extends model
if($browseType == 'bug') $bugCardMenu = $this->getKanbanCardMenu($executionID, $cardList, 'bug');
if($browseType == 'task') $taskCardMenu = $this->getKanbanCardMenu($executionID, $cardList, 'task');
if($groupBy == 'story' and $browseType == 'task' and !isset($this->lang->kanban->orderList[$orderBy])) $orderBy = 'pri_asc';
if($groupBy == 'story' and $browseType == 'task' and !isset($this->lang->kanban->orderList[$orderBy])) $orderBy = 'id_asc';
$lanes = $this->getLanes4Group($executionID, $browseType, $groupBy, $cardList, $orderBy);
if(empty($lanes)) return array();
@@ -1720,7 +1720,7 @@ class kanbanModel extends model
*
* @return array
*/
public function getLanes4Group($executionID, $browseType, $groupBy, $cardList, $orderBy = 'pri_asc')
public function getLanes4Group($executionID, $browseType, $groupBy, $cardList, $orderBy = 'id_asc')
{
$lanes = array();
$groupByList = array();
@@ -2238,7 +2238,7 @@ class kanbanModel extends model
if(isset($_POST['team']) or isset($_POST['whitelist']))
{
$type = isset($_POST['team']) ? 'team' : 'whitelist';
$kanbanMembers = empty($kanban->{$type}) ? array() : explode(',', $kanban->{$type});
$kanbanMembers = empty($kanban->{$type}) ? array() : explode(',', $kanban->{$type});
$this->addSpaceMembers($kanban->space, $type, $kanbanMembers);
}
@@ -2293,7 +2293,7 @@ class kanbanModel extends model
if(isset($_POST['team']) or isset($_POST['whitelist']))
{
$type = isset($_POST['team']) ? 'team' : 'whitelist';
$kanbanMembers = empty($kanban->{$type}) ? array() : explode(',', $kanban->{$type});
$kanbanMembers = empty($kanban->{$type}) ? array() : explode(',', $kanban->{$type});
$this->addSpaceMembers($kanban->space, $type, $kanbanMembers);
}
@@ -2595,7 +2595,7 @@ class kanbanModel extends model
{
$addMembers = implode(',', $addMembers);
$members .= ',' . trim($addMembers, ',');
$this->dao->update(TABLE_KANBANSPACE)->set($type)->eq($members)->where('id')->eq($spaceID)->exec();
$this->dao->update(TABLE_KANBANSPACE)->set($type)->eq($members)->where('id')->eq($spaceID)->exec();
}
}