From f5056eb8027de786c6fcc5335dcc7693987d0d60 Mon Sep 17 00:00:00 2001 From: liuhong Date: Tue, 21 Feb 2023 09:50:19 +0000 Subject: [PATCH 01/23] * Adjust code for feedback #2274. --- module/build/model.php | 10 ++++++---- module/company/control.php | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/module/build/model.php b/module/build/model.php index 7422b98a30..13e6563603 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -478,11 +478,13 @@ class buildModel extends model */ public function update($buildID) { - $buildID = (int)$buildID; - $oldBuild = $this->dao->select('*')->from(TABLE_BUILD)->where('id')->eq($buildID)->fetch(); - $build = fixer::input('post')->stripTags($this->config->build->editor->edit['id'], $this->config->allowedTags) + $buildID = (int)$buildID; + $oldBuild = $this->dao->select('*')->from(TABLE_BUILD)->where('id')->eq($buildID)->fetch(); + $newProduct = $this->dao->select('id,type')->from(TABLE_PRODUCT)->where('id')->eq($_POST['product'])->fetchPairs(); + $branch = (!isset($_POST['branch']) or $newProduct == 'normal') ? 0 : $oldBuild->branch; + $build = fixer::input('post')->stripTags($this->config->build->editor->edit['id'], $this->config->allowedTags) ->add('id', $buildID) - ->setIF(!isset($_POST['branch']), 'branch', $oldBuild->branch) + ->setDefault('branch', $branch) ->setDefault('product', $oldBuild->product) ->setDefault('builds', '') ->cleanInt('product,execution') diff --git a/module/company/control.php b/module/company/control.php index b978bff34f..16500a0984 100755 --- a/module/company/control.php +++ b/module/company/control.php @@ -226,7 +226,7 @@ class company extends control $executionList = $this->execution->getByIdList(array_keys($executions)); foreach($executionList as $executionID => $execution) { - if(isset($projects[$execution->project])) $executions[$execution->id] = $projects[$execution->project] . $executions[$execution->id]; + if(isset($projects[$execution->project])) $executions[$execution->id] = $projects[$execution->project] . $executions[$execution->id]; } $executions = array($this->lang->execution->common) + $executions; From fe93b22b6839e8ee712e5ab57440139c8b12b9d8 Mon Sep 17 00:00:00 2001 From: Yagami Date: Wed, 22 Feb 2023 11:22:29 +0800 Subject: [PATCH 02/23] * Code for program browse icon. --- module/program/css/browse.css | 2 +- module/program/view/browsebylist.html.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) mode change 100644 => 100755 module/program/css/browse.css mode change 100644 => 100755 module/program/view/browsebylist.html.php diff --git a/module/program/css/browse.css b/module/program/css/browse.css old mode 100644 new mode 100755 index fae35ad361..d3e93a49dc --- a/module/program/css/browse.css +++ b/module/program/css/browse.css @@ -20,4 +20,4 @@ div.checkbox-primary + span.table-nest-icon {margin-left: 0px !important;} #checkAll + label.hover:after {border-width: 0px;} .c-budget {width:100px; text-align: right; padding-right:16px !important;} .c-status {width: 65px !important;} -.icon-scrum.table-nest-toggle:after, .icon-waterfall.table-nest-toggle:after, .icon-kanban.table-nest-toggle:after {content: ''; border: 0;} +.icon-scrum.table-nest-toggle:after, .icon-waterfall.table-nest-toggle:after, .icon-kanban.table-nest-toggle:after, .icon-waterfallplus.table-nest-toggle:after, .icon-aglieplus.table-nest-toggle:after {content: ''; border: 0;} diff --git a/module/program/view/browsebylist.html.php b/module/program/view/browsebylist.html.php old mode 100644 new mode 100755 index f0dac233f4..46a69e5651 --- a/module/program/view/browsebylist.html.php +++ b/module/program/view/browsebylist.html.php @@ -122,6 +122,8 @@ th.table-nest-title > .table-nest-toggle-global:before {width: 100%; left: 0 !im #programTableList .icon-scrum:before {content: '\e9a2';} #programTableList .icon-waterfall:before {content: '\e9a4';} #programTableList .icon-kanban:before {content: '\e983';} +#programTableList .icon-waterfallplus:before {content: '\e9ed';} +#programTableList .icon-agileplus:before {content: '\e9ee';} #programTableList > tr[data-type="program"] > .c-name > a {color: #0b0f18;} #programTableList > tr[data-nest-parent] {background: #f8f8f8;} From e9ef9029b6b7c203fa79f985507f4d5f1b4463e6 Mon Sep 17 00:00:00 2001 From: zhujinyong Date: Wed, 22 Feb 2023 11:39:36 +0800 Subject: [PATCH 03/23] * Code for task #84594. --- module/custom/model.php | 3 +++ module/execution/control.php | 5 +++++ module/execution/view/grouptask.html.php | 11 +++++++---- module/execution/view/taskkanban.html.php | 17 +++++++++++------ 4 files changed, 26 insertions(+), 10 deletions(-) diff --git a/module/custom/model.php b/module/custom/model.php index edcadec2f5..84e64c72c6 100644 --- a/module/custom/model.php +++ b/module/custom/model.php @@ -204,6 +204,9 @@ class customModel extends model ksort($menuOrder); foreach($menuOrder as $name) { + /* If menu is removed, delete the menuOrder. */ + if(!isset($allMenu->$name)) continue; + $item = new stdclass(); $item->name = $name; $item->hidden = false; diff --git a/module/execution/control.php b/module/execution/control.php index b97958c31b..de1faad15c 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2732,12 +2732,17 @@ class execution extends control 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)) { $this->kanban->createExecutionLane($executionID, $browseType); $kanbanGroup = $this->kanban->getExecutionKanban($executionID, $browseType, $groupBy, '', $orderBy); } + /* Show lanes of the attribute: no story&bug in request, no bug in design. */ + if(!isset($this->lang->execution->menu->story)) unset($kanbanGroup['story']); + if(!isset($this->lang->execution->menu->qa)) unset($kanbanGroup['bug']); + /* Determines whether an object is editable. */ $canBeChanged = common::canModify('execution', $execution); diff --git a/module/execution/view/grouptask.html.php b/module/execution/view/grouptask.html.php index 4dccd0971f..5633b05d66 100644 --- a/module/execution/view/grouptask.html.php +++ b/module/execution/view/grouptask.html.php @@ -63,10 +63,13 @@ $link = common::hasPriv('execution', 'importTask') ? $this->createLink('execution', 'importTask', "execution=$execution->id") : '#'; echo "
  • " . html::a($link, $lang->execution->importTask, '', $misc) . "
  • "; - $class = common::hasPriv('execution', 'importBug') ? '' : "class=disabled"; - $misc = common::hasPriv('execution', 'importBug') ? "class='import'" : "class=disabled"; - $link = common::hasPriv('execution', 'importBug') ? $this->createLink('execution', 'importBug', "execution=$execution->id") : '#'; - echo "
  • " . html::a($link, $lang->execution->importBug, '', $misc) . "
  • "; + if(isset($this->lang->execution->menu->qa)) + { + $class = common::hasPriv('execution', 'importBug') ? '' : "class=disabled"; + $misc = common::hasPriv('execution', 'importBug') ? "class='import'" : "class=disabled"; + $link = common::hasPriv('execution', 'importBug') ? $this->createLink('execution', 'importBug', "execution=$execution->id") : '#'; + echo "
  • " . html::a($link, $lang->execution->importBug, '', $misc) . "
  • "; + } ?> diff --git a/module/execution/view/taskkanban.html.php b/module/execution/view/taskkanban.html.php index b1446f0498..2c87281cd1 100644 --- a/module/execution/view/taskkanban.html.php +++ b/module/execution/view/taskkanban.html.php @@ -17,7 +17,7 @@