* Fix cards count incorrect on some kanbans.

This commit is contained in:
Hao Sun
2021-12-06 11:18:49 +08:00
parent 2ed3d819e8
commit 8d08be2f57
4 changed files with 47 additions and 34 deletions
+15 -6
View File
@@ -10,9 +10,17 @@ function processKanbanData(key, programGroup)
/* Generate columns */
var columns = [];
var executionsCol;
$.each(kanbanColumns, function(_, column)
{
var colType = column.type;
column = $.extend({}, column,
{
kanban: kanbanId,
id: kanbanId + '-' + column.type,
parentType: (colType === 'doingProject' || colType === 'doingExecution') ? 'doing' : false,
});
if(colType === 'doingProject')
{
columns.push(
@@ -25,13 +33,13 @@ function processKanbanData(key, programGroup)
count: ''
});
}
columns.push($.extend({}, column,
else if(colType === 'doingExecution')
{
kanban: kanbanId,
id: kanbanId + '-' + column.type,
parentType: (colType === 'doingProject' || colType === 'doingExecution') ? 'doing' : false,
}));
executionsCol = column;
executionsCol.count = 0;
}
columns.push(column);
});
/* Format lanes data */
var lanes = [];
@@ -58,6 +66,7 @@ function processKanbanData(key, programGroup)
var execution = latestExecutions[projectID];
if(execution && execution.id)
{
executionsCol.count++;
projectItem.execution = $.extend({}, execution, {id: 'execution-' + execution.id, _id: execution.id});
}
}