From fa22cfdd6ae73d08afe13b3ec04bdfbd2f645d03 Mon Sep 17 00:00:00 2001 From: sunjun Date: Tue, 24 May 2022 01:46:53 +0000 Subject: [PATCH 01/29] fixbug_sunjun_22556 --- module/execution/css/story.css | 1 + module/execution/view/story.html.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/module/execution/css/story.css b/module/execution/css/story.css index 423452b61f..69f21f755e 100644 --- a/module/execution/css/story.css +++ b/module/execution/css/story.css @@ -14,3 +14,4 @@ th.c-pri{width:50px;} .closed-story {color: #e5e5e5;} .stageBox {height: 180px; overflow: scroll; background: #ffffff;} #executionStoryForm tbody tr td .label {max-width: 100px; text-overflow: unset;} +#assignedTo{width:90px;} diff --git a/module/execution/view/story.html.php b/module/execution/view/story.html.php index 486bf36df5..9ae5a12c90 100644 --- a/module/execution/view/story.html.php +++ b/module/execution/view/story.html.php @@ -206,7 +206,7 @@ execution->storyTitle);?> story->category);?> openedByAB);?> - assignedToAB);?> + assignedToAB);?> story->estimateAB);?> statusAB);?> story->stageAB);?> @@ -243,7 +243,7 @@ story->categoryList, $story->category);?> openedBy);?> - ' title='assignedTo);?>'>assignedTo);?> + ' title='assignedTo);?>'>loadModel('story')->printAssignedHtml($story,$users);?> estimate . $config->hourUnit;?> processStatus('story', $story);?> From c13456ef2bbaac2943687daef78c7828672784ce Mon Sep 17 00:00:00 2001 From: sunjun Date: Tue, 24 May 2022 01:49:24 +0000 Subject: [PATCH 02/29] fixbug_sunjun_22556 --- module/execution/css/story.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/execution/css/story.css b/module/execution/css/story.css index 69f21f755e..3040902372 100644 --- a/module/execution/css/story.css +++ b/module/execution/css/story.css @@ -14,4 +14,4 @@ th.c-pri{width:50px;} .closed-story {color: #e5e5e5;} .stageBox {height: 180px; overflow: scroll; background: #ffffff;} #executionStoryForm tbody tr td .label {max-width: 100px; text-overflow: unset;} -#assignedTo{width:90px;} +#assignedTo {width: 90px;} From 29c329e8d44196f90aaa282f8a3142e57a45066d Mon Sep 17 00:00:00 2001 From: sunjun Date: Tue, 24 May 2022 01:51:00 +0000 Subject: [PATCH 03/29] fixbug_sunjun_22556 --- module/execution/view/story.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/execution/view/story.html.php b/module/execution/view/story.html.php index 9ae5a12c90..b59248d8a8 100644 --- a/module/execution/view/story.html.php +++ b/module/execution/view/story.html.php @@ -206,7 +206,7 @@ execution->storyTitle);?> story->category);?> openedByAB);?> - assignedToAB);?> + assignedToAB);?> story->estimateAB);?> statusAB);?> story->stageAB);?> From 816999dbeb5c042de4da610b0241d1ca5f0a1f8f Mon Sep 17 00:00:00 2001 From: liumengyi Date: Tue, 24 May 2022 14:41:42 +0800 Subject: [PATCH 04/29] * Finish task #55254. --- module/common/model.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/module/common/model.php b/module/common/model.php index ab36bf5882..e84337e98d 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -918,6 +918,9 @@ class commonModel extends model public static function getMainNavList($moduleName) { global $lang; + global $app; + + $app->loadLang('my'); $menuOrder = $lang->mainNav->menuOrder; ksort($menuOrder); @@ -963,6 +966,22 @@ class commonModel extends model } } + /* Check whether other preference item under the module have permissions. If yes, point to other methods. */ + $moduleLinkList = $currentModule . 'LinkList'; + if(!$display and isset($lang->my->$moduleLinkList)) + { + foreach($lang->my->$moduleLinkList as $key => $linkList) + { + $method = explode('-', $key)[1]; + if(common::hasPriv($currentModule, $method)) + { + $display = true; + $currentMethod = $method; + break; + } + } + } + /* Check whether other methods under the module have permissions. If yes, point to other methods. */ if($display == false and isset($lang->$currentModule->menu)) { From 55909735335aefc00cb0a9f8beaf2ebe364d5649 Mon Sep 17 00:00:00 2001 From: sunjun Date: Tue, 24 May 2022 07:03:03 +0000 Subject: [PATCH 05/29] sprint_sunjun_29766 --- module/common/lang/en.php | 1 + module/common/lang/zh-cn.php | 1 + module/kanban/config.php | 21 ++++++++++---------- module/kanban/control.php | 30 ++++++++++++++++++++++++++++ module/kanban/lang/en.php | 1 + module/kanban/lang/zh-cn.php | 1 + module/kanban/model.php | 33 +++++++++++++++++++++++++++++++ module/kanban/view/space.html.php | 6 +++++- 8 files changed, 83 insertions(+), 11 deletions(-) diff --git a/module/common/lang/en.php b/module/common/lang/en.php index d6066eca60..260bead20e 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -56,6 +56,7 @@ $lang->create = 'Create'; $lang->edit = 'Edit'; $lang->delete = 'Delete'; $lang->close = 'Close'; +$lang->activate = 'Activate'; $lang->unlink = 'Unlink'; $lang->import = 'Import'; $lang->export = 'Export'; diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index 07ffa94699..dd76ffdbed 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -55,6 +55,7 @@ $lang->refresh = '刷新'; $lang->create = '新建'; $lang->edit = '编辑'; $lang->delete = '删除'; +$lang->activate = '激活'; $lang->close = '关闭'; $lang->unlink = '移除'; $lang->import = '导入'; diff --git a/module/kanban/config.php b/module/kanban/config.php index 70f04a7a32..537b026411 100644 --- a/module/kanban/config.php +++ b/module/kanban/config.php @@ -34,16 +34,17 @@ $config->kanban->editregion->requiredFields = 'name'; $config->kanban->splitcolumn->requiredFields = 'name,limit'; $config->kanban->editor = new stdclass(); -$config->kanban->editor->create = array('id' => 'desc', 'tools' => 'simpleTools'); -$config->kanban->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools'); -$config->kanban->editor->createspace = array('id' => 'desc', 'tools' => 'simpleTools'); -$config->kanban->editor->editspace = array('id' => 'desc', 'tools' => 'simpleTools'); -$config->kanban->editor->closespace = array('id' => 'comment', 'tools' => 'simpleTools'); -$config->kanban->editor->createcard = array('id' => 'desc', 'tools' => 'simpleTools'); -$config->kanban->editor->close = array('id' => 'comment', 'tools' => 'simpleTools'); -$config->kanban->editor->editcard = array('id' => 'desc', 'tools' => 'simpleTools'); -$config->kanban->editor->viewcard = array('id' => 'comment', 'tools' => 'simpleTools'); -$config->kanban->editor->activatecard = array('id' => 'comment', 'tools' => 'simpleTools'); +$config->kanban->editor->create = array('id' => 'desc', 'tools' => 'simpleTools'); +$config->kanban->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools'); +$config->kanban->editor->createspace = array('id' => 'desc', 'tools' => 'simpleTools'); +$config->kanban->editor->editspace = array('id' => 'desc', 'tools' => 'simpleTools'); +$config->kanban->editor->closespace = array('id' => 'comment', 'tools' => 'simpleTools'); +$config->kanban->editor->activatespace = array('id' => 'comment', 'tools' => 'simpleTools'); +$config->kanban->editor->createcard = array('id' => 'desc', 'tools' => 'simpleTools'); +$config->kanban->editor->close = array('id' => 'comment', 'tools' => 'simpleTools'); +$config->kanban->editor->editcard = array('id' => 'desc', 'tools' => 'simpleTools'); +$config->kanban->editor->viewcard = array('id' => 'comment', 'tools' => 'simpleTools'); +$config->kanban->editor->activatecard = array('id' => 'comment', 'tools' => 'simpleTools'); $config->kanban->fromType = array('execution', 'productplan', 'release', 'build'); $config->kanban->executionField = array('name', 'status', 'end', 'PM', 'type', 'deleted'); diff --git a/module/kanban/control.php b/module/kanban/control.php index 6a73e1ebcd..06cc0db1fd 100644 --- a/module/kanban/control.php +++ b/module/kanban/control.php @@ -114,6 +114,36 @@ class kanban extends control $this->display(); } + /** + * Activate a space. + * + * @param int $spaceID + * @access public + * @return array + */ + public function activateSpace($spaceID) + { + $this->loadModel('action'); + + if(!empty($_POST)) + { + $changes = $this->kanban->activateSpace($spaceID); + + if(dao::isError()) return print(js::error(dao::getError())); + + $actionID = $this->action->create('kanbanSpace', $spaceID, 'activated', $this->post->comment); + $this->action->logHistory($actionID, $changes); + + return print(js::reload('parent.parent')); + } + + $this->view->space = $this->kanban->getById($spaceID); + $this->view->actions = $this->action->getList('kanbanSpace', $spaceID); + $this->view->users = $this->loadModel('user')->getPairs('noletter'); + + $this->display(); + } + /* * Close a space. * diff --git a/module/kanban/lang/en.php b/module/kanban/lang/en.php index 0da9f49c01..7570c0d7e8 100644 --- a/module/kanban/lang/en.php +++ b/module/kanban/lang/en.php @@ -4,6 +4,7 @@ $lang->kanban->create = 'Create Kanban'; $lang->kanban->createSpace = 'Create Space'; $lang->kanban->editSpace = 'Edit Space'; $lang->kanban->closeSpace = 'Close Space'; +$lang->kanban->activateSpace = 'Activate Space'; $lang->kanban->deleteSpace = 'Delete Space'; $lang->kanban->sortSpace = 'Sort Space'; $lang->kanban->edit = 'Edit Kanban'; diff --git a/module/kanban/lang/zh-cn.php b/module/kanban/lang/zh-cn.php index 154fd13465..c632e4aa8e 100644 --- a/module/kanban/lang/zh-cn.php +++ b/module/kanban/lang/zh-cn.php @@ -5,6 +5,7 @@ $lang->kanban->createSpace = '创建空间'; $lang->kanban->editSpace = '设置空间'; $lang->kanban->closeSpace = '关闭空间'; $lang->kanban->deleteSpace = '删除空间'; +$lang->kanban->activateSpace = '激活空间'; $lang->kanban->sortSpace = '空间排序'; $lang->kanban->edit = '设置看板'; $lang->kanban->view = '查看看板'; diff --git a/module/kanban/model.php b/module/kanban/model.php index e3514ba0de..ccefbe3312 100644 --- a/module/kanban/model.php +++ b/module/kanban/model.php @@ -1847,6 +1847,39 @@ class kanbanModel extends model ->setDefault('closedDate', $now) ->setDefault('lastEditedBy', $account) ->setDefault('lastEditedDate', $now) + ->setDefault('activatedBy', '') + ->setDefault('activatedDate', '0000-00-00 00:00:00') + ->remove('comment') + ->get(); + + $this->dao->update(TABLE_KANBANSPACE)->data($space) + ->autoCheck() + ->where('id')->eq($spaceID) + ->exec(); + + if(!dao::isError()) return common::createChanges($oldSpace, $space); + } + + /** + * Activate a space. + * + * @param int $spaceID + * @access public + * @return array + */ + function activateSpace($spaceID) + { + $spaceID = (int)$spaceID; + $oldSpace = $this->getSpaceById($spaceID); + $now = helper::now(); + $space = fixer::input('post') + ->setDefault('status', 'active') + ->setDefault('activatedBy', $this->app->user->account) + ->setDefault('activatedDate', $now) + ->setDefault('lastEditedBy', $this->app->user->account) + ->setDefault('lastEDitedDate', $now) + ->setDefault('closedBy', '') + ->setDefault('closedDate', '0000-00-00 00:00:00') ->remove('comment') ->get(); diff --git a/module/kanban/view/space.html.php b/module/kanban/view/space.html.php index 0d21beed09..df272d38ac 100644 --- a/module/kanban/view/space.html.php +++ b/module/kanban/view/space.html.php @@ -52,7 +52,11 @@ status == 'closed' ? 'disabled' : '';?> status != 'closed' and $browseType != 'involved' and !empty($unclosedSpace)) common::printLink('kanban', 'create', "spaceID={$space->id}&type={$space->type}", ' ' . $lang->kanban->create, '', "class='iframe' data-width='75%'", '', true);?> id}", ' ' . $lang->kanban->setting, '', "class='iframe' data-width='75%'", '', true);?> - id}", ' ' . $lang->close, '', "class='iframe {$class}'", '', true);?> + + id}", ' ' . $lang->activate, '', "class='iframe'", '', true);?> + + id}", ' ' . $lang->close, '', "class='iframe'", '', true);?> + id}", ' ' . $lang->delete, 'hiddenwin', '', '', true);?> From 45a511df33b7b3e475c3eb728c4e6b73be42d9d1 Mon Sep 17 00:00:00 2001 From: sunjun Date: Tue, 24 May 2022 07:16:14 +0000 Subject: [PATCH 06/29] sprint_sunjun_29766 --- module/kanban/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/kanban/control.php b/module/kanban/control.php index 06cc0db1fd..80dcaec881 100644 --- a/module/kanban/control.php +++ b/module/kanban/control.php @@ -137,7 +137,7 @@ class kanban extends control return print(js::reload('parent.parent')); } - $this->view->space = $this->kanban->getById($spaceID); + $this->view->space = $this->kanban->getSpaceById($spaceID); $this->view->actions = $this->action->getList('kanbanSpace', $spaceID); $this->view->users = $this->loadModel('user')->getPairs('noletter'); From 37125b72bcf86187b1183485a4163747a8507633 Mon Sep 17 00:00:00 2001 From: mayue Date: Tue, 24 May 2022 07:34:38 +0000 Subject: [PATCH 07/29] * Finish task #55175. --- module/execution/model.php | 27 ++++++++++++++++++++++++++- module/execution/view/all.html.php | 20 +++++++++++++++----- module/programplan/lang/en.php | 2 ++ module/programplan/lang/zh-cn.php | 2 ++ 4 files changed, 45 insertions(+), 6 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index 108f02118b..a4dfb60ce4 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -961,6 +961,15 @@ class executionModel extends model } } + if($oldExecution->type == 'stage') + { + $parent = $this->getByID($oldExecution->parent); + if($parent->type == 'stage' and $parent->status == 'closed') + { + $this->dao->update(TABLE_EXECUTION)->set('status')->eq('doing')->where('id')->eq($parent->id)->exec(); + } + } + if(!dao::isError()) return common::createChanges($oldExecution, $execution); } @@ -1002,6 +1011,22 @@ class executionModel extends model if(!dao::isError()) { + if($oldExecution->type == 'stage') + { + $parent = $this->getByID($oldExecution->parent); + if($parent->type == 'stage') + { + $isClosed = true; + $children = $this->getChildExecutions($oldExecution->parent); + foreach($children as $childID => $childExecution) + { + if($childExecution->status != 'closed') $isClosed = false; + } + + if($isClosed) $this->dao->update(TABLE_EXECUTION)->set('status')->eq('closed')->where('id')->eq($parent->id)->exec(); + } + } + $this->loadModel('score')->create('execution', 'close', $oldExecution); return common::createChanges($oldExecution, $execution); } @@ -1575,7 +1600,7 @@ class executionModel extends model */ public function getChildExecutions($executionID) { - return $this->dao->select('id, name')->from(TABLE_EXECUTION)->where('parent')->eq((int)$executionID)->fetchPairs(); + return $this->dao->select('id, name, status')->from(TABLE_EXECUTION)->where('deleted')->eq(0)->andWhere('parent')->eq((int)$executionID)->fetchAll('id'); } /** diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php index 102388d861..be78c5374c 100644 --- a/module/execution/view/all.html.php +++ b/module/execution/view/all.html.php @@ -185,12 +185,17 @@ echo common::hasPriv('programplan', 'create') ? html::a('javascript:alert("' . $this->lang->programplan->error->createdTask . '");', '', '', 'class="btn ' . $disabled . '"') : ''; } - common::printIcon('programplan', 'edit', "planID=$execution->id&projectID=$projectID", $execution, 'list', '', '', 'iframe', true); + common::printIcon('programplan', 'edit', "stageID=$execution->id&projectID=$projectID", $execution, 'list', '', '', 'iframe', true); $disabled = !empty($execution->children) ? ' disabled' : ''; + if(common::hasPriv('execution', 'close', $execution)) + { + if($execution->status != 'closed') common::printIcon('execution', 'close', "stageID=$execution->id", $execution, 'list', 'off', 'hiddenwin' , $disabled . ' iframe', true, '', $this->lang->programplan->close); + if($execution->status == 'closed') common::printIcon('execution', 'activate', "stageID=$execution->id", $execution, 'list', 'magic', 'hiddenwin' , $disabled . ' iframe', true, '', $this->lang->programplan->activate); + } if(common::hasPriv('execution', 'delete', $execution)) { - common::printIcon('execution', 'delete', "planID=$execution->id&confirm=no", $execution, 'list', 'trash', 'hiddenwin' , $disabled, '', '', $this->lang->programplan->delete); + common::printIcon('execution', 'delete', "stageID=$execution->id&confirm=no", $execution, 'list', 'trash', 'hiddenwin' , $disabled, '', '', $this->lang->programplan->delete); } ?> @@ -257,7 +262,7 @@ if($child->grade == 1 && $this->loadModel('programplan')->isCreateTask($child->id)) { - common::printIcon('programplan', 'create', "program={$child->parent}&productID=$productID&planID=$child->id", $child, 'list', 'split', '', '', '', '', $this->lang->programplan->createSubPlan); + common::printIcon('programplan', 'create', "program={$child->parent}&productID=$productID&stageID=$child->id", $child, 'list', 'split', '', '', '', '', $this->lang->programplan->createSubPlan); } else { @@ -265,12 +270,17 @@ echo html::a('javascript:alert("' . $this->lang->programplan->error->createdTask . '");', '', '', 'class="btn ' . $disabled . '"'); } - common::printIcon('programplan', 'edit', "planID=$child->id&projectID=$projectID", $child, 'list', '', '', 'iframe', true); + common::printIcon('programplan', 'edit', "stageID=$child->id&projectID=$projectID", $child, 'list', '', '', 'iframe', true); $disabled = !empty($child->children) ? ' disabled' : ''; + if(common::hasPriv('execution', 'close', $child)) + { + if($execution->status != 'closed') common::printIcon('execution', 'close', "stageID=$child->id", $child, 'list', 'off', '' , $disabled . ' iframe', true, '', $this->lang->programplan->close); + if($execution->status == 'closed') common::printIcon('execution', 'activate', "stageID=$child->id", $child, 'list', 'magic', 'hiddenwin' , $disabled . ' iframe', true, '', $this->lang->programplan->activate); + } if(common::hasPriv('execution', 'delete', $child)) { - common::printIcon('execution', 'delete', "planID=$child->id&confirm=no", $child, 'list', 'trash', 'hiddenwin' , $disabled, '', '', $this->lang->programplan->delete); + common::printIcon('execution', 'delete', "stageID=$child->id&confirm=no", $child, 'list', 'trash', 'hiddenwin' , $disabled, '', '', $this->lang->programplan->delete); } ?> diff --git a/module/programplan/lang/en.php b/module/programplan/lang/en.php index a3c80fa711..b9ead0dd32 100644 --- a/module/programplan/lang/en.php +++ b/module/programplan/lang/en.php @@ -16,6 +16,8 @@ $lang->programplan->list = 'Stage List'; $lang->programplan->create = 'Create'; $lang->programplan->edit = 'Edit'; $lang->programplan->delete = 'Delete Stage'; +$lang->programplan->close = 'Close Stage'; +$lang->programplan->activate = 'Activate Stage'; $lang->programplan->createSubPlan = 'Create Sub Stage'; $lang->programplan->parent = 'Parent Stage'; diff --git a/module/programplan/lang/zh-cn.php b/module/programplan/lang/zh-cn.php index 494b212d51..2f5390d35e 100644 --- a/module/programplan/lang/zh-cn.php +++ b/module/programplan/lang/zh-cn.php @@ -16,6 +16,8 @@ $lang->programplan->list = '阶段列表'; $lang->programplan->create = '设置阶段'; $lang->programplan->edit = '编辑'; $lang->programplan->delete = '删除阶段'; +$lang->programplan->close = '关闭阶段'; +$lang->programplan->activate = '激活阶段'; $lang->programplan->createSubPlan = '创建二级阶段'; $lang->programplan->parent = '父阶段'; From 838a8ccb951e0c28a9ed3eae98112d4d9b50b4d7 Mon Sep 17 00:00:00 2001 From: sunjun Date: Tue, 24 May 2022 07:36:58 +0000 Subject: [PATCH 08/29] fixbug_sunjun_22556 --- module/execution/css/story.css | 1 - module/execution/view/story.html.php | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/module/execution/css/story.css b/module/execution/css/story.css index 3040902372..423452b61f 100644 --- a/module/execution/css/story.css +++ b/module/execution/css/story.css @@ -14,4 +14,3 @@ th.c-pri{width:50px;} .closed-story {color: #e5e5e5;} .stageBox {height: 180px; overflow: scroll; background: #ffffff;} #executionStoryForm tbody tr td .label {max-width: 100px; text-overflow: unset;} -#assignedTo {width: 90px;} diff --git a/module/execution/view/story.html.php b/module/execution/view/story.html.php index b59248d8a8..8b0076fc49 100644 --- a/module/execution/view/story.html.php +++ b/module/execution/view/story.html.php @@ -206,7 +206,7 @@ execution->storyTitle);?> story->category);?> openedByAB);?> - assignedToAB);?> + assignedToAB);?> story->estimateAB);?> statusAB);?> story->stageAB);?> @@ -243,7 +243,7 @@ story->categoryList, $story->category);?> openedBy);?> - ' title='assignedTo);?>'>loadModel('story')->printAssignedHtml($story,$users);?> + text-center' title='assignedTo);?>'>loadModel('story')->printAssignedHtml($story,$users);?> estimate . $config->hourUnit;?> processStatus('story', $story);?> From 07906fb1f84bf8818d986474c9b76f96758407aa Mon Sep 17 00:00:00 2001 From: mayue Date: Tue, 24 May 2022 07:38:39 +0000 Subject: [PATCH 09/29] * Add code comments. --- module/execution/model.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/execution/model.php b/module/execution/model.php index a4dfb60ce4..4a6a20b6a9 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -961,6 +961,7 @@ class executionModel extends model } } + /* Update the status of the parent stage. */ if($oldExecution->type == 'stage') { $parent = $this->getByID($oldExecution->parent); @@ -1011,6 +1012,7 @@ class executionModel extends model if(!dao::isError()) { + /* Update the status of the parent stage. */ if($oldExecution->type == 'stage') { $parent = $this->getByID($oldExecution->parent); From 9ab9111b7c0946965aad3c8c080e9e6c499c4056 Mon Sep 17 00:00:00 2001 From: sunjun Date: Tue, 24 May 2022 07:50:05 +0000 Subject: [PATCH 10/29] sprint_sunjun_22556 --- www/theme/default/style.css | 1 + 1 file changed, 1 insertion(+) diff --git a/www/theme/default/style.css b/www/theme/default/style.css index e0fbf59763..d5a77c6729 100644 --- a/www/theme/default/style.css +++ b/www/theme/default/style.css @@ -70,6 +70,7 @@ a.showMoreImage:hover {opacity: 1;} .c-ip {width: 200px;} .c-object {width: 250px;} .c-case-step {width: 300px;} +.c-actions-8 {width: 240px;} #userNav>li.open>a:before, #userNav>li>a:hover:before {position: absolute; bottom: 0px; left: calc(50% - 10px); width: 0; height: 0; content: ' '; border-color: transparent transparent #fff transparent; border-style: solid; border-width: 0 10px 10px 10px;} #userNav .dropdown-menu {z-index: 2000;} #userNav .dropdown-menu:hover + .dropdown-toggle:before {position: absolute; bottom: 0px; left: calc(50% - 10px); width: 0; height: 0; content: ' '; border-color: transparent transparent #fff transparent; border-style: solid; border-width: 0 10px 10px 10px;} From 5e314ba343670f67fd49a0a19bb47dc01fec3045 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Tue, 24 May 2022 15:50:52 +0800 Subject: [PATCH 11/29] * Finish task#54984. --- module/group/lang/en.php | 2 +- module/group/lang/zh-cn.php | 2 +- module/group/view/browse.html.php | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/module/group/lang/en.php b/module/group/lang/en.php index 6a464c375c..f0dbde9d8e 100644 --- a/module/group/lang/en.php +++ b/module/group/lang/en.php @@ -22,7 +22,7 @@ $lang->group->managePrivByModule = 'Manage Privileges by Module'; $lang->group->byModuleTips = '(Press Shift/Ctrl to Multi-select)'; $lang->group->manageMember = 'Manage Members'; $lang->group->manageProjectAdmin = 'Manage Program Admins'; -$lang->group->confirmDelete = 'Do you want to delete this user group?'; +$lang->group->confirmDelete = "Do you want to delete '%s'?"; $lang->group->successSaved = 'Saved.'; $lang->group->errorNotSaved = 'Failed. Please select actions and groups.'; $lang->group->viewList = 'Access Sight'; diff --git a/module/group/lang/zh-cn.php b/module/group/lang/zh-cn.php index d656f4716f..91900afb13 100644 --- a/module/group/lang/zh-cn.php +++ b/module/group/lang/zh-cn.php @@ -22,7 +22,7 @@ $lang->group->managePrivByModule = '按模块分配权限'; $lang->group->byModuleTips = '(可以按住Shift或者Ctrl键进行多选)'; $lang->group->manageMember = '成员维护'; $lang->group->manageProjectAdmin = '维护项目管理员'; -$lang->group->confirmDelete = '您确定删除该用户分组吗?'; +$lang->group->confirmDelete = '您确定删除“%s”用户分组吗?'; $lang->group->successSaved = '成功保存'; $lang->group->errorNotSaved = '没有保存,请确认选择了权限数据。'; $lang->group->viewList = '可访问视图'; diff --git a/module/group/view/browse.html.php b/module/group/view/browse.html.php index 6fc067639f..0464eb7493 100644 --- a/module/group/view/browse.html.php +++ b/module/group/view/browse.html.php @@ -65,7 +65,8 @@ else { $deleteURL = $this->createLink('group', 'delete', "groupID=$group->id&confirm=yes"); - echo html::a("javascript:ajaxDelete(\"$deleteURL\", \"groupList\", confirmDelete)", '', '', "title='{$lang->group->delete}' class='btn'"); + js::set("confirmDelete{$group->id}", sprintf($lang->group->confirmDelete, $group->name)); + echo html::a("javascript:ajaxDelete(\"$deleteURL\", \"groupList\", confirmDelete{$group->id})", '', '', "title='{$lang->group->delete}' class='btn'"); } } ?> From 79f28c9cb2684053857e4462e85e231a7979245a Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Tue, 24 May 2022 16:02:05 +0800 Subject: [PATCH 12/29] * Finish task #54985. --- module/doc/control.php | 19 ++++++++----------- module/doc/view/tablecontents.html.php | 2 +- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/module/doc/control.php b/module/doc/control.php index b02d22c3af..47642c5548 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -250,17 +250,18 @@ class doc extends control * * @param int $libID * @param string $confirm yes|no - * @param string $from lib|book + * @param string $type lib|book + * @param string $from tableContents|objectLibs * @access public * @return void */ - public function deleteLib($libID, $confirm = 'no', $from = 'lib') + public function deleteLib($libID, $confirm = 'no', $type = 'lib', $from = 'objectLibs') { if($libID == 'product' or $libID == 'execution') return; if($confirm == 'no') { - $deleteTip = $from == 'book' ? $this->lang->doc->confirmDeleteBook : $this->lang->doc->confirmDeleteLib; - return print(js::confirm($deleteTip, $this->createLink('doc', 'deleteLib', "libID=$libID&confirm=yes"))); + $deleteTip = $type == 'book' ? $this->lang->doc->confirmDeleteBook : $this->lang->doc->confirmDeleteLib; + return print(js::confirm($deleteTip, $this->createLink('doc', 'deleteLib', "libID=$libID&confirm=yes&type=$lib&from=$from"))); } else { @@ -274,13 +275,9 @@ class doc extends control return print(js::locate($this->createLink('doc', 'objectLibs', 'type=book'), 'parent.parent')); } - $browseLink = $this->createLink('doc', 'index'); - if(in_array($this->app->tab, array('product', 'project', 'execution'))) - { - $objectType = $lib->type; - $objectID = $lib->{$objectType}; - $browseLink = $this->createLink('doc', 'objectLibs', "type=$objectType&objectID=$objectID"); - } + $objectType = $lib->type; + $objectID = strpos(',product,project,execution,', ",$objectType,") !== false ? $lib->{$objectType} : 0; + $browseLink = $this->createLink('doc', $from, "type=$objectType&objectID=$objectID"); return print(js::locate($browseLink, 'parent')); } diff --git a/module/doc/view/tablecontents.html.php b/module/doc/view/tablecontents.html.php index 3306993b9f..a153373de7 100644 --- a/module/doc/view/tablecontents.html.php +++ b/module/doc/view/tablecontents.html.php @@ -48,7 +48,7 @@ if(empty($type)) $type = 'product'; echo "
  • "; } if($canEditLib) echo '
  • ' . html::a($this->createLink('doc', 'editLib', "rootID=$libID"), ' ' . $lang->doc->editLib, '', "class='iframe'") . '
  • '; - if($canDeleteLib) echo '
  • ' . html::a($this->createLink('doc', 'deleteLib', "rootID=$libID"), ' ' . $lang->doc->deleteLib, 'hiddenwin') . '
  • '; + if($canDeleteLib) echo '
  • ' . html::a($this->createLink('doc', 'deleteLib', "rootID=$libID&confirm=no&type=lib&from=tableContents"), ' ' . $lang->doc->deleteLib, 'hiddenwin') . '
  • '; echo ''; } From 39a163e0a8a4a0a7a95db25b16ffdcc699a13a3b Mon Sep 17 00:00:00 2001 From: liumengyi Date: Tue, 24 May 2022 16:04:10 +0800 Subject: [PATCH 13/29] * Fix bug for task #55254. --- module/common/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/common/model.php b/module/common/model.php index e84337e98d..27e2443cc6 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -983,7 +983,7 @@ class commonModel extends model } /* Check whether other methods under the module have permissions. If yes, point to other methods. */ - if($display == false and isset($lang->$currentModule->menu)) + if($display == false and isset($lang->$currentModule->menu) and !in_array($currentModule, array('program', 'product', 'project', 'execution'))) { foreach($lang->$currentModule->menu as $menu) { From 21402a6f66cb629da07691e1d8fba2b8df0dd82e Mon Sep 17 00:00:00 2001 From: mayue Date: Tue, 24 May 2022 08:12:28 +0000 Subject: [PATCH 14/29] * Finish task #55171. --- module/productplan/model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/productplan/model.php b/module/productplan/model.php index fbc8b7795c..0f443f65fc 100644 --- a/module/productplan/model.php +++ b/module/productplan/model.php @@ -99,6 +99,7 @@ class productplanModel extends model $planProjects = $this->dao->select('t1.*,t2.type')->from(TABLE_PROJECTPRODUCT)->alias('t1') ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project=t2.id') ->where('t1.product')->eq($product) + ->andWhere('t2.deleted')->eq(0) ->andWhere('t1.plan')->in(array_keys($plans)) ->andWhere('t2.type')->in('sprint,stage,kanban') ->fetchPairs('plan', 'project'); From 7d4781fdd2ad73371d62b4d517641d0a2368f5a8 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 24 May 2022 16:13:37 +0800 Subject: [PATCH 15/29] * Fixed edit Execution Kanban save error. --- module/execution/model.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index 108f02118b..3df5779489 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -369,12 +369,12 @@ class executionModel extends model $this->lang->project->code = $this->lang->execution->execCode; } - $sprintProject = isset($sprint->project) ? $sprint->project : ''; + $sprintProject = isset($sprint->project) ? $sprint->project : '0'; $this->dao->insert(TABLE_EXECUTION)->data($sprint) ->autoCheck($skipFields = 'begin,end') ->batchcheck($this->config->execution->create->requiredFields, 'notempty') ->checkIF((!empty($sprint->name) and $this->config->systemMode == 'new'), 'name', 'unique', "`type` in ('sprint','stage', 'kanban') and `project` = $sprintProject") - ->checkIF(!empty($sprint->code), 'code', 'unique', "`type` in ('sprint','stage')") + ->checkIF(!empty($sprint->code), 'code', 'unique', "`type` in ('sprint','stage', 'kanban')") ->checkIF($sprint->begin != '', 'begin', 'date') ->checkIF($sprint->end != '', 'end', 'date') ->checkIF($sprint->end != '', 'end', 'ge', $sprint->begin) @@ -511,18 +511,17 @@ class executionModel extends model } /* Update data. */ - $executionProject = isset($execution->project) ? $execution->project : ''; + $executionProject = isset($execution->project) ? $execution->project : '0'; $this->dao->update(TABLE_EXECUTION)->data($execution) ->autoCheck($skipFields = 'begin,end') ->batchcheck($this->config->execution->edit->requiredFields, 'notempty') ->checkIF($execution->begin != '', 'begin', 'date') ->checkIF($execution->end != '', 'end', 'date') ->checkIF($execution->end != '', 'end', 'ge', $execution->begin) - ->checkIF((!empty($execution->name) and $this->config->systemMode == 'new'), 'name', 'unique', "id != $executionID and type in ('sprint','stage') and `project` = $executionProject") - ->checkIF(!empty($execution->code), 'code', 'unique', "id != $executionID and type in ('sprint','stage')") + ->checkIF((!empty($execution->name) and $this->config->systemMode == 'new'), 'name', 'unique', "id != $executionID and type in ('sprint','stage', 'kanban') and `project` = $executionProject") + ->checkIF(!empty($execution->code), 'code', 'unique', "id != $executionID and type in ('sprint','stage', 'kanban')") ->checkFlow() ->where('id')->eq($executionID) - ->checkFlow() ->limit(1) ->exec(); From 2561c857b7376dd136617400eecc5c9cec1f7116 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Tue, 24 May 2022 16:14:00 +0800 Subject: [PATCH 16/29] * Fix bug #22800. --- module/productplan/lang/en.php | 5 ---- module/productplan/lang/zh-cn.php | 5 ---- module/productplan/view/browsebylist.html.php | 24 ++++++++++--------- 3 files changed, 13 insertions(+), 21 deletions(-) diff --git a/module/productplan/lang/en.php b/module/productplan/lang/en.php index 74b1c53c8b..d2ec557010 100644 --- a/module/productplan/lang/en.php +++ b/module/productplan/lang/en.php @@ -142,11 +142,6 @@ $lang->productplan->featureBar['browse']['doing'] = 'Doing'; $lang->productplan->featureBar['browse']['done'] = 'Done'; $lang->productplan->featureBar['browse']['closed'] = 'Closed'; -$lang->productplan->statusList['wait'] = 'Wait'; -$lang->productplan->statusList['doing'] = 'Doing'; -$lang->productplan->statusList['done'] = 'Done'; -$lang->productplan->statusList['closed'] = 'Closed'; - $lang->productplan->orderList['begin_desc'] = 'Begin Descend'; $lang->productplan->orderList['begin_asc'] = 'Begin Ascend'; $lang->productplan->orderList['title_desc'] = 'Title Descend'; diff --git a/module/productplan/lang/zh-cn.php b/module/productplan/lang/zh-cn.php index dae76ae9a8..13835ce068 100644 --- a/module/productplan/lang/zh-cn.php +++ b/module/productplan/lang/zh-cn.php @@ -142,11 +142,6 @@ $lang->productplan->featureBar['browse']['doing'] = '进行中'; $lang->productplan->featureBar['browse']['done'] = '已完成'; $lang->productplan->featureBar['browse']['closed'] = '已关闭'; -$lang->productplan->statusList['wait'] = '未开始'; -$lang->productplan->statusList['doing'] = '进行中'; -$lang->productplan->statusList['done'] = '已完成'; -$lang->productplan->statusList['closed'] = '已关闭'; - $lang->productplan->orderList['begin_desc'] = '计划开始时间倒序'; $lang->productplan->orderList['begin_asc'] = '计划开始时间正序'; $lang->productplan->orderList['title_desc'] = '计划名称倒序'; diff --git a/module/productplan/view/browsebylist.html.php b/module/productplan/view/browsebylist.html.php index b4bbe598f4..327d246c49 100644 --- a/module/productplan/view/browsebylist.html.php +++ b/module/productplan/view/browsebylist.html.php @@ -157,18 +157,20 @@ edit, "data-form-action='$actionLink'");?> - -