From e9db77ef6c8b084eae333e768b24ad88a741d09f Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 6 Mar 2023 00:38:08 +0000 Subject: [PATCH 001/167] * Fix bug #32603. --- module/project/model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/project/model.php b/module/project/model.php index cf45f47d8e..9e096977c7 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1527,6 +1527,7 @@ class projectModel extends model ->setDefault('team', $this->post->name) ->setDefault('lastEditedBy', $this->app->user->account) ->setDefault('lastEditedDate', helper::now()) + ->setDefault('days', '0') ->setIF($this->post->delta == 999, 'end', LONG_TIME) ->setIF($this->post->delta == 999, 'days', 0) ->setIF($this->post->begin == '0000-00-00', 'begin', '') From 436fc4a448fa135e13135c931b7885efe4cef952 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 6 Mar 2023 00:40:45 +0000 Subject: [PATCH 002/167] * Fix bug #32632. --- module/bug/view/view.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/bug/view/view.html.php b/module/bug/view/view.html.php index 7f11fcfa4f..7cc63b0fa8 100644 --- a/module/bug/view/view.html.php +++ b/module/bug/view/view.html.php @@ -251,7 +251,7 @@

- " . zget($lang->bug->browserList, $browser) . "";?> + " . zget($lang->bug->browserList, $browser) . "";?>

From 47c874ae0c94854e4a141cbd32fac1e204471b12 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 6 Mar 2023 00:41:04 +0000 Subject: [PATCH 003/167] * Fix bug #32633. --- module/common/model.php | 8 ++++++++ module/execution/control.php | 2 ++ module/execution/model.php | 4 +++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/module/common/model.php b/module/common/model.php index ed45177d33..0263d31794 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -3041,6 +3041,14 @@ EOD; } if($productsStatus[$object->product] == 'closed') return false; } + elseif(!empty($object->product) and is_string($object->product) and empty($config->CRProduct)) + { + $products = array(0) + explode(',', $object->product); + $products = $app->control->loadModel('product')->getByIdList($products); + $productStatus = array(); + foreach($products as $product) $productStatus[$product->status] = 1; + if(!empty($productStatus['closed']) and count($productStatus) == 1) return false; + } /* Check the execution is closed. */ $productModuleList = array('story', 'bug', 'testtask'); diff --git a/module/execution/control.php b/module/execution/control.php index 0c473b3597..91312d698f 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1703,6 +1703,8 @@ class execution extends control global $lang; $lang->executionCommon = $lang->execution->stage; include $this->app->getModulePath('', 'execution') . 'lang/' . $this->app->getClientLang() . '.php'; + + $this->config->execution->create->requiredFields .= ',products0'; } $this->app->loadLang('program'); diff --git a/module/execution/model.php b/module/execution/model.php index be8ebe0187..4d76ef6a90 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -386,6 +386,8 @@ class executionModel extends model if($project->model == 'waterfall' or $project->model == 'waterfallplus') { + $_POST['products'] = array_filter($_POST['products']); + if(empty($_POST['products'])) dao::$errors['products0'] = $this->lang->project->errorNoProducts; $this->checkWorkload('create', $_POST['percent'], $project); if(dao::isError()) return false; } @@ -1883,7 +1885,7 @@ class executionModel extends model ->page($pager, 't1.id') ->fetchAll('id'); - if(empty($productID) and !empty($executions)) $projectProductIdList = $this->dao->select('project, product')->from(TABLE_PROJECTPRODUCT)->where('project')->in(array_keys($executions))->fetchPairs(); + if(empty($productID) and !empty($executions)) $projectProductIdList = $this->dao->select('project, GROUP_CONCAT(product) as product')->from(TABLE_PROJECTPRODUCT)->where('project')->in(array_keys($executions))->groupBy('project')->fetchPairs(); $hours = $this->loadModel('project')->computerProgress($executions); $burns = $this->getBurnData($executions); From 3326617ffd78da33962b12bcb5ec15841d4870c9 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 6 Mar 2023 03:45:49 +0000 Subject: [PATCH 004/167] * Finish task #85646. --- module/project/js/edit.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/module/project/js/edit.js b/module/project/js/edit.js index fdc708019d..cb2f850d72 100644 --- a/module/project/js/edit.js +++ b/module/project/js/edit.js @@ -205,7 +205,7 @@ function loadBranches(product) } }); - (chosenProducts.length > 1 && model == 'waterfall' && model == 'waterfallplus') ? $('.division').removeClass('hide') : $('.division').addClass('hide'); + (chosenProducts.length > 1 && (model == 'waterfall' || model == 'waterfallplus')) ? $('.division').removeClass('hide') : $('.division').addClass('hide'); var $tableRow = $(product).closest('.table-row'); var index = $tableRow.find('select:first').attr('id').replace('products' , ''); @@ -301,5 +301,12 @@ function removeLine(obj) { $(obj).closest('tr').remove(); disableSelectedProduct(); - if($("select[name^='products']").length < 2) $('.division').addClass('hide'); + + var chosenProducts = 0; + $(".productsBox select[name^='products']").each(function() + { + if($(this).val() > 0) chosenProducts ++; + }); + + (chosenProducts.length > 1 && (model == 'waterfall' || model == 'waterfallplus')) ? $('.division').removeClass('hide') : $('.division').addClass('hide'); } From 10ed1c9cb14c05ad75e8449c8c47354f7dabcd41 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Mon, 6 Mar 2023 13:34:12 +0800 Subject: [PATCH 005/167] * Get the three-level menu under the drop menu. --- module/dev/model.php | 75 +++++++++++++++++++++++++++----------------- 1 file changed, 46 insertions(+), 29 deletions(-) diff --git a/module/dev/model.php b/module/dev/model.php index d5d0ccd9e1..4cf249dd79 100644 --- a/module/dev/model.php +++ b/module/dev/model.php @@ -685,6 +685,7 @@ class devModel extends model if($this->config->vision == 'lite' and $module == 'execution') return $menus; $titleList = array(); + /* Convenience secondary menu. */ foreach(array('homeMenu', 'menu') as $menu) { if(!isset($this->lang->$module->$menu)) continue; @@ -723,6 +724,7 @@ class devModel extends model if(is_array($menuValue)) { + /* Convenience third menu and secondary drop menu. */ foreach(array('subMenu', 'dropMenu') as $menu) { if(!isset($menuValue[$menu])) continue; @@ -739,42 +741,57 @@ class devModel extends model list($label, $thisModule, $thisMethod) = explode('|', $link); if($label == '@branch@') $label = $this->lang->dev->branch; - $this->app->loadLang($thisModule); - if(isset($this->lang->$thisModule->featureBar[$menuKey][$subMenuKey])) - { - $titleList[] = $label; + /* Get the three-level menu under the drop mene . */ + $moduleList = array($thisModule); + if(isset($subMenuValue['subModule'])) $moduleList = array_merge($moduleList, explode(',', $subMenuValue['subModule'])); + $moduleList = array_unique($moduleList); - $thirdMenu = new stdClass(); - $thirdMenu->title = $label; - $thirdMenu->key = ''; - $thirdMenu->module = $thisModule; - $thirdMenu->method = "{$thisMethod}_{$subMenuKey}"; - $thirdMenu->active = ($methodName == $thirdMenu->method and $moduleName == $thisModule) ? 1 : 0; - - $subMenu->active = 0; - $subMenu->children[] = $thirdMenu; - $hasFeatureBar = true; - } - elseif(isset($this->lang->$thisModule->featureBar[$thisMethod])) + foreach($moduleList as $moduleKey) { - if(is_array($this->lang->$thisModule->featureBar[$thisMethod])) + if(empty($moduleKey)) continue; + if(isset($menuList[$subMenuKey]) and isset($menuList[$subMenuKey]['subMenu']->$moduleKey)) { - $arrayKey = key($this->lang->$thisModule->featureBar[$thisMethod]); - if(is_array($this->lang->$thisModule->featureBar[$thisMethod][$arrayKey])) continue; + $labelList = $this->getLinkTitle(array($moduleKey => $menuList[$subMenuKey]['subMenu']->$moduleKey)); + $label = zget($labelList, $moduleKey, $label); } - $titleList[] = $label; + $this->app->loadLang($moduleKey); + if(isset($this->lang->$moduleKey->featureBar[$menuKey][$subMenuKey])) + { + $titleList[] = $label; - $subMenu = new stdClass(); - $subMenu->title = $label; - $subMenu->key = ''; - $subMenu->module = $thisModule; - $subMenu->method = $thisMethod; - $subMenu->active = ($methodName == $thisMethod and $moduleName == $thisModule) ? 1 : 0; - $subMenu->children = array(); + $thirdMenu = new stdClass(); + $thirdMenu->title = $label; + $thirdMenu->key = ''; + $thirdMenu->module = $moduleKey; + $thirdMenu->method = "{$thisMethod}_{$subMenuKey}"; + $thirdMenu->active = ($methodName == $thirdMenu->method and $moduleName == $moduleKey) ? 1 : 0; - $menus["$thisModule-$thisMethod"] = $subMenu; - $hasFeatureBar = false; + $subMenu->active = 0; + $subMenu->children[] = $thirdMenu; + $hasFeatureBar = true; + } + elseif(isset($this->lang->$moduleKey->featureBar[$thisMethod])) + { + if(is_array($this->lang->$moduleKey->featureBar[$thisMethod])) + { + $arrayKey = key($this->lang->$moduleKey->featureBar[$thisMethod]); + if(is_array($this->lang->$moduleKey->featureBar[$thisMethod][$arrayKey])) continue; + } + + $titleList[] = $label; + + $subMenu = new stdClass(); + $subMenu->title = $label; + $subMenu->key = ''; + $subMenu->module = $moduleKey; + $subMenu->method = $thisMethod; + $subMenu->active = ($methodName == $thisMethod and $moduleName == $moduleKey) ? 1 : 0; + $subMenu->children = array(); + + $menus["$moduleKey-$thisMethod"] = $subMenu; + $hasFeatureBar = false; + } } } } From e1b6e852af8088e1e075451e082f503f4309bbb3 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 6 Mar 2023 14:02:09 +0800 Subject: [PATCH 006/167] * Unified filter label format. --- module/execution/lang/de.php | 11 +++++++++++ module/execution/lang/en.php | 11 +++++++++++ module/execution/lang/fr.php | 11 +++++++++++ module/execution/lang/zh-cn.php | 11 +++++++++++ module/execution/view/story.html.php | 2 +- module/execution/view/testcase.html.php | 7 ++++++- module/execution/view/testtask.html.php | 4 +++- module/story/lang/de.php | 4 ++-- module/story/lang/en.php | 4 ++-- module/testreport/lang/de.php | 2 ++ module/testreport/lang/en.php | 2 ++ module/testreport/lang/fr.php | 2 ++ module/testreport/lang/zh-cn.php | 2 ++ module/testreport/view/browse.html.php | 4 +++- 14 files changed, 69 insertions(+), 8 deletions(-) diff --git a/module/execution/lang/de.php b/module/execution/lang/de.php index 993b5092e6..fce7bc4413 100644 --- a/module/execution/lang/de.php +++ b/module/execution/lang/de.php @@ -538,6 +538,17 @@ $lang->execution->featureBar['bug']['unresolved'] = 'Active'; $lang->execution->featureBar['build']['all'] = 'Build List'; +$lang->execution->featureBar['story']['all'] = 'All'; +$lang->execution->featureBar['story']['unclosed'] = 'Unclosed'; +$lang->execution->featureBar['story']['draft'] = 'Draft'; +$lang->execution->featureBar['story']['reviewing'] = 'Reviewing'; + +$lang->execution->featureBar['testcase']['all'] = 'All'; + +$lang->execution->featureBar['testtask']['browse'] = 'Test Request'; + +$lang->execution->featureBar['testreport']['browse'] = 'Testing Reports'; + $lang->execution->myExecutions = 'Ich bin beteiligt.'; $lang->execution->doingProject = "Ongoing {$lang->projectCommon}s"; diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index 4a54020911..74aa46c381 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -538,6 +538,17 @@ $lang->execution->featureBar['bug']['unresolved'] = 'Active'; $lang->execution->featureBar['build']['all'] = 'Build List'; +$lang->execution->featureBar['story']['all'] = 'All'; +$lang->execution->featureBar['story']['unclosed'] = 'Unclosed'; +$lang->execution->featureBar['story']['draft'] = 'Draft'; +$lang->execution->featureBar['story']['reviewing'] = 'Reviewing'; + +$lang->execution->featureBar['testcase']['all'] = 'All'; + +$lang->execution->featureBar['testtask']['browse'] = 'Test Request'; + +$lang->execution->featureBar['testreport']['browse'] = 'Testing Reports'; + $lang->execution->myExecutions = 'Mine'; $lang->execution->doingProject = "Ongoing {$lang->projectCommon}s"; diff --git a/module/execution/lang/fr.php b/module/execution/lang/fr.php index edb6d956ed..9d432193fc 100644 --- a/module/execution/lang/fr.php +++ b/module/execution/lang/fr.php @@ -538,6 +538,17 @@ $lang->execution->featureBar['bug']['unresolved'] = 'Active'; $lang->execution->featureBar['build']['all'] = 'Build List'; +$lang->execution->featureBar['story']['all'] = 'All'; +$lang->execution->featureBar['story']['unclosed'] = 'Unclosed'; +$lang->execution->featureBar['story']['draft'] = 'Draft'; +$lang->execution->featureBar['story']['reviewing'] = 'Reviewing'; + +$lang->execution->featureBar['testcase']['all'] = 'All'; + +$lang->execution->featureBar['testtask']['browse'] = 'Test Request'; + +$lang->execution->featureBar['testreport']['browse'] = 'Testing Reports'; + $lang->execution->myExecutions = "J'étais impliqué"; $lang->execution->doingProject = "Ongoing {$lang->projectCommon}s"; diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index ed2fcaab23..9f79d65ce0 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -538,6 +538,17 @@ $lang->execution->featureBar['bug']['unresolved'] = '未解决'; $lang->execution->featureBar['build']['all'] = '全部版本'; +$lang->execution->featureBar['story']['all'] = '全部'; +$lang->execution->featureBar['story']['unclosed'] = '未关闭'; +$lang->execution->featureBar['story']['draft'] = '草稿'; +$lang->execution->featureBar['story']['reviewing'] = '评审中'; + +$lang->execution->featureBar['testcase']['all'] = '全部'; + +$lang->execution->featureBar['testtask']['browse'] = '测试单列表'; + +$lang->execution->featureBar['testreport']['browse'] = '报告列表'; + $lang->execution->myExecutions = '我参与的'; $lang->execution->doingProject = "进行中的{$lang->projectCommon}"; diff --git a/module/execution/view/story.html.php b/module/execution/view/story.html.php index 4c13d81f1c..54cc115c73 100644 --- a/module/execution/view/story.html.php +++ b/module/execution/view/story.html.php @@ -62,7 +62,7 @@
- story->featureBar['browse'] as $featureType => $label):?> + execution->featureBar['story'] as $featureType => $label):?> $label";?> {$pager->recTotal}";?> diff --git a/module/execution/view/testcase.html.php b/module/execution/view/testcase.html.php index a6cff28246..462271a2d2 100644 --- a/module/execution/view/testcase.html.php +++ b/module/execution/view/testcase.html.php @@ -13,7 +13,12 @@
- {$lang->all} {$pager->recTotal}", '', "class='btn btn-link btn-active-text'");?> + lang->execution->featureBar['testcase'] as $label) + { + echo html::a(inlink('testcase', "executionID=$executionID&productID=$productID&branchID=$branchID&type=$type&moduleID=$moduleID&orderBy=$orderBy"), "{$label} {$pager->recTotal}", '', "class='btn btn-link btn-active-text'"); + } + ?>
id", '', '', '', true), " " . $lang->testcase->create, '', "class='btn btn-primary' data-app='{$this->app->tab}'");?> diff --git a/module/execution/view/testtask.html.php b/module/execution/view/testtask.html.php index 58e4978310..4a94974021 100644 --- a/module/execution/view/testtask.html.php +++ b/module/execution/view/testtask.html.php @@ -26,10 +26,12 @@ + lang->execution->featureBar['testtask'] as $label):?> - testtask->browse;?> + +
diff --git a/module/story/lang/de.php b/module/story/lang/de.php index 76ef39efd5..6ed399affb 100644 --- a/module/story/lang/de.php +++ b/module/story/lang/de.php @@ -485,8 +485,8 @@ $lang->story->subDivideTip['notWait'] = 'The Story has been %s and cannot be $lang->story->subDivideTip['notActive'] = "The %s is not active and cannot be subdivided."; $lang->story->subDivideTip['twinsSplit'] = 'The Twins Story cannot be subdivided.'; -$lang->story->featureBar['browse']['all'] = $lang->all; -$lang->story->featureBar['browse']['unclosed'] = $lang->story->unclosed; +$lang->story->featureBar['browse']['all'] = $lang->all; +$lang->story->featureBar['browse']['unclosed'] = $lang->story->unclosed; $lang->story->featureBar['browse']['draft'] = $lang->story->statusList['draft']; $lang->story->featureBar['browse']['reviewing'] = $lang->story->statusList['reviewing']; diff --git a/module/story/lang/en.php b/module/story/lang/en.php index 839ba2053b..d9296e0e5a 100644 --- a/module/story/lang/en.php +++ b/module/story/lang/en.php @@ -485,8 +485,8 @@ $lang->story->subDivideTip['notWait'] = 'The Story has been %s and cannot be $lang->story->subDivideTip['notActive'] = "The %s is not active and cannot be subdivided."; $lang->story->subDivideTip['twinsSplit'] = 'The Twins Story cannot be subdivided.'; -$lang->story->featureBar['browse']['all'] = $lang->all; -$lang->story->featureBar['browse']['unclosed'] = $lang->story->unclosed; +$lang->story->featureBar['browse']['all'] = $lang->all; +$lang->story->featureBar['browse']['unclosed'] = $lang->story->unclosed; $lang->story->featureBar['browse']['draft'] = $lang->story->statusList['draft']; $lang->story->featureBar['browse']['reviewing'] = $lang->story->statusList['reviewing']; diff --git a/module/testreport/lang/de.php b/module/testreport/lang/de.php index 8a89fadb42..fb13505609 100644 --- a/module/testreport/lang/de.php +++ b/module/testreport/lang/de.php @@ -94,3 +94,5 @@ Total %s Bugs reported . Bug Effective Rate : %s,Bugs-reported-from-cases rate: %s EOD; + +$lang->testreport->featureBar['browse']['browse'] = 'Testing Reports'; diff --git a/module/testreport/lang/en.php b/module/testreport/lang/en.php index fd8d13c668..366cf93e44 100644 --- a/module/testreport/lang/en.php +++ b/module/testreport/lang/en.php @@ -94,3 +94,5 @@ Total %s Bugs reported . Bug Effective Rate : %s,Bugs-reported-from-cases rate: %s EOD; + +$lang->testreport->featureBar['browse']['browse'] = 'Testing Reports'; diff --git a/module/testreport/lang/fr.php b/module/testreport/lang/fr.php index af4294d07a..8bc4903f38 100644 --- a/module/testreport/lang/fr.php +++ b/module/testreport/lang/fr.php @@ -94,3 +94,5 @@ Total %s Bugs reported . Bug Effective Rate : %s,Bugs-reported-from-cases rate: %s EOD; + +$lang->testreport->featureBar['browse']['browse'] = 'Testing Reports'; diff --git a/module/testreport/lang/zh-cn.php b/module/testreport/lang/zh-cn.php index f03d1f3853..21de010655 100644 --- a/module/testreport/lang/zh-cn.php +++ b/module/testreport/lang/zh-cn.php @@ -94,3 +94,5 @@ $lang->testreport->bugSummary = <<%s个Bug 。 有效Bug率(方案为已解决或延期 / 状态为已解决或已关闭):%s,用例发现Bug率(用例创建的Bug / 发现Bug数):%s EOD; + +$lang->testreport->featureBar['browse']['browse'] = '报告列表'; diff --git a/module/testreport/view/browse.html.php b/module/testreport/view/browse.html.php index 91e5d1238e..d553ae28e6 100644 --- a/module/testreport/view/browse.html.php +++ b/module/testreport/view/browse.html.php @@ -14,10 +14,12 @@ global->flow == 'full'):?>