diff --git a/module/bug/js/browse.ui.js b/module/bug/js/browse.ui.js index e7ea66142d..3e314bf5cd 100644 --- a/module/bug/js/browse.ui.js +++ b/module/bug/js/browse.ui.js @@ -50,10 +50,13 @@ window.onRenderCell = function(result, {row, col}) } } - if(result && col.name == 'deadline') + if(result[0] && col.name == 'deadline') { - if(row.data.deadline === '0000-00-00') return result; - if(row.data.deadline < today) result[0] = {html: '' + row.data.deadline + ''}; + const bug = row.data; + if(['resolved', 'closed'].includes(bug.status)) return result; + + const yesterday = zui.formatDate(zui.createDate() - 24 * 60 * 60 * 1000, 'yyyy-MM-dd'); + if(result[0] <= yesterday) result[0] = {html: '' + result[0] + ''}; } return result; diff --git a/module/execution/js/bug.ui.js b/module/execution/js/bug.ui.js index bb544daf13..f97bd897ed 100644 --- a/module/execution/js/bug.ui.js +++ b/module/execution/js/bug.ui.js @@ -66,6 +66,14 @@ window.onRenderCell = function(result, {row, col}) result.push({html: '[' + caseCommonLang + '#' + row.data.case + ']'}); } } + if(col.name == 'deadline' && result[0]) + { + const bug = row.data; + if(['resolved', 'closed'].includes(bug.status)) return result; + + const yesterday = zui.formatDate(zui.createDate() - 24 * 60 * 60 * 1000, 'yyyy-MM-dd'); + if(result[0] <= yesterday) result[0] = {html: '' + result[0] + ''}; + } return result; } diff --git a/module/execution/js/task.ui.js b/module/execution/js/task.ui.js index 0bfb44c459..1265727755 100644 --- a/module/execution/js/task.ui.js +++ b/module/execution/js/task.ui.js @@ -136,6 +136,8 @@ window.renderCell = function(result, info) } if(info.col.name == 'deadline' && result[0]) { + if(['done', 'cancel', 'close'].includes(task.rawStatus)) return result; + const today = zui.formatDate(zui.createDate(), 'yyyy-MM-dd'); const yesterday = zui.formatDate(convertStringToDate(today) - 24 * 60 * 60 * 1000, 'yyyy-MM-dd'); if(result[0] == today) diff --git a/module/my/js/bug.ui.js b/module/my/js/bug.ui.js index c7a6405b6b..eb11841bb0 100644 --- a/module/my/js/bug.ui.js +++ b/module/my/js/bug.ui.js @@ -24,6 +24,14 @@ window.onRenderBugNameCell = function(result, info) { result[result.length] = {html: '' + testcaseTitle.replace('{case}', info.row.data.case) + ''}; } + if(info.col.name == 'deadline' && result[0]) + { + const bug = info.row.data; + if(['resolved', 'closed'].includes(bug.status)) return result; + + const yesterday = zui.formatDate(zui.createDate() - 24 * 60 * 60 * 1000, 'yyyy-MM-dd'); + if(result[0] <= yesterday) result[0] = {html: '' + result[0] + ''}; + } return result; } diff --git a/module/my/js/task.ui.js b/module/my/js/task.ui.js index bc42fae206..0f53948829 100644 --- a/module/my/js/task.ui.js +++ b/module/my/js/task.ui.js @@ -58,9 +58,9 @@ window.setStatistics = function(element, checks) */ window.renderCell = function(result, info) { + const task = info.row.data; if(info.col.name == 'name' && result) { - const task = info.row.data; let html = ''; if(task.team) { @@ -74,6 +74,8 @@ window.renderCell = function(result, info) } if(info.col.name == 'deadline' && result[0]) { + if(['done', 'cancel', 'close'].includes(task.rawStatus)) return result; + const today = zui.formatDate(zui.createDate(), 'yyyy-MM-dd'); const yesterday = zui.formatDate(convertStringToDate(today) - 24 * 60 * 60 * 1000, 'yyyy-MM-dd'); if(result[0] == today) diff --git a/module/my/ui/task.html.php b/module/my/ui/task.html.php index 1afdd0d098..1783497fb5 100644 --- a/module/my/ui/task.html.php +++ b/module/my/ui/task.html.php @@ -36,8 +36,13 @@ if($type == 'assignedTo') unset($config->my->task->dtable->fieldList['assignedTo if($type == 'openedBy') unset($config->my->task->dtable->fieldList['openedBy']); if($type == 'finishedBy') unset($config->my->task->dtable->fieldList['finishedBy']); -$tasks = initTableData($tasks, $config->my->task->dtable->fieldList, $this->task); $cols = array_values($config->my->task->dtable->fieldList); +$tasks = initTableData($tasks, $config->my->task->dtable->fieldList, $this->task); +foreach($tasks as $task) +{ + $task->rawStatus = $task->status; + $task->status = $this->processStatus('task', $task); +} $data = array_values($tasks); if($config->edition == 'ipd') diff --git a/module/project/js/bug.ui.js b/module/project/js/bug.ui.js index a4da6778db..ded2dd71ec 100644 --- a/module/project/js/bug.ui.js +++ b/module/project/js/bug.ui.js @@ -30,6 +30,14 @@ $(document).off('click', '.batch-btn').on('click', '.batch-btn', function() window.onRenderCell = function(result, {row, col}) { if(result && col.name == 'title' && row.data.color) result[0].props.style = 'color: ' + row.data.color; + if(col.name == 'deadline' && result[0]) + { + const bug = row.data; + if(['resolved', 'closed'].includes(bug.status)) return result; + + const yesterday = zui.formatDate(zui.createDate() - 24 * 60 * 60 * 1000, 'yyyy-MM-dd'); + if(result[0] <= yesterday) result[0] = {html: '' + result[0] + ''}; + } return result; }