From ac72fe554028192c8c6e42567ba4eb865c0b244e Mon Sep 17 00:00:00 2001 From: wangzemei Date: Thu, 29 Sep 2022 13:24:23 +0800 Subject: [PATCH 32/83] * extract common variable for kanban colWidth --- module/execution/view/setkanban.html.php | 6 +++--- module/kanban/view/create.html.php | 6 +++--- module/kanban/view/setting.html.php | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/module/execution/view/setkanban.html.php b/module/execution/view/setkanban.html.php index e3a3c02aa8..fdfd16eb80 100644 --- a/module/execution/view/setkanban.html.php +++ b/module/execution/view/setkanban.html.php @@ -25,13 +25,13 @@
$lang->kanbancolumn->fluidBoardList['0']), "class='inline-block'", $execution->fluidBoard);?> - colWidth) and $execution->colWidth !== 0 ? $execution->colWidth : $this->config->colWidth, "class='form-control inline-block setting-input' required placeholder='264' autocomplete='off'");?>px + colWidth) ? $execution->colWidth : $this->config->colWidth, "class='form-control inline-block setting-input' required placeholder='{$this->config->colWidth}' autocomplete='off'");?>px
$lang->kanbancolumn->fluidBoardList['1']), "class='inline-block'", $execution->fluidBoard);?> - minColWidth) and $execution->minColWidth !== 0 ? $execution->minColWidth: $this->config->minColWidth, "class='form-control inline-block setting-input' required placeholder='180' autocomplete='off'");?>px + minColWidth) ? $execution->minColWidth: $this->config->minColWidth, "class='form-control inline-block setting-input' required placeholder='{$this->config->minColWidth}' autocomplete='off'");?>px ~ - maxColWidth) and $execution->maxColWidth !== 0 ? $execution->maxColWidth: $this->config->maxColWidth, "class='form-control inline-block setting-input' required placeholder='384' autocomplete='off'");?>px + maxColWidth) ? $execution->maxColWidth: $this->config->maxColWidth, "class='form-control inline-block setting-input' required placeholder='{$this->config->maxColWidth}' autocomplete='off'");?>px
diff --git a/module/kanban/view/create.html.php b/module/kanban/view/create.html.php index c65a796b0e..6d9b4872e3 100644 --- a/module/kanban/view/create.html.php +++ b/module/kanban/view/create.html.php @@ -69,13 +69,13 @@
$lang->kanbancolumn->fluidBoardList['0']), isset($copyKanban->fluidBoard) ? $copyKanban->fluidBoard : 0);?> - colWidth) and $copyKanban->colWidth !== 0 ? $copyKanban->colWidth : $this->config->colWidth, "class='form-control inline-block setting-input' required placeholder='264' autocomplete='off'");?>px + colWidth) ? $copyKanban->colWidth : $this->config->colWidth, "class='form-control inline-block setting-input' required placeholder='{$this->config->colWidth}' autocomplete='off'");?>px
$lang->kanbancolumn->fluidBoardList['1']), isset($copyKanban->fluidBoard) ? $copyKanban->fluidBoard : 0);?> - minColWidth) and $copyKanban->minColWidth !== 0 ? $copyKanban->minColWidth: $this->config->minColWidth, "class='form-control inline-block setting-input' required placeholder='180' autocomplete='off'");?>px + minColWidth) ? $copyKanban->minColWidth: $this->config->minColWidth, "class='form-control inline-block setting-input' required placeholder='{$this->config->minColWidth}' autocomplete='off'");?>px ~ - maxColWidth) and $copyKanban->maxColWidth !== 0 ? $copyKanban->maxColWidth: $this->config->maxColWidth, "class='form-control inline-block setting-input' required placeholder='384' autocomplete='off'");?>px + maxColWidth) ? $copyKanban->maxColWidth: $this->config->maxColWidth, "class='form-control inline-block setting-input' required placeholder='{$this->config->maxColWidth}' autocomplete='off'");?>px
diff --git a/module/kanban/view/setting.html.php b/module/kanban/view/setting.html.php index 831ba0f4d9..565adc8313 100644 --- a/module/kanban/view/setting.html.php +++ b/module/kanban/view/setting.html.php @@ -30,13 +30,13 @@
$lang->kanbancolumn->fluidBoardList['0']), $kanban->fluidBoard);?> - colWidth) and $kanban->colWidth !== 0 ? $kanban->colWidth: $this->config->colWidth, "class='form-control inline-block setting-input' required placeholder='264' autocomplete='off'");?>px + colWidth) ? $kanban->colWidth : $this->config->colWidth, "class='form-control inline-block setting-input' required placeholder='{$this->config->colWidth}' autocomplete='off'");?>px
$lang->kanbancolumn->fluidBoardList['1']), $kanban->fluidBoard);?> - minColWidth) and $kanban->minColWidth !== 0 ? $kanban->minColWidth: $this->config->minColWidth, "class='form-control inline-block setting-input' required placeholder='180' autocomplete='off'");?>px + minColWidth) ? $kanban->minColWidth : $this->config->minColWidth, "class='form-control inline-block setting-input' required placeholder='{$this->config->minColWidth}' autocomplete='off'");?>px ~ - maxColWidth) and $kanban->maxColWidth !== 0 ? $kanban->maxColWidth: $this->config->maxColWidth, "class='form-control inline-block setting-input' required placeholder='384' autocomplete='off'");?>px + maxColWidth) ? $kanban->maxColWidth : $this->config->maxColWidth, "class='form-control inline-block setting-input' required placeholder='{$this->config->maxColWidth}' autocomplete='off'");?>px
From d4182b0360d70a9dc3fb3f16fae94a88bcfce403 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 29 Sep 2022 13:55:58 +0800 Subject: [PATCH 33/83] * Finish task #70503. --- module/project/view/browsebylist.html.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/module/project/view/browsebylist.html.php b/module/project/view/browsebylist.html.php index 6294bfa540..9bde07f790 100644 --- a/module/project/view/browsebylist.html.php +++ b/module/project/view/browsebylist.html.php @@ -18,8 +18,6 @@ .project-name > span, .project-name > span {flex: none;} .project-name > a {display: inline-block; max-width: calc(100% - 50px);} -.project-name.has-prefix > a, -.project-name.has-suffix > a {max-width: calc(100% - 100px);} .project-name.has-prefix > a {padding-left: 5px;} .project-name.has-suffix > a {padding-right: 5px;} From 2b815f88c1f0e0fc02e7e1a956af2fd1b5aa49a8 Mon Sep 17 00:00:00 2001 From: liuyongkai Date: Thu, 29 Sep 2022 06:09:50 +0000 Subject: [PATCH 34/83] * Fix bug #27556. --- 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 a0108027e3..5e297ecebf 100755 --- a/module/task/model.php +++ b/module/task/model.php @@ -2896,7 +2896,7 @@ class taskModel extends model public function updateEstimate($estimateID) { $oldEstimate = $this->getEstimateById($estimateID); - $estimate = fixer::input('post')->cleanINT('consumed,left')->get(); + $estimate = fixer::input('post')->get(); $today = helper::today(); if(helper::isZeroDate($estimate->date)) return dao::$errors[] = $this->lang->task->error->dateEmpty; From 11448f3cee98ca8e191698d1495a00f8874403e0 Mon Sep 17 00:00:00 2001 From: liuyongkai Date: Thu, 29 Sep 2022 06:39:47 +0000 Subject: [PATCH 35/83] * Fix bug #27556. --- module/task/model.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/module/task/model.php b/module/task/model.php index 5e297ecebf..6c1fcad9b4 100755 --- a/module/task/model.php +++ b/module/task/model.php @@ -2896,8 +2896,11 @@ class taskModel extends model public function updateEstimate($estimateID) { $oldEstimate = $this->getEstimateById($estimateID); - $estimate = fixer::input('post')->get(); $today = helper::today(); + $estimate = fixer::input('post') + ->setIF(is_numeric($this->post->consumed), 'consumed', (float)$this->post->consumed) + ->setIF(is_numeric($this->post->left), 'left', (float)$this->post->left) + ->get(); if(helper::isZeroDate($estimate->date)) return dao::$errors[] = $this->lang->task->error->dateEmpty; if($estimate->date > $today) return dao::$errors[] = $this->lang->task->error->date; From 04d06bb2b583718a1332364288598e96a2c55746 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 29 Sep 2022 14:48:09 +0800 Subject: [PATCH 36/83] * Finish task #70494. --- module/productplan/lang/de.php | 2 ++ module/productplan/lang/en.php | 2 ++ module/productplan/lang/fr.php | 2 ++ module/productplan/lang/zh-cn.php | 2 ++ module/productplan/view/browsebylist.html.php | 35 +++++++++++++++++-- 5 files changed, 41 insertions(+), 2 deletions(-) diff --git a/module/productplan/lang/de.php b/module/productplan/lang/de.php index e87334e50d..059127b47b 100644 --- a/module/productplan/lang/de.php +++ b/module/productplan/lang/de.php @@ -73,6 +73,8 @@ $lang->productplan->cannotDeleteParent = 'Cannot delete parent plan'; $lang->productplan->selectProjects = "Please select the project"; $lang->productplan->projectNotEmpty = 'Project cannot be empty.'; $lang->productplan->nextStep = "Next step"; +$lang->productplan->summary = "Total %s plans on this page, Parent Plan %s ,Child Plan %s."; +$lang->productplan->checkedSummary = "Seleted %total% plans, Parent Plan %parent%, Child Plan %child%."; $lang->productplan->id = 'ID'; $lang->productplan->product = $lang->productCommon; diff --git a/module/productplan/lang/en.php b/module/productplan/lang/en.php index da23bd9127..12de3ade68 100644 --- a/module/productplan/lang/en.php +++ b/module/productplan/lang/en.php @@ -73,6 +73,8 @@ $lang->productplan->cannotDeleteParent = 'Cannot delete parent plan'; $lang->productplan->selectProjects = "Please select the project"; $lang->productplan->projectNotEmpty = 'Project cannot be empty.'; $lang->productplan->nextStep = "Next step"; +$lang->productplan->summary = "Total %s plans on this page, Parent Plan %s ,Child Plan %s."; +$lang->productplan->checkedSummary = "Seleted %total% plans, Parent Plan %parent%, Child Plan %child%."; $lang->productplan->id = 'ID'; $lang->productplan->product = $lang->productCommon; diff --git a/module/productplan/lang/fr.php b/module/productplan/lang/fr.php index 8b45ee16bf..e73340276e 100644 --- a/module/productplan/lang/fr.php +++ b/module/productplan/lang/fr.php @@ -73,6 +73,8 @@ $lang->productplan->cannotDeleteParent = 'Impossible de supprimer le plan parent $lang->productplan->selectProjects = "Please select the project"; $lang->productplan->projectNotEmpty = 'Project cannot be empty.'; $lang->productplan->nextStep = "Next step"; +$lang->productplan->summary = "Total %s plans on this page, Parent Plan %s ,Child Plan %s."; +$lang->productplan->checkedSummary = "Seleted %total% plans, Parent Plan %parent%, Child Plan %child%."; $lang->productplan->id = 'ID'; $lang->productplan->product = $lang->productCommon; diff --git a/module/productplan/lang/zh-cn.php b/module/productplan/lang/zh-cn.php index 4a93f1a59d..1c4abdb050 100644 --- a/module/productplan/lang/zh-cn.php +++ b/module/productplan/lang/zh-cn.php @@ -73,6 +73,8 @@ $lang->productplan->cannotDeleteParent = "不能删除父计划"; $lang->productplan->selectProjects = "请选择所属项目"; $lang->productplan->projectNotEmpty = '所属项目不能为空。'; $lang->productplan->nextStep = "下一步"; +$lang->productplan->summary = "本页共 %s 个计划,父计划 %s,子计划 %s。"; +$lang->productplan->checkedSummary = "共选中 %total% 个计划,父计划 %parent%,子计划 %child%。"; $lang->productplan->id = '编号'; $lang->productplan->product = $lang->productCommon; diff --git a/module/productplan/view/browsebylist.html.php b/module/productplan/view/browsebylist.html.php index e488ec94f8..8c9fab7c55 100644 --- a/module/productplan/view/browsebylist.html.php +++ b/module/productplan/view/browsebylist.html.php @@ -33,6 +33,8 @@
+ +

@@ -43,7 +45,7 @@

-
id&branch=$branch")?>'> + id&branch=$branch")?>'> recTotal}&recPerPage={$pager->recPerPage}"; ?> @@ -89,10 +91,13 @@ { $parent = $plan->id; $children = isset($plan->children) ? $plan->children : 0; + + $totalParent ++; } if($plan->parent == 0) $parent = 0; if(!empty($parent) and $plan->parent > 0 and $plan->parent != $parent) $parent = 0; if($plan->parent <= 0) $i = 0; + if($plan->parent > 0) $totalChild ++; $class = ''; if(!empty($parent) and $plan->parent == $parent) @@ -103,7 +108,7 @@ $i++; } ?> - +
id => ''), '', $attribute) . html::a(helper::createLink('productplan', 'view', "planID=$plan->id"), sprintf('%03d', $plan->id));?> @@ -179,8 +184,34 @@ +
productplan->summary, count($plans), $totalParent, $totalChild);?>
show('right', 'pagerjs');?> + From 6a85ed1d6f2bb7335db393e7991bd1bcf4d247ef Mon Sep 17 00:00:00 2001 From: zenggang Date: Thu, 29 Sep 2022 06:56:02 +0000 Subject: [PATCH 37/83] * Fix bug#28011 --- module/bug/control.php | 2 ++ module/bug/view/batchedit.html.php | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/module/bug/control.php b/module/bug/control.php index 99dd327aaa..823129e4d2 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -1158,6 +1158,7 @@ class bug extends control $branch = $product->type == 'branch' ? ($bug->branch > 0 ? $bug->branch . ',0' : '0') : ''; $productBugs = $this->bug->getProductBugPairs($productID, $branch); + if(isset($productBugs[$bugID])) unset($productBugs[$bugID]); $this->view->bug = $bug; $this->view->productID = $productID; @@ -1814,6 +1815,7 @@ class bug extends control $product = $this->loadModel('product')->getById($productID); $branch = $product->type == 'branch' ? ($bug->branch > 0 ? $bug->branch . ',0' : '0') : ''; $productBugs = $this->bug->getProductBugPairs($productID, $branch); + if(isset($productBugs[$bugID])) unset($productBugs[$bugID]); $this->bug->checkBugExecutionPriv($bug); $this->qa->setMenu($this->products, $productID, $bug->branch); diff --git a/module/bug/view/batchedit.html.php b/module/bug/view/batchedit.html.php index f1e9c9c348..89d343479d 100644 --- a/module/bug/view/batchedit.html.php +++ b/module/bug/view/batchedit.html.php @@ -143,7 +143,11 @@
resolution, "class='form-control' onchange=setDuplicate(this.value,$bugID)");?> ' resolution != 'duplicate') echo "style='display:none'";?>> - product][$bug->branch], $bug->duplicateBug, "class='form-control' placeholder='{$lang->bug->duplicateTip}'");?> + product][$bug->branch]; + if(isset($productBugs[$bug->id])) unset($productBugs[$bug->id]); + ?> + duplicateBug, "class='form-control' placeholder='{$lang->bug->duplicateTip}'");?>
From 8ebea231d82259766fd5a8f5f0707b9d27dbd3b0 Mon Sep 17 00:00:00 2001 From: wangzemei Date: Thu, 29 Sep 2022 14:56:40 +0800 Subject: [PATCH 38/83] * Fix bug #28207 --- module/my/view/project.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/my/view/project.html.php b/module/my/view/project.html.php index 264a24a824..b1eafc7518 100644 --- a/module/my/view/project.html.php +++ b/module/my/view/project.html.php @@ -63,7 +63,7 @@ PM)):?> PM);?> - $usersAvatar[$project->PM], 'account' => $project->PM, 'name' => $userName), "avatar-circle avatar-top avatar-{$project->PM}"); ?> + $usersAvatar[$project->PM], 'account' => $project->PM, 'name' => $userName), "avatar-circle avatar-{$project->PM}"); ?> PM]) ? $PMList[$project->PM]->id : '';?> createLink('user', 'profile', "userID=$userID", '', true), $userName, '', "title='{$userName}' data-toggle='modal' data-type='iframe' data-width='600'");?> From 74568631ac53bc6faa6bfcd7e468ff26eb363a72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E5=BB=B6=E4=B9=89?= Date: Thu, 29 Sep 2022 15:20:30 +0800 Subject: [PATCH 39/83] * Finish task #70499. --- module/productplan/css/browse.css | 4 +++ module/productplan/js/browse.js | 20 +++++++++++++++ module/productplan/model.php | 15 ++++++----- module/productplan/view/browsebylist.html.php | 25 ++++++++++++++++++- 4 files changed, 55 insertions(+), 9 deletions(-) diff --git a/module/productplan/css/browse.css b/module/productplan/css/browse.css index 2b51775b97..8c82139ecf 100644 --- a/module/productplan/css/browse.css +++ b/module/productplan/css/browse.css @@ -39,3 +39,7 @@ td.c-branch {overflow: hidden; text-align: left !important; text-overflow: ellip #productplanList .c-actions .btn+.btn {margin-left: -1px;} #productplanList .c-actions .btn {display: block; float: left;} #productplanList td.c-actions .dividing-line {width: 1px; height: 16px; display: inline-block; vertical-align: middle; background: #F4F5F7; margin: 6px 0 0 0; float: left;} + +.popover.right {left: 40px; top: -5px; white-space: nowrap;} +.popover.right .popover-content {padding: 5px 20px 0px 0px;} +.execution-tip {list-style: none;} diff --git a/module/productplan/js/browse.js b/module/productplan/js/browse.js index f9b4ea064d..d679c438e7 100644 --- a/module/productplan/js/browse.js +++ b/module/productplan/js/browse.js @@ -99,6 +99,26 @@ $(function() { $.zui.ContextMenu.hide(); }); + + $('.project-popover').on('click', function() + { + var showPopover = $(this).next().css('display') == 'block'; + $('.popover.right').hide(); + if(!showPopover) $(this).next().show(); + }); + + $('.project-link').on('click', function() + { + $('.popover.right').hide(); + }); + + /* Hide popover tip. */ + $(document).on('mousedown', function(e) + { + var $target = $(e.target); + var $toggle = $target.closest('.popover'); + if(!$toggle.length) $('.popover.right').hide(); + }); }); /* Define menu creators. */ diff --git a/module/productplan/model.php b/module/productplan/model.php index d07ec90341..e8815795ac 100644 --- a/module/productplan/model.php +++ b/module/productplan/model.php @@ -122,14 +122,14 @@ class productplanModel extends model foreach($planIdList as $planID) { - $planProjects[$planID] = $this->dao->select('t1.*,t2.type')->from(TABLE_PROJECTPRODUCT)->alias('t1') + $planProjects[$planID] = $this->dao->select('t1.project,t2.name')->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')->like(",$planID,") ->andWhere('t2.type')->in('sprint,stage,kanban') ->orderBy('project_desc') - ->fetch('project'); + ->fetchAll('project'); } $storyCountInTable = $this->dao->select('plan,count(story) as count')->from(TABLE_PLANSTORY)->where('plan')->in($planIdList)->groupBy('plan')->fetchPairs('plan', 'count'); @@ -159,12 +159,11 @@ class productplanModel extends model ->andWhere('deleted')->eq(0) ->fetchPairs('id', 'estimate'); } - $plan->stories = count($storyPairs); - $plan->bugs = isset($bugs[$plan->id]) ? count($bugs[$plan->id]) : 0; - $plan->hour = array_sum($storyPairs); - $plan->project = zget($planProjects, $plan->id, ''); - $plan->projectID = $plan->project; - $plan->expired = $plan->end < $date ? true : false; + $plan->stories = count($storyPairs); + $plan->bugs = isset($bugs[$plan->id]) ? count($bugs[$plan->id]) : 0; + $plan->hour = array_sum($storyPairs); + $plan->projects = zget($planProjects, $plan->id, ''); + $plan->expired = $plan->end < $date ? true : false; /* Sync linked stories. */ if(!isset($storyCountInTable[$plan->id]) or $storyCountInTable[$plan->id] != $plan->stories) diff --git a/module/productplan/view/browsebylist.html.php b/module/productplan/view/browsebylist.html.php index e488ec94f8..45aaaa7fa8 100644 --- a/module/productplan/view/browsebylist.html.php +++ b/module/productplan/view/browsebylist.html.php @@ -140,7 +140,30 @@ stories;?> bugs;?> hour;?> - projectID)) echo html::a(helper::createLink('execution', 'task', 'projectID=' . $plan->projectID), '');?> + + projects)) + { + if(count($plan->projects) === 1) + { + echo html::a(helper::createLink('execution', 'task', 'projectID=' . key($plan->projects)), ''); + } + else + { + $projectHtml = '
'; + $projectHtml .= '
'; + $projectHtml .= '
'; + $projectHtml .= '
    '; + foreach($plan->projects as $projectID => $project) $projectHtml .= '
  • ' . html::a(helper::createLink('execution', 'task', "projectID=$projectID"), $project->name, '', 'class="project-link"') . '
  • '; + $projectHtml .= '
'; + $projectHtml .= '
'; + $projectHtml .= '
'; + echo ""; + echo $projectHtml; + } + } + ?> + ', '
', '
', '
'), "\n", str_replace(array("\n", "\r"), '', $plan->desc)), ''));?>
From 01c194668b252a6b356e259a5ad63b7a85bd38a8 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 29 Sep 2022 15:59:43 +0800 Subject: [PATCH 40/83] * Finish task #70505. --- module/datatable/control.php | 1 - module/execution/view/testcase.html.php | 6 +- module/my/view/testcase.html.php | 6 +- module/testcase/config.php | 89 ++++++++++++------------- module/testcase/lang/de.php | 2 + module/testcase/lang/en.php | 2 + module/testcase/lang/fr.php | 2 + module/testcase/lang/zh-cn.php | 2 + module/testtask/config.php | 2 +- 9 files changed, 59 insertions(+), 53 deletions(-) diff --git a/module/datatable/control.php b/module/datatable/control.php index 65c14a6580..b5ee9f0244 100644 --- a/module/datatable/control.php +++ b/module/datatable/control.php @@ -67,7 +67,6 @@ class datatable extends control $this->app->loadConfig('testtask'); $this->config->testcase->datatable->defaultField = $this->config->testtask->datatable->defaultField; $this->config->testcase->datatable->fieldList['actions']['width'] = '100'; - $this->config->testcase->datatable->fieldList['status']['title'] = $this->lang->testcase->executionStatus; $this->config->testcase->datatable->fieldList['status']['width'] = '90'; } if($module == 'testcase') diff --git a/module/execution/view/testcase.html.php b/module/execution/view/testcase.html.php index 5dd81e5f50..8ea2460d6a 100644 --- a/module/execution/view/testcase.html.php +++ b/module/execution/view/testcase.html.php @@ -49,10 +49,10 @@ idAB);?> - execution->pri;?>> priAB);?> testcase->title);?> + priAB);?> typeAB);?> - openedByAB);?> + testcase->openedByAB);?> testtask->lastRunAccount);?> testtask->lastRunTime);?> testtask->lastRunResult);?> @@ -70,10 +70,10 @@ id); ?> - pri?>' title='testcase->priList, $case->pri, $case->pri);?>'>testcase->priList, $case->pri, $case->pri)?> version";?> task";?> createLink('testcase', 'view', $params, '', '', $case->project), $case->title, null, "style='color: $case->color' data-app='{$this->app->tab}'");?> + pri?>' title='testcase->priList, $case->pri, $case->pri);?>'>testcase->priList, $case->pri, $case->pri)?> testcase->typeList, $case->type);?> openedBy);?> lastRunner);?> diff --git a/module/my/view/testcase.html.php b/module/my/view/testcase.html.php index 73b4a4e898..a4502ca9ec 100644 --- a/module/my/view/testcase.html.php +++ b/module/my/view/testcase.html.php @@ -55,13 +55,13 @@ idAB);?> - testcase->pri;?>> priAB);?> testcase->title);?> + testcase->pri;?>> priAB);?> testtask->common);?> typeAB);?> - openedByAB);?> + testcase->openedByAB);?> testtask->lastRunAccount);?> testtask->lastRunTime);?> testtask->lastRunResult);?> @@ -86,10 +86,10 @@ id); ?> - pri?>' title='testcase->priList, $case->pri, $case->pri);?>'>testcase->priList, $case->pri, $case->pri)?> version";?> task";?> createLink('testcase', 'view', $params), $case->title, null, "style='color: $case->color' title='{$case->title}'");?> + pri?>' title='testcase->priList, $case->pri, $case->pri);?>'>testcase->priList, $case->pri, $case->pri)?> taskName;?> diff --git a/module/testcase/config.php b/module/testcase/config.php index 1b046f08f5..1b91760ca6 100644 --- a/module/testcase/config.php +++ b/module/testcase/config.php @@ -79,7 +79,7 @@ $config->testcase->search['params']['lastEditedDate'] = array('operator' => '=', global $app; $config->testcase->datatable = new stdclass(); -$config->testcase->datatable->defaultField = array('id', 'pri', 'title', 'type', 'openedBy', 'lastRunner', 'lastRunDate', 'lastRunResult', 'status', 'bugs', 'results', 'stepNumber', 'actions'); +$config->testcase->datatable->defaultField = array('id', 'title', 'pri', 'openedBy', 'lastRunner', 'lastRunDate', 'lastRunResult', 'actions'); $config->testcase->datatable->fieldList['id']['title'] = 'idAB'; $config->testcase->datatable->fieldList['id']['fixed'] = 'left'; @@ -94,12 +94,6 @@ $config->testcase->datatable->fieldList['module']['title'] = 'module'; $config->testcase->datatable->fieldList['module']['control'] = 'select'; $config->testcase->datatable->fieldList['module']['dataSource'] = array('module' => 'tree', 'method' => 'getOptionMenu', 'params' => '$productID&case'); -$config->testcase->datatable->fieldList['pri']['title'] = 'priAB'; -$config->testcase->datatable->fieldList['pri']['fixed'] = 'left'; -$config->testcase->datatable->fieldList['pri']['width'] = '40'; -$config->testcase->datatable->fieldList['pri']['required'] = 'no'; -$config->testcase->datatable->fieldList['pri']['name'] = $lang->testcase->pri; - $config->testcase->datatable->fieldList['title']['title'] = 'title'; $config->testcase->datatable->fieldList['title']['fixed'] = 'left'; $config->testcase->datatable->fieldList['title']['width'] = 'auto'; @@ -111,11 +105,44 @@ $config->testcase->datatable->fieldList['branch']['width'] = '100'; $config->testcase->datatable->fieldList['branch']['required'] = 'no'; $config->testcase->datatable->fieldList['branch']['dataSource'] = array('module' => 'port', 'method' => 'getRelatedObjects', 'params' => 'testcase&branch&id,name'); +$config->testcase->datatable->fieldList['pri']['title'] = 'priAB'; +$config->testcase->datatable->fieldList['pri']['fixed'] = 'left'; +$config->testcase->datatable->fieldList['pri']['width'] = '40'; +$config->testcase->datatable->fieldList['pri']['required'] = 'no'; +$config->testcase->datatable->fieldList['pri']['name'] = $lang->testcase->pri; + $config->testcase->datatable->fieldList['type']['title'] = 'type'; $config->testcase->datatable->fieldList['type']['fixed'] = 'no'; $config->testcase->datatable->fieldList['type']['width'] = '80'; $config->testcase->datatable->fieldList['type']['required'] = 'no'; +$config->testcase->datatable->fieldList['assignedTo']['title'] = 'assignedTo'; +$config->testcase->datatable->fieldList['assignedTo']['fixed'] = 'no'; +$config->testcase->datatable->fieldList['assignedTo']['width'] = '90'; +$config->testcase->datatable->fieldList['assignedTo']['required'] = 'no'; + +$config->testcase->datatable->fieldList['status']['title'] = 'statusAB'; +if($app->rawMethod == 'cases') +{ + $config->testcase->datatable->fieldList['status']['width'] = '90'; +} +else +{ + $config->testcase->datatable->fieldList['status']['width'] = '70'; +} +$config->testcase->datatable->fieldList['status']['fixed'] = 'no'; +$config->testcase->datatable->fieldList['status']['required'] = 'no'; + +$config->testcase->datatable->fieldList['openedBy']['title'] = 'openedByAB'; +$config->testcase->datatable->fieldList['openedBy']['fixed'] = 'no'; +$config->testcase->datatable->fieldList['openedBy']['width'] = '80'; +$config->testcase->datatable->fieldList['openedBy']['required'] = 'no'; + +$config->testcase->datatable->fieldList['openedDate']['title'] = 'openedDate'; +$config->testcase->datatable->fieldList['openedDate']['fixed'] = 'no'; +$config->testcase->datatable->fieldList['openedDate']['width'] = '90'; +$config->testcase->datatable->fieldList['openedDate']['required'] = 'no'; + $config->testcase->datatable->fieldList['stage']['title'] = 'stage'; $config->testcase->datatable->fieldList['stage']['fixed'] = 'no'; $config->testcase->datatable->fieldList['stage']['width'] = '110'; @@ -132,20 +159,12 @@ $config->testcase->datatable->fieldList['keywords']['fixed'] = 'no'; $config->testcase->datatable->fieldList['keywords']['width'] = '100'; $config->testcase->datatable->fieldList['keywords']['required'] = 'no'; -$config->testcase->datatable->fieldList['assignedTo']['title'] = 'assignedTo'; -$config->testcase->datatable->fieldList['assignedTo']['fixed'] = 'no'; -$config->testcase->datatable->fieldList['assignedTo']['width'] = '90'; -$config->testcase->datatable->fieldList['assignedTo']['required'] = 'no'; - -$config->testcase->datatable->fieldList['openedBy']['title'] = 'openedByAB'; -$config->testcase->datatable->fieldList['openedBy']['fixed'] = 'no'; -$config->testcase->datatable->fieldList['openedBy']['width'] = '80'; -$config->testcase->datatable->fieldList['openedBy']['required'] = 'no'; - -$config->testcase->datatable->fieldList['openedDate']['title'] = 'openedDate'; -$config->testcase->datatable->fieldList['openedDate']['fixed'] = 'no'; -$config->testcase->datatable->fieldList['openedDate']['width'] = '90'; -$config->testcase->datatable->fieldList['openedDate']['required'] = 'no'; +$config->testcase->datatable->fieldList['story']['title'] = 'story'; +$config->testcase->datatable->fieldList['story']['fixed'] = 'no'; +$config->testcase->datatable->fieldList['story']['width'] = '90'; +$config->testcase->datatable->fieldList['story']['required'] = 'no'; +$config->testcase->datatable->fieldList['story']['control'] = 'select'; +$config->testcase->datatable->fieldList['story']['dataSource'] = array('module' => 'story', 'method' => 'getProductStoryPairs', 'params' => '$productID&$branch'); $config->testcase->datatable->fieldList['reviewedBy']['title'] = 'reviewedBy'; $config->testcase->datatable->fieldList['reviewedBy']['fixed'] = 'no'; @@ -162,28 +181,15 @@ $config->testcase->datatable->fieldList['lastRunner']['fixed'] = 'no'; $config->testcase->datatable->fieldList['lastRunner']['width'] = '70'; $config->testcase->datatable->fieldList['lastRunner']['required'] = 'no'; -$config->testcase->datatable->fieldList['lastRunDate']['title'] = 'lastRunDate'; -$config->testcase->datatable->fieldList['lastRunDate']['fixed'] = 'no'; -$config->testcase->datatable->fieldList['lastRunDate']['width'] = '90'; -$config->testcase->datatable->fieldList['lastRunDate']['required'] = 'no'; - $config->testcase->datatable->fieldList['lastRunResult']['title'] = 'lastRunResult'; $config->testcase->datatable->fieldList['lastRunResult']['fixed'] = 'no'; $config->testcase->datatable->fieldList['lastRunResult']['width'] = '70'; $config->testcase->datatable->fieldList['lastRunResult']['required'] = 'no'; -if($app->rawMethod == 'cases') -{ - $config->testcase->datatable->fieldList['status']['title'] = 'executionStatus'; - $config->testcase->datatable->fieldList['status']['width'] = '90'; -} -else -{ - $config->testcase->datatable->fieldList['status']['title'] = 'statusAB'; - $config->testcase->datatable->fieldList['status']['width'] = '70'; -} -$config->testcase->datatable->fieldList['status']['fixed'] = 'no'; -$config->testcase->datatable->fieldList['status']['required'] = 'no'; +$config->testcase->datatable->fieldList['lastRunDate']['title'] = 'lastRunDate'; +$config->testcase->datatable->fieldList['lastRunDate']['fixed'] = 'no'; +$config->testcase->datatable->fieldList['lastRunDate']['width'] = '90'; +$config->testcase->datatable->fieldList['lastRunDate']['required'] = 'no'; $config->testcase->datatable->fieldList['lastEditedBy']['title'] = 'lastEditedBy'; $config->testcase->datatable->fieldList['lastEditedBy']['fixed'] = 'no'; @@ -200,13 +206,6 @@ $config->testcase->datatable->fieldList['version']['fixed'] = 'no'; $config->testcase->datatable->fieldList['version']['width'] = '60'; $config->testcase->datatable->fieldList['version']['required'] = 'no'; -$config->testcase->datatable->fieldList['story']['title'] = 'story'; -$config->testcase->datatable->fieldList['story']['fixed'] = 'no'; -$config->testcase->datatable->fieldList['story']['width'] = '90'; -$config->testcase->datatable->fieldList['story']['required'] = 'no'; -$config->testcase->datatable->fieldList['story']['control'] = 'select'; -$config->testcase->datatable->fieldList['story']['dataSource'] = array('module' => 'story', 'method' => 'getProductStoryPairs', 'params' => '$productID&$branch'); - $config->testcase->datatable->fieldList['bugs']['title'] = 'B'; $config->testcase->datatable->fieldList['bugs']['fixed'] = 'no'; $config->testcase->datatable->fieldList['bugs']['width'] = '32'; diff --git a/module/testcase/lang/de.php b/module/testcase/lang/de.php index 5f1054d75a..19b7eb7620 100644 --- a/module/testcase/lang/de.php +++ b/module/testcase/lang/de.php @@ -31,9 +31,11 @@ $lang->testcase->precondition = 'Voraussetzungen'; $lang->testcase->pri = 'Priorität'; $lang->testcase->type = 'Type'; $lang->testcase->status = 'Status'; +$lang->testcase->statusAB = 'Status'; $lang->testcase->subStatus = 'Sub Status'; $lang->testcase->steps = 'Schritte'; $lang->testcase->openedBy = 'Ersteller'; +$lang->testcase->openedByAB = 'Reporter'; $lang->testcase->openedDate = 'Erstellt am'; $lang->testcase->lastEditedBy = 'Bearbeitet von'; $lang->testcase->result = 'Ergebnis'; diff --git a/module/testcase/lang/en.php b/module/testcase/lang/en.php index 445d89e0f7..6f0f6d4ea4 100644 --- a/module/testcase/lang/en.php +++ b/module/testcase/lang/en.php @@ -31,9 +31,11 @@ $lang->testcase->precondition = 'Prerequisite'; $lang->testcase->pri = 'Priority'; $lang->testcase->type = 'Type'; $lang->testcase->status = 'Status'; +$lang->testcase->statusAB = 'Status'; $lang->testcase->subStatus = 'Sub Status'; $lang->testcase->steps = 'Steps'; $lang->testcase->openedBy = 'CreatedBy'; +$lang->testcase->openedByAB = 'Reporter'; $lang->testcase->openedDate = 'CreatedDate'; $lang->testcase->lastEditedBy = 'EditedBy'; $lang->testcase->result = 'Result'; diff --git a/module/testcase/lang/fr.php b/module/testcase/lang/fr.php index 23033e3bf7..655b02debd 100644 --- a/module/testcase/lang/fr.php +++ b/module/testcase/lang/fr.php @@ -31,9 +31,11 @@ $lang->testcase->precondition = 'Prérequis'; $lang->testcase->pri = 'Priorité'; $lang->testcase->type = 'Type'; $lang->testcase->status = 'Statut'; +$lang->testcase->statusAB = 'Statut'; $lang->testcase->subStatus = 'Sous-statut'; $lang->testcase->steps = 'Etape'; $lang->testcase->openedBy = 'Créé par'; +$lang->testcase->openedByAB = 'Détecteur'; $lang->testcase->openedDate = 'Créé le'; $lang->testcase->lastEditedBy = 'Modifié par'; $lang->testcase->result = 'Résultat'; diff --git a/module/testcase/lang/zh-cn.php b/module/testcase/lang/zh-cn.php index a1135ae56d..03ba675e2d 100644 --- a/module/testcase/lang/zh-cn.php +++ b/module/testcase/lang/zh-cn.php @@ -31,9 +31,11 @@ $lang->testcase->precondition = '前置条件'; $lang->testcase->pri = '优先级'; $lang->testcase->type = '用例类型'; $lang->testcase->status = '用例状态'; +$lang->testcase->statusAB = '状态'; $lang->testcase->subStatus = '子状态'; $lang->testcase->steps = '用例步骤'; $lang->testcase->openedBy = '由谁创建'; +$lang->testcase->openedByAB = '创建者'; $lang->testcase->openedDate = '创建日期'; $lang->testcase->lastEditedBy = '最后修改者'; $lang->testcase->result = '测试结果'; diff --git a/module/testtask/config.php b/module/testtask/config.php index cf0394c7d4..d6cbc1425d 100644 --- a/module/testtask/config.php +++ b/module/testtask/config.php @@ -19,7 +19,7 @@ $config->testtask->editor->activate = array('id' => 'comment', 'tools' = $config->testtask->editor->importunitresult = array('id' => 'desc', 'tools' => 'simpleTools'); $config->testtask->datatable = new stdclass(); -$config->testtask->datatable->defaultField = array('id', 'pri', 'title', 'type', 'assignedTo', 'lastRunner', 'lastRunDate', 'lastRunResult', 'status', 'bugs', 'results', 'stepNumber','actions'); +$config->testtask->datatable->defaultField = array('id', 'title', 'pri', 'assignedTo', 'openedBy', 'lastRunner', 'lastRunDate', 'lastRunResult', 'actions'); $config->testtask->unitResultRules = new stdclass(); $config->testtask->unitResultRules->common = array('path' => array('testsuite/testcase', 'testcase'), 'name' => array('classname', 'name'), 'failure' => 'failure', 'skipped' => 'skipped', 'suite' => 'name', 'aliasSuite' => array('classname')); From e84a1925015de3268bd304bed0792ccf329ba623 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Thu, 29 Sep 2022 08:12:31 +0000 Subject: [PATCH 41/83] * Fix bug#28107. --- module/story/control.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module/story/control.php b/module/story/control.php index 3af6deb41d..d5b74f0ca0 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -421,7 +421,7 @@ class story extends control $this->view->mailto = $mailto; $this->view->blockID = $blockID; $this->view->URS = $storyType == 'story' ? $this->story->getRequirements($productID) : ''; - $this->view->needReview = ($this->app->user->account == $product->PO || $objectID > 0 || $this->config->story->needReview == 0) ? "checked='checked'" : ""; + $this->view->needReview = ($this->app->user->account == $product->PO or $objectID > 0 or $this->config->story->needReview == 0 or !$this->story->checkForceReview()) ? "checked='checked'" : ""; $this->view->type = $storyType; $this->display(); @@ -687,7 +687,7 @@ class story extends control $this->view->branch = $branch; $this->view->branches = $branches; /* When the user is product owner or add story in project or not set review, the default is not to review. */ - $this->view->needReview = ($this->app->user->account == $product->PO || $executionID > 0 || $this->config->story->needReview == 0) ? 0 : 1; + $this->view->needReview = ($this->app->user->account == $product->PO or $executionID > 0 or $this->config->story->needReview == 0 or !$this->story->checkForceReview()) ? 0 : 1; $this->view->forceReview = $this->story->checkForceReview(); $this->view->executionID = $executionID; @@ -1150,7 +1150,7 @@ class story extends control $this->view->title = $this->lang->story->change . "STORY" . $this->lang->colon . $this->view->story->title; $this->view->users = $this->user->getPairs('pofirst|nodeleted|noclosed', $this->view->story->assignedTo); $this->view->position[] = $this->lang->story->change; - $this->view->needReview = (($this->app->user->account == $this->view->product->PO or $this->config->story->needReview == 0) and empty($reviewer)) ? "checked='checked'" : ""; + $this->view->needReview = (($this->app->user->account == $this->view->product->PO or $this->config->story->needReview == 0 or !$this->story->checkForceReview()) and empty($reviewer)) ? "checked='checked'" : ""; $this->view->reviewer = implode(',', array_keys($reviewer)); $this->view->productReviewers = $this->user->getPairs('noclosed|nodeleted', $reviewer, 0, $productReviewers); @@ -1572,7 +1572,7 @@ class story extends control $this->view->actions = $this->action->getList('story', $storyID); $this->view->reviewers = $this->user->getPairs('noclosed|nodeleted', '', 0, $reviewers); $this->view->users = $this->user->getPairs('noclosed|noletter'); - $this->view->needReview = (($this->app->user->account == $product->PO || $this->config->story->needReview == 0) and empty($story->reviewer)) ? "checked='checked'" : ""; + $this->view->needReview = (($this->app->user->account == $product->PO or $this->config->story->needReview == 0 or !$this->story->checkForceReview()) and empty($story->reviewer)) ? "checked='checked'" : ""; $this->display(); } From 29dbb25855e0deefd8d0aa4178daa09a0376ce7a Mon Sep 17 00:00:00 2001 From: zenggang Date: Thu, 29 Sep 2022 08:13:34 +0000 Subject: [PATCH 42/83] * Adjust code --- module/bug/control.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 823129e4d2..14adcf78a4 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -1158,7 +1158,7 @@ class bug extends control $branch = $product->type == 'branch' ? ($bug->branch > 0 ? $bug->branch . ',0' : '0') : ''; $productBugs = $this->bug->getProductBugPairs($productID, $branch); - if(isset($productBugs[$bugID])) unset($productBugs[$bugID]); + unset($productBugs[$bugID]); $this->view->bug = $bug; $this->view->productID = $productID; @@ -1815,7 +1815,7 @@ class bug extends control $product = $this->loadModel('product')->getById($productID); $branch = $product->type == 'branch' ? ($bug->branch > 0 ? $bug->branch . ',0' : '0') : ''; $productBugs = $this->bug->getProductBugPairs($productID, $branch); - if(isset($productBugs[$bugID])) unset($productBugs[$bugID]); + unset($productBugs[$bugID]); $this->bug->checkBugExecutionPriv($bug); $this->qa->setMenu($this->products, $productID, $bug->branch); From 1ef99f0b1d3e4fe4292b79f417b60b8b2e5017ad Mon Sep 17 00:00:00 2001 From: wangzemei Date: Thu, 29 Sep 2022 16:16:54 +0800 Subject: [PATCH 43/83] * modify stopPropagation --- module/productplan/js/browse.js | 6 +++--- module/productplan/view/browsebylist.html.php | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/module/productplan/js/browse.js b/module/productplan/js/browse.js index d679c438e7..6f7053c196 100644 --- a/module/productplan/js/browse.js +++ b/module/productplan/js/browse.js @@ -99,9 +99,9 @@ $(function() { $.zui.ContextMenu.hide(); }); - - $('.project-popover').on('click', function() + $('.project-popover').on('click', function(e) { + e.stopPropagation(); var showPopover = $(this).next().css('display') == 'block'; $('.popover.right').hide(); if(!showPopover) $(this).next().show(); @@ -116,7 +116,7 @@ $(function() $(document).on('mousedown', function(e) { var $target = $(e.target); - var $toggle = $target.closest('.popover'); + var $toggle = $target.closest('.popover, .project-popover'); if(!$toggle.length) $('.popover.right').hide(); }); }); diff --git a/module/productplan/view/browsebylist.html.php b/module/productplan/view/browsebylist.html.php index 45aaaa7fa8..b98f20e17c 100644 --- a/module/productplan/view/browsebylist.html.php +++ b/module/productplan/view/browsebylist.html.php @@ -9,6 +9,9 @@ * @link https://www.zentao.net */ ?> +