@@ -60,8 +64,7 @@ user->password2;?> - user->getVisionList();?> - > + > user->visions;?> config->vision]) ? $this->config->vision : key($visionList), "class='form-control'");?> @@ -106,6 +109,7 @@ + config->vision);?> From 39a58efedf4d6bd1e6a68f58f0c06a3836c6abb4 Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Tue, 22 Mar 2022 10:53:22 +0800 Subject: [PATCH 23/79] * Fix bug #15763. --- module/execution/css/story.css | 2 +- module/execution/view/story.html.php | 33 +++++++++++----------------- 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/module/execution/css/story.css b/module/execution/css/story.css index 42a3c1410d..dbf6c85239 100644 --- a/module/execution/css/story.css +++ b/module/execution/css/story.css @@ -12,4 +12,4 @@ th.c-pri{width:50px;} .c-category {width: 80px;} .c-actions-7 {width: 190px;} .closed-story {color: #e5e5e5;} -.stageBox {height: 180px; overflow: scroll; background: white;} +.stageBox {height: 180px; overflow: scroll; background: #ffffff;} diff --git a/module/execution/view/story.html.php b/module/execution/view/story.html.php index 35f3345ed3..b5698c9e6e 100644 --- a/module/execution/view/story.html.php +++ b/module/execution/view/story.html.php @@ -218,7 +218,7 @@ createLink('story', 'view', "storyID=$story->id&version=$story->version¶m=$execution->id"); $totalEstimate += $story->estimate; -?> + ?> @@ -353,25 +353,18 @@
- "; - } - else - { - echo "'; - ?> +
Date: Tue, 22 Mar 2022 10:55:19 +0800 Subject: [PATCH 24/79] * Fix bug#20968,20997. --- extension/lite/project/ext/config/lite.php | 2 ++ module/project/model.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/extension/lite/project/ext/config/lite.php b/extension/lite/project/ext/config/lite.php index c2c824cc1b..f68ccc4780 100644 --- a/extension/lite/project/ext/config/lite.php +++ b/extension/lite/project/ext/config/lite.php @@ -1,2 +1,4 @@ project->datatable->fieldList['actions']['width'] = '120'; + +$config->project->list->exportFields = 'id,code,name,status,budget,PM,desc'; diff --git a/module/project/model.php b/module/project/model.php index 9c5b843c93..1f8e8fd4b3 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1743,6 +1743,8 @@ class projectModel extends model } else { + common::printIcon($moduleName, 'manageMembers', "projectID=$project->id", $project, 'list', 'group', '', '', '', $dataApp, $this->lang->execution->team); + if($this->config->systemMode == 'new') common::printIcon('project', 'whitelist', "projectID=$project->id&module=project&from=$from", $project, 'list', 'shield-check', '', 'btn-action', '', $dataApp); if(common::hasPriv($moduleName, 'delete')) echo html::a(helper::createLink($moduleName, "delete", "projectID=$project->id"), "", 'hiddenwin', "class='btn btn-action' title='{$this->lang->project->delete}'"); } break; From 4d7ee95c09bae457b5b0bf53c60a768c0be60a90 Mon Sep 17 00:00:00 2001 From: Zongjun Lan Date: Tue, 22 Mar 2022 10:56:21 +0800 Subject: [PATCH 25/79] * fix task #51347,#51307 --- .../ext/view/kanban.lite.html.hook.php | 4 ++ framework/router.class.php | 3 + module/common/model.php | 2 - module/execution/js/kanban.js | 63 +++++++++++++++++++ 4 files changed, 70 insertions(+), 2 deletions(-) diff --git a/extension/lite/execution/ext/view/kanban.lite.html.hook.php b/extension/lite/execution/ext/view/kanban.lite.html.hook.php index 8d5ff1682c..0f3b49248b 100644 --- a/extension/lite/execution/ext/view/kanban.lite.html.hook.php +++ b/extension/lite/execution/ext/view/kanban.lite.html.hook.php @@ -7,4 +7,8 @@ diff --git a/framework/router.class.php b/framework/router.class.php index 20e14a0544..c0407b58a2 100755 --- a/framework/router.class.php +++ b/framework/router.class.php @@ -183,6 +183,9 @@ class router extends baseRouter if($setting->key == 'mode' and $setting->section == 'global') $mode = $setting->value; if($setting->key == 'scoreStatus' and $setting->section == 'global') $score = $setting->value; } + + /* Lite Version is compatible with classic modes */ + if($config->vision == 'lite') $mode = 'new'; /* Record system mode. */ $config->systemMode = $mode; diff --git a/module/common/model.php b/module/common/model.php index 256a496c5b..8be94bb856 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -485,8 +485,6 @@ class commonModel extends model /* The standalone lite version removes the lite interface button */ if(trim($config->visions, ',') == 'lite') return true; - if($app->config->systemMode != 'new') return print("
{$lang->visionList['rnd']}
"); - if(count($userVisions) < 2) return print("
{$lang->visionList[$currentVision]}
"); if(count($configVisions) < 2) return print("
{$lang->visionList[$currentVision]}
"); diff --git a/module/execution/js/kanban.js b/module/execution/js/kanban.js index 9350f13cd2..0de9dfa84a 100644 --- a/module/execution/js/kanban.js +++ b/module/execution/js/kanban.js @@ -767,6 +767,7 @@ function updateRegion(regionID, regionData = []) if(!regionData) regionData = regions[regionID]; $region.data('zui.kanban').render(regionData.groups); + resetRegionHeight('open'); return true; } @@ -1197,6 +1198,7 @@ $(function() $(this).toggleClass('icon-chevron-double-up icon-chevron-double-down'); $(this).parents('.region').find('.kanban').toggle(); hideKanbanAction(); + resetRegionHeight($(this).hasClass('icon-chevron-double-up') ? 'open' : 'close'); }); $('.region-header').on('click', '.action', hideKanbanAction); @@ -1419,6 +1421,8 @@ $(function() }); }, 10000); } + + resetRegionHeight('open'); }); /** Calculate column height */ @@ -1432,3 +1436,62 @@ function calcColHeight(col, lane, colCards, colHeight, kanban) if (typeof displayCards !== 'number' || displayCards < 2) displayCards = 2; return (displayCards * (options.cardHeight + options.cardSpace) + options.cardSpace); } + +/** + * Reset region height according to window height. + * + * @param string fold + * @access public + * @return void + */ + function resetRegionHeight(fold) + { + var regionCount = 0; + if($.isEmptyObject(regions)) return false; + for(var i in regions) + { + regionCount += 1; + if(regionCount > 1) return false; + } + + var regionID = Object.keys(regions)[0]; + var region = regions[regionID].groups; + var groupCount = 0; + + if($.isEmptyObject(region)) return false; + for(var j in region) + { + groupCount += 1; + if(groupCount > 1) return false; + } + + var group = region[0]; + var laneCount = 0; + + if($.isEmptyObject(group.lanes)) return false; + for(var h in group.lanes) + { + laneCount += 1; + if(laneCount > 1) return false; + } + + var regionHeaderHeight = $('.region-header').outerHeight(); + if(fold == 'open') + { + var windowHeight = $(window).height(); + var headerHeight = $('#mainHeader').outerHeight(); + var mainPadding = $('#main').css('padding-top'); + var panelBorder = $('.panel').css('border-top-width'); + var bodyPadding = $('.panel-body').css('padding-top'); + var height = windowHeight - (parseInt(mainPadding) * 2) - (parseInt(bodyPadding) * 2) - headerHeight - (parseInt(panelBorder) * 2); + var regionPadding = $('.kanban').css('padding-bottom'); + var columnHeight = $('.kanban-header').outerHeight(); + + $('.region').css('height', height); + $('.kanban-lane').css('height', height - regionHeaderHeight - parseInt(regionPadding) - columnHeight); + } + else + { + $('.region').css('height', regionHeaderHeight); + } + } From b59845049b230777307eca58cd96ee9cfc4addeb Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Tue, 22 Mar 2022 10:59:17 +0800 Subject: [PATCH 26/79] * Fix bug #15763. --- module/execution/view/story.html.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/module/execution/view/story.html.php b/module/execution/view/story.html.php index b5698c9e6e..c67e6f6d21 100644 --- a/module/execution/view/story.html.php +++ b/module/execution/view/story.html.php @@ -353,18 +353,18 @@
- +
Date: Tue, 22 Mar 2022 11:01:14 +0800 Subject: [PATCH 27/79] * 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 c53d0c6295e7e13efca89f3d8d528d5c4c3a5683 Mon Sep 17 00:00:00 2001 From: Wenrui LI Date: Tue, 22 Mar 2022 11:03:08 +0800 Subject: [PATCH 28/79] * fix dynamic order select styles, task #51310, bug #20973. --- module/company/css/dynamic.css | 2 +- module/company/view/dynamic.html.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/company/css/dynamic.css b/module/company/css/dynamic.css index d368aa2198..7e5237559d 100644 --- a/module/company/css/dynamic.css +++ b/module/company/css/dynamic.css @@ -19,5 +19,5 @@ .dynamic.collapsed .dynamic-btn > .icon:before {content: '\f0d8';} .c-project, .c-product, .c-execution {width: 110px !important; overflow: unset;} -.c-user, .c-order {width: 90px !important; overflow: unset;} +.c-user, .c-order {width: 96px !important; overflow: unset;} .c-date {width: 200px;} diff --git a/module/company/view/dynamic.html.php b/module/company/view/dynamic.html.php index 9482f0a7ba..9b580f05be 100644 --- a/module/company/view/dynamic.html.php +++ b/module/company/view/dynamic.html.php @@ -35,7 +35,7 @@
-
company->order, $orderBy, 'class="form-control chosen" data-max_drop_width="215"'); ?>
+
company->order, $orderBy, 'class="form-control chosen" data-max_drop_width="215" data-disable_search="true"'); ?>
action->dynamic->search;?>
From 4a36b134cdc729964dd9ef084a2d047b96189127 Mon Sep 17 00:00:00 2001 From: Wenrui LI Date: Tue, 22 Mar 2022 11:06:54 +0800 Subject: [PATCH 29/79] * fix hidden vision inputs. --- module/user/view/batchcreate.html.php | 3 ++- module/user/view/batchedit.html.php | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/module/user/view/batchcreate.html.php b/module/user/view/batchcreate.html.php index 6907a80db4..5986cd2c9e 100644 --- a/module/user/view/batchcreate.html.php +++ b/module/user/view/batchcreate.html.php @@ -88,6 +88,8 @@ systemMode == 'new') echo html::select("visions[$i][]", $visionList, $i > 1 ? 'ditto' : (isset($visionList[$this->config->vision]) ? $this->config->vision : key($visionList)), "class='form-control chosen' multiple");?> systemMode == 'classic') echo $visionList['rnd'] . html::hidden("visions[$i][]", 'rnd');?> + + config->vision);?> user->roleList, $i > 1 ? 'ditto' : '', "class='form-control' onchange='changeGroup(this.value, $i)'");?> 1 ? 'ditto' : '', "class='form-control chosen' multiple");?> @@ -96,7 +98,6 @@
config->vision); echo html::input("password[$i]", '', "class='form-control' onkeyup='toggleCheck(this, $i)'"); echo ""; if($i != 1) echo " 1 ? "checked" : '') . " /> {$lang->user->ditto}"; diff --git a/module/user/view/batchedit.html.php b/module/user/view/batchedit.html.php index d991f6bf5c..b522563b26 100644 --- a/module/user/view/batchedit.html.php +++ b/module/user/view/batchedit.html.php @@ -88,7 +88,9 @@ systemMode == 'new' ? html::select("visions[$user->id][]", $visionList, $user->visions, "class='form-control chosen' multiple") : $visionList['rnd'];?> systemMode == 'classic') echo html::hidden("visions[$user->id][]", 'rnd');?> - id][]", $this->config->vision); endif;?> + + id][]", $this->config->vision);?> + id]", $lang->user->roleList, $role, "class='form-control'");?> id]", $lang->user->typeList, $type, "class='form-control'");?> '>id]", $user->commiter, "class='form-control'");?> From 56053267c1b3489f0a2c3046c4f0b2f7845923fb Mon Sep 17 00:00:00 2001 From: Wenrui LI Date: Tue, 22 Mar 2022 11:07:49 +0800 Subject: [PATCH 30/79] * fix where deleted condition of query. --- module/task/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/task/model.php b/module/task/model.php index 57a97f3e52..25c9939bb3 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -2152,7 +2152,7 @@ class taskModel extends model ->from(TABLE_KANBANCELL)->alias('t1') ->leftJoin(TABLE_KANBANLANE)->alias('t2')->on('t1.lane = t2.id') ->where('t1.kanban')->eq($executionID) - ->andWhere('deleted')->eq(0) + ->andWhere('t2.deleted')->eq(0) ->andWhere("($cardsWhere)") ->fetchAll(); From e2fbaa682849f0e7a50bf855116e0f54b01a8099 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Tue, 22 Mar 2022 11:10:44 +0800 Subject: [PATCH 31/79] * Fix bug#20396. --- module/bug/js/batchcreate.js | 2 +- module/product/control.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/bug/js/batchcreate.js b/module/bug/js/batchcreate.js index e2b1645d6b..19aa152c65 100644 --- a/module/bug/js/batchcreate.js +++ b/module/bug/js/batchcreate.js @@ -71,7 +71,7 @@ function setLane(regionID, num) function loadExecutionBuilds(productID, executionID, index) { branch = $('#branches' + index).val(); - if(executionID) + if(executionID != 0) { link = createLink('build', 'ajaxGetExecutionBuilds', 'executionID=' + executionID + '&productID=' + productID + "&varName=openedBuilds&build=&branch=" + branch + "&index=" + index); } diff --git a/module/product/control.php b/module/product/control.php index 36c5976f94..8e67b865b1 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -1000,7 +1000,7 @@ class product extends control { $executionsName = "executions[$number]"; $executions = empty($executions) ? array('' => '') : $executions; - return print(html::select($executionsName, $executions, '', "class='form-control' onchange='loadExecutionBuilds($executionID, this.value, $number)'")); + return print(html::select($executionsName, $executions, '', "class='form-control' onchange='loadExecutionBuilds($productID, this.value, $number)'")); } } From acd514e738764537f6d142b3840907954a626e78 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 22 Mar 2022 11:13:38 +0800 Subject: [PATCH 32/79] * 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 43af3185e2937bc1a819abf4b58421a206ea82b0 Mon Sep 17 00:00:00 2001 From: zhujinyong Date: Tue, 22 Mar 2022 11:14:08 +0800 Subject: [PATCH 33/79] * Support case group. --- api/v1/entries/testcases.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/v1/entries/testcases.php b/api/v1/entries/testcases.php index fef888623b..7b680a8a8d 100644 --- a/api/v1/entries/testcases.php +++ b/api/v1/entries/testcases.php @@ -80,9 +80,11 @@ class testcasesEntry extends entry $stepType = array(); foreach($this->requestBody->steps as $step) { + $type = isset($step->type) ? $step->type : 'step'; + $steps[] = $step->desc; - $expects[] = $step->expect; - $stepType[] = 'item'; + $expects[] = $type == 'group' ? '' : $step->expect; + $stepType[] = $type; } $this->setPost('steps', $steps); $this->setPost('expects', $expects); From 5eae11358f2a65d1ce1316188d25af4a7f103337 Mon Sep 17 00:00:00 2001 From: Wenrui LI Date: Tue, 22 Mar 2022 11:26:21 +0800 Subject: [PATCH 34/79] * fix chosen floating upon modal header on task create, task #51325, bug #20701. --- extension/lite/task/ext/view/create.html.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extension/lite/task/ext/view/create.html.php b/extension/lite/task/ext/view/create.html.php index 57fc60a6f7..11d1d0dcfc 100644 --- a/extension/lite/task/ext/view/create.html.php +++ b/extension/lite/task/ext/view/create.html.php @@ -337,8 +337,8 @@ id);?>
';?>