From b40e7699e52c9a18806842f5936623f3691623a6 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 22 Mar 2022 10:37:32 +0800 Subject: [PATCH 1/7] * Fix bug #20731. --- module/kanban/view/space.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/kanban/view/space.html.php b/module/kanban/view/space.html.php index beb0b76392..0d21beed09 100644 --- a/module/kanban/view/space.html.php +++ b/module/kanban/view/space.html.php @@ -147,7 +147,7 @@ -
+

kanban->empty;?>

From 10f8402f78ff83e4b378865386fe9f9f7f8ba54c Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 22 Mar 2022 10:48:12 +0800 Subject: [PATCH 2/7] * Fix bug #20731. --- module/kanban/css/space.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/kanban/css/space.css b/module/kanban/css/space.css index 8451f6d1f3..0af2b80557 100644 --- a/module/kanban/css/space.css +++ b/module/kanban/css/space.css @@ -36,3 +36,5 @@ .kanbans .kanbanAcl {position: absolute; right: 0px; bottom: 2px; color: #838a9d;} a.disabled {pointer-events: none;} + +.noBorder{border: 0px;} From 8cf4b3bcaebb6f35d1e62955b1134012d57f1e42 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 22 Mar 2022 11:01:14 +0800 Subject: [PATCH 3/7] * Fix bug #19261. --- module/bug/control.php | 10 +++++++++- module/bug/model.php | 13 ++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 931a218447..308cdea98e 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -1504,6 +1504,15 @@ class bug extends control public function resolve($bugID, $extra = '') { $bug = $this->bug->getById($bugID); + if($bug->execution) + { + $execution = $this->loadModel('execution')->getByID($bug->execution); + if($execution->type == 'kanban' and $this->app->tab == 'execution') + { + $this->app->loadLang('build'); + $this->lang->build->execution = str_replace($this->lang->executionCommon, $this->lang->execution->kanban, $this->lang->build->execution); + } + } if(!empty($_POST)) { $changes = $this->bug->resolve($bugID, $extra); @@ -1535,7 +1544,6 @@ class bug extends control parse_str($extra, $output); if(isonlybody()) { - $execution = $this->loadModel('execution')->getByID($bug->execution); if(isset($execution->type) and $execution->type == 'kanban' and $this->app->tab == 'execution') { $regionID = isset($output['regionID']) ? $output['regionID'] : 0; diff --git a/module/bug/model.php b/module/bug/model.php index a731b4afc4..df9f1bc9ce 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1055,7 +1055,18 @@ class bugModel extends model if($bug->resolution == 'duplicate' and !$this->post->duplicateBug) dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->bug->duplicateBug); if(empty($bug->buildName)) dao::$errors['buildName'][] = sprintf($this->lang->error->notempty, $this->lang->bug->placeholder->newBuildName); - if(empty($bug->buildExecution)) dao::$errors['buildExecution'][] = sprintf($this->lang->error->notempty, $this->lang->bug->execution); + if(empty($bug->buildExecution)) + { + if($oldBug->execution) + { + $execution = $this->loadModel('execution')->getByID($oldBug->execution); + if($execution->type == 'kanban' and $this->app->tab == 'execution') + { + $this->lang->bug->execution = str_replace($this->lang->execution->common, $this->lang->execution->kanban, $this->lang->bug->execution); + } + } + dao::$errors['buildExecution'][] = sprintf($this->lang->error->notempty, $this->lang->bug->execution); + } if(dao::isError()) return false; $buildData = new stdclass(); From acd514e738764537f6d142b3840907954a626e78 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 22 Mar 2022 11:13:38 +0800 Subject: [PATCH 4/7] * Fix bug #19251. --- module/kanban/css/view.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/kanban/css/view.css b/module/kanban/css/view.css index ffb7494ac2..8a3f80b30c 100644 --- a/module/kanban/css/view.css +++ b/module/kanban/css/view.css @@ -19,7 +19,7 @@ .region .region-header label {color: #999; background: transparent; border: 1px solid #ddd; margin-left: 10px; margin-right: 10px} .region .region-header .action {float: right} .region .region-header .icon-double-angle-up,.icon-double-angle-down {cursor: pointer;} -.region .kanban-header-sub-cols {border-right: 2px solid #fff;margin-left:0;} +.region .kanban-header-sub-cols {margin-left:0;} .region .kanban-header-sub-cols .kanban-header-col > .title {max-width: 100% !important;min-width:240px;} .region .sort .region-header {cursor: move;} From 1004f727ae81be2d351485fa3e16390d406b762d Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 22 Mar 2022 12:35:34 +0800 Subject: [PATCH 5/7] * Modify language item. --- module/bug/control.php | 12 +++--------- module/bug/model.php | 5 +++-- module/bug/view/resolve.html.php | 2 +- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 308cdea98e..00e55cdb57 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -1504,15 +1504,8 @@ class bug extends control public function resolve($bugID, $extra = '') { $bug = $this->bug->getById($bugID); - if($bug->execution) - { - $execution = $this->loadModel('execution')->getByID($bug->execution); - if($execution->type == 'kanban' and $this->app->tab == 'execution') - { - $this->app->loadLang('build'); - $this->lang->build->execution = str_replace($this->lang->executionCommon, $this->lang->execution->kanban, $this->lang->build->execution); - } - } + if($bug->execution) $execution = $this->loadModel('execution')->getByID($bug->execution); + if(!empty($_POST)) { $changes = $this->bug->resolve($bugID, $extra); @@ -1584,6 +1577,7 @@ class bug extends control $this->view->executions = $this->loadModel('product')->getExecutionPairsByProduct($productID, $bug->branch ? "0,{$bug->branch}" : 0, 'id_desc', $projectID); $this->view->builds = $this->loadModel('build')->getBuildPairs($productID, $bug->branch, 'withbranch'); $this->view->actions = $this->action->getList('bug', $bugID); + $this->view->execution = isset($execution) ? $execution : ''; $this->display(); } diff --git a/module/bug/model.php b/module/bug/model.php index df9f1bc9ce..75d2d54035 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1057,15 +1057,16 @@ class bugModel extends model if(empty($bug->buildName)) dao::$errors['buildName'][] = sprintf($this->lang->error->notempty, $this->lang->bug->placeholder->newBuildName); if(empty($bug->buildExecution)) { + $executionField = $this->lang->bug->execution; if($oldBug->execution) { $execution = $this->loadModel('execution')->getByID($oldBug->execution); if($execution->type == 'kanban' and $this->app->tab == 'execution') { - $this->lang->bug->execution = str_replace($this->lang->execution->common, $this->lang->execution->kanban, $this->lang->bug->execution); + $executionField = $this->lang->bug->kanban; } } - dao::$errors['buildExecution'][] = sprintf($this->lang->error->notempty, $this->lang->bug->execution); + dao::$errors['buildExecution'][] = sprintf($this->lang->error->notempty, $executionField); } if(dao::isError()) return false; diff --git a/module/bug/view/resolve.html.php b/module/bug/view/resolve.html.php index dcb8c8b4d3..4ce907d918 100644 --- a/module/bug/view/resolve.html.php +++ b/module/bug/view/resolve.html.php @@ -44,7 +44,7 @@ js::set('productID' , $bug->product); bug->resolvedBuild;?>
- build->execution;?> + type == 'kanban' and $app->tab == 'execution') ? $lang->bug->kanban : $lang->build->execution;?>
From 303c546348610e8dd14ac5f6001490b1ceea28b9 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 22 Mar 2022 13:25:13 +0800 Subject: [PATCH 6/7] * Fix bug #20915. --- module/execution/js/kanban.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/execution/js/kanban.js b/module/execution/js/kanban.js index a302de8a3e..c413d194f7 100644 --- a/module/execution/js/kanban.js +++ b/module/execution/js/kanban.js @@ -1101,7 +1101,7 @@ function createStoryMenu(options) var items = []; var showAction = story.$col.type == 'backlog' || story.$col.type == 'ready' || story.$col.type == 'developing' || story.$col.type == 'developed' || story.$col.type == 'testing' || story.$col.type == 'tested' || story.$col.type == 'verified' || story.$col.type == 'released'; - if(priv.canEditStory) items.push({label: storyLang.edit, icon: 'edit', url: createLink('story', 'edit', 'storyID=' + story.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); + if(priv.canEditStory) items.push({label: storyLang.edit, icon: 'edit', url: createLink('story', 'edit', 'storyID=' + story.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '95%'}}); if(priv.canChangeStory && showAction) items.push({label: storyLang.change, icon: 'change', url: createLink('story', 'change', 'storyID=' + story.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); if(priv.canCreateTask && showAction) items.push({label: executionLang.wbs, icon: 'plus', url: createLink('task', 'create', 'executionID=' + execution.id + '&storyID=' + story.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); if(priv.canBatchCreateTask && showAction) items.push({label: executionLang.batchWBS, icon: 'pluses', url: createLink('task', 'batchCreate', 'executionID=' + execution.id + '&storyID=' + story.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); @@ -1120,7 +1120,7 @@ function createTaskMenu(options) var $card = options.$trigger.closest('.kanban-item'); var task = $card.data('item'); var items = []; - if(priv.canEditTask) items.push({label: taskLang.edit, icon: 'edit', url: createLink('task', 'edit', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); + if(priv.canEditTask) items.push({label: taskLang.edit, icon: 'edit', url: createLink('task', 'edit', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '95%'}}); if(priv.canRestartTask && task.$col.type == 'pause') items.push({label: taskLang.restart, icon: 'play', url: createLink('task', 'restart', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); if(priv.canPauseTask && task.$col.type == 'developing') items.push({label: taskLang.pause, icon: 'pause', url: createLink('task', 'pause', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); if(priv.canRecordEstimateTask) items.push({label: executionLang.effort, icon: 'time', url: createLink('task', 'recordEstimate', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); @@ -1140,7 +1140,7 @@ function createBugMenu(options) var $card = options.$trigger.closest('.kanban-item'); var bug = $card.data('item'); var items = []; - if(priv.canEditBug) items.push({label: bugLang.edit, icon: 'edit', url: createLink('bug', 'edit', 'bugID=' + bug.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); + if(priv.canEditBug) items.push({label: bugLang.edit, icon: 'edit', url: createLink('bug', 'edit', 'bugID=' + bug.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '95%'}}); if(priv.canResolveBug && (bug.$col.type == 'unconfirmed' || bug.$col.type == 'confirmed' || bug.$col.type == 'fixing')) items.push({label: bugLang.resolve, icon: 'checked', url: createLink('bug', 'resolve', 'bugID=' + bug.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); if(priv.canConfirmBug && (bug.$col.type == 'fixed' || bug.$col.type == 'testing' || bug.$col.type == 'tested')) items.push({label: bugLang.close, icon: 'off', url: createLink('bug', 'close', 'bugID=' + bug.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); if(priv.canConfirmBug && bug.$col.type == 'unconfirmed') items.push({label: bugLang.confirmBug, icon: 'ok', url: createLink('bug', 'confirmbug', 'bugID=' + bug.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); From 129c55db39cf5f22441c58afb16cc4bd854f1728 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 22 Mar 2022 13:40:43 +0800 Subject: [PATCH 7/7] * Delete useless judgment conditions. --- module/bug/model.php | 9 +++------ module/bug/view/resolve.html.php | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/module/bug/model.php b/module/bug/model.php index 75d2d54035..d07cfe6a95 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1057,16 +1057,13 @@ class bugModel extends model if(empty($bug->buildName)) dao::$errors['buildName'][] = sprintf($this->lang->error->notempty, $this->lang->bug->placeholder->newBuildName); if(empty($bug->buildExecution)) { - $executionField = $this->lang->bug->execution; + $executionLang = $this->lang->bug->execution; if($oldBug->execution) { $execution = $this->loadModel('execution')->getByID($oldBug->execution); - if($execution->type == 'kanban' and $this->app->tab == 'execution') - { - $executionField = $this->lang->bug->kanban; - } + if($execution->type == 'kanban') $executionLang = $this->lang->bug->kanban; } - dao::$errors['buildExecution'][] = sprintf($this->lang->error->notempty, $executionField); + dao::$errors['buildExecution'][] = sprintf($this->lang->error->notempty, $executionLang); } if(dao::isError()) return false; diff --git a/module/bug/view/resolve.html.php b/module/bug/view/resolve.html.php index 4ce907d918..1217f16097 100644 --- a/module/bug/view/resolve.html.php +++ b/module/bug/view/resolve.html.php @@ -44,7 +44,7 @@ js::set('productID' , $bug->product); bug->resolvedBuild;?>
- type == 'kanban' and $app->tab == 'execution') ? $lang->bug->kanban : $lang->build->execution;?> + type == 'kanban') ? $lang->bug->kanban : $lang->build->execution;?>