From 57dd6eb716b268d20d6022abd4d5193154833aa9 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Fri, 30 Sep 2022 07:19:21 +0000 Subject: [PATCH 01/15] * Fix bug#26098. --- module/execution/css/manageproducts.css | 6 +++--- module/execution/view/manageproducts.html.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/module/execution/css/manageproducts.css b/module/execution/css/manageproducts.css index f7304b36c3..3be7a6cec0 100644 --- a/module/execution/css/manageproducts.css +++ b/module/execution/css/manageproducts.css @@ -4,6 +4,6 @@ #productsBox .product.checked:hover {background: #E5FFE6; border: 1px solid #229F24;} #productsBox .product .checkbox-primary {padding: 9px; cursor: pointer;} #productsBox .product.has-branch {padding-right: 40%;} -#productsBox .product.has-branch > .chosen-container {position: absolute; width: 40% !important; right: 3px; top: 3px;} -#productsBox .product.has-branch > .chosen-container > .chosen-single {background: rgba(0,0,0,.05);} -#productsBox .product.has-branch > .chosen-container > .chosen-single:hover {background: #fff;} +#productsBox .product.has-branch > .picker {position: absolute; width: 40% !important; right: 3px; top: 3px; background-color: unset;} +#productsBox .product.has-branch > .picker > .picker-selections {background: rgba(0,0,0,.05);} +#productsBox .product.has-branch > .picker > .picker-selections:hover {background: #fff;} diff --git a/module/execution/view/manageproducts.html.php b/module/execution/view/manageproducts.html.php index dbe1f2f567..6f34c579a6 100644 --- a/module/execution/view/manageproducts.html.php +++ b/module/execution/view/manageproducts.html.php @@ -39,7 +39,7 @@ ";?> - + @@ -64,7 +64,7 @@ ";?> - + @@ -88,7 +88,7 @@ ";?> - + From 0f9ee29fec40c22b643152d189d104223c5ccdb8 Mon Sep 17 00:00:00 2001 From: liuhong Date: Fri, 30 Sep 2022 07:20:17 +0000 Subject: [PATCH 02/15] *Fix bug #28214. --- module/execution/config.php | 8 ++++++++ module/execution/lang/de.php | 1 + module/execution/lang/en.php | 1 + module/execution/lang/fr.php | 1 + module/execution/lang/vi.php | 1 + module/execution/lang/zh-cn.php | 1 + module/execution/lang/zh-tw.php | 1 + module/execution/model.php | 19 +++++++++++++++++++ 8 files changed, 33 insertions(+) diff --git a/module/execution/config.php b/module/execution/config.php index e3faacb40e..c32e04c599 100644 --- a/module/execution/config.php +++ b/module/execution/config.php @@ -135,6 +135,7 @@ $config->execution->all->search['fields']['realEnd'] = $lang->execution-> $config->execution->all->search['fields']['closedBy'] = $lang->execution->closedBy; $config->execution->all->search['fields']['lastEditedDate'] = $lang->execution->lastEditedDate; $config->execution->all->search['fields']['closedDate'] = $lang->execution->closedDate; +$config->execution->all->search['fields']['teamCount'] = $lang->execution->teamCount; $config->execution->all->search['params']['name'] = array('operator' => 'include', 'control' => 'input', 'values' => ''); $config->execution->all->search['params']['id'] = array('operator' => '=', 'control' => 'input', 'values' => ''); @@ -150,6 +151,7 @@ $config->execution->all->search['params']['realEnd'] = array('operator' = $config->execution->all->search['params']['closedBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users'); $config->execution->all->search['params']['lastEditedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); $config->execution->all->search['params']['closedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); +$config->execution->all->search['params']['teamCount'] = array('operator' => '=', 'control' => 'input', 'values' => ''); $config->printKanban = new stdClass(); $config->printKanban->col['story'] = 1; @@ -255,6 +257,12 @@ $config->execution->datatable->fieldList['realEnd']['width'] = '90'; $config->execution->datatable->fieldList['realEnd']['required'] = 'no'; $config->execution->datatable->fieldList['realEnd']['sort'] = 'no'; +$config->execution->datatable->fieldList['teamCount']['title'] = 'teamCount'; +$config->execution->datatable->fieldList['teamCount']['fixed'] = 'no'; +$config->execution->datatable->fieldList['teamCount']['width'] = '80'; +$config->execution->datatable->fieldList['teamCount']['required'] = 'no'; +$config->execution->datatable->fieldList['teamCount']['sort'] = 'no'; + $config->execution->datatable->fieldList['estimate']['title'] = 'estimate'; $config->execution->datatable->fieldList['estimate']['fixed'] = 'no'; $config->execution->datatable->fieldList['estimate']['width'] = '70'; diff --git a/module/execution/lang/de.php b/module/execution/lang/de.php index 9c88536042..de9321ad5f 100644 --- a/module/execution/lang/de.php +++ b/module/execution/lang/de.php @@ -54,6 +54,7 @@ $lang->execution->end = 'Ende'; $lang->execution->dateRange = 'Dauer'; $lang->execution->realBeganAB = 'Actual Begin'; $lang->execution->realEndAB = 'Actual End'; +$lang->execution->teamCount = 'Anzahl der Personen'; $lang->execution->realBegan = 'Tatsächlicher Start'; $lang->execution->realEnd = 'Tatsächliches Ende'; $lang->execution->to = 'An'; diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index e5cfcf3eeb..b85b3635f2 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -54,6 +54,7 @@ $lang->execution->end = 'Planned End'; $lang->execution->dateRange = 'Plan Duration'; $lang->execution->realBeganAB = 'Actual Begin'; $lang->execution->realEndAB = 'Actual End'; +$lang->execution->teamCount = 'number of people'; $lang->execution->realBegan = 'Actual Begin'; $lang->execution->realEnd = 'Actual End'; $lang->execution->to = 'To'; diff --git a/module/execution/lang/fr.php b/module/execution/lang/fr.php index 6764593377..30283cd12a 100644 --- a/module/execution/lang/fr.php +++ b/module/execution/lang/fr.php @@ -54,6 +54,7 @@ $lang->execution->end = 'Fin'; $lang->execution->dateRange = 'Durée'; $lang->execution->realBeganAB = 'Actual Begin'; $lang->execution->realEndAB = 'Actual End'; +$lang->execution->teamCount = 'nombre de personnes'; $lang->execution->realBegan = 'Début effectif'; $lang->execution->realEnd = 'Clôture effective'; $lang->execution->to = 'à'; diff --git a/module/execution/lang/vi.php b/module/execution/lang/vi.php index 5031004d73..e13b1a4eca 100644 --- a/module/execution/lang/vi.php +++ b/module/execution/lang/vi.php @@ -54,6 +54,7 @@ $lang->execution->RD = 'Quản lý phát hành'; $lang->execution->release = 'Phát hành'; $lang->execution->acl = 'Quyền truy cập'; $lang->execution->teamname = 'Tên đội nhóm'; +$lang->execution->teamCount = 'số người'; $lang->execution->order = "Đánh giá {$lang->executionCommon}"; $lang->execution->orderAB = "Đánh giá"; $lang->execution->products = "Liên kết {$lang->productCommon}"; diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index 5d3bd56de2..479d165527 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -54,6 +54,7 @@ $lang->execution->end = '计划完成'; $lang->execution->dateRange = '计划起止日期'; $lang->execution->realBeganAB = '实际开始'; $lang->execution->realEndAB = '实际完成'; +$lang->execution->teamCount = '人数'; $lang->execution->realBegan = '实际开始日期'; $lang->execution->realEnd = '实际完成日期'; $lang->execution->to = '至'; diff --git a/module/execution/lang/zh-tw.php b/module/execution/lang/zh-tw.php index 1c06be7dd3..2eb28b233b 100644 --- a/module/execution/lang/zh-tw.php +++ b/module/execution/lang/zh-tw.php @@ -54,6 +54,7 @@ $lang->execution->execPM = "{$lang->execution->common}負責人"; $lang->execution->QD = '測試負責人'; $lang->execution->RD = '發佈負責人'; $lang->execution->release = '發佈'; +$lang->execution->teamCount = '人數'; $lang->execution->acl = '訪問控制'; $lang->execution->teamname = '團隊名稱'; $lang->execution->updateOrder = '排序'; diff --git a/module/execution/model.php b/module/execution/model.php index c8eb61f0ed..f98a19d950 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -1531,6 +1531,15 @@ class executionModel extends model $hours = $this->loadModel('project')->computerProgress($executions); $burns = $this->getBurnData($executions); + /* Get the number of execution teams. */ + $teams = $this->dao->select('t1.root,count(t1.id) as teams')->from(TABLE_TEAM)->alias('t1') + ->leftJoin(TABLE_USER)->alias('t2')->on('t1.account=t2.account') + ->where('t1.root')->in(array_keys($executions)) + ->andWhere('t1.type')->ne('project') + ->andWhere('t2.deleted')->eq(0) + ->groupBy('t1.root') + ->fetchAll('root'); + if($withTasks) $executionTasks = $this->getTaskGroupByExecution(array_keys($executions)); /* Process executions. */ @@ -1557,6 +1566,7 @@ class executionModel extends model /* Process the hours. */ $execution->hours = isset($hours[$execution->id]) ? $hours[$execution->id] : (object)$emptyHour; + $execution->teamCount = isset($teams[$execution->id]) ? $teams[$execution->id]->teams : 0; if(isset($executionTasks) and isset($executionTasks[$execution->id])) { @@ -4841,6 +4851,12 @@ class executionModel extends model if(!empty($execution->children)) $class .= ' has-child'; } + if($id == 'teamCount') + { + $title = " title='{$execution->teamCount}'"; + $class .= ' text-right'; + } + if($id == 'project') $title = " title='{$execution->projectName}'"; if($id == 'code') $title = " title='{$execution->code}'"; @@ -4909,6 +4925,9 @@ class executionModel extends model case 'begin': echo helper::isZeroDate($execution->begin) ? '' : $execution->begin; break; + case 'teamCount': + echo $execution->teamCount; + break; case 'end': echo helper::isZeroDate($execution->end) ? '' : $execution->end; break; From f8c9dad863bc0c51b47ad010722074233f10b6b4 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Fri, 30 Sep 2022 07:28:48 +0000 Subject: [PATCH 03/15] * Fix bug#26061. --- module/testsuite/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/testsuite/control.php b/module/testsuite/control.php index 91739e1c81..f1db7cad12 100644 --- a/module/testsuite/control.php +++ b/module/testsuite/control.php @@ -323,7 +323,7 @@ class testsuite extends control /* Build the search form. */ $this->loadModel('testcase'); - $this->config->testcase->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($productID, $viewType = 'case'); + $this->config->testcase->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($productID, $viewType = 'case', 0, 'all'); $this->config->testcase->search['module'] = 'testsuite'; $this->config->testcase->search['actionURL'] = inlink('linkCase', "suiteID=$suiteID¶m=myQueryID"); unset($this->config->testcase->search['fields']['product']); From fa00ebf9f5abca79e53f69fc244b0677f097ca3e Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Sat, 8 Oct 2022 01:05:13 +0000 Subject: [PATCH 04/15] * Fix bug #28265. --- module/release/control.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/module/release/control.php b/module/release/control.php index 4bc2e24adf..703873896b 100644 --- a/module/release/control.php +++ b/module/release/control.php @@ -245,6 +245,14 @@ class release extends control $this->view->storyPager = $storyPager; $this->view->bugPager = $bugPager; $this->view->leftBugPager = $leftBugPager; + + if($this->app->getViewType() == 'json') + { + unset($this->view->storyPager); + unset($this->view->bugPager); + unset($this->view->leftBugPager); + } + $this->display(); } From 78b8da1ba83457c585029b422c9e0f95d677d9d4 Mon Sep 17 00:00:00 2001 From: zenggang Date: Sat, 8 Oct 2022 08:09:12 +0000 Subject: [PATCH 05/15] * Fix bug#28268 --- module/port/view/footer.html.php | 4 ++-- module/story/js/edit.js | 13 ++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/module/port/view/footer.html.php b/module/port/view/footer.html.php index 38c6c2541d..6281292949 100644 --- a/module/port/view/footer.html.php +++ b/module/port/view/footer.html.php @@ -5,7 +5,7 @@ $.get(createLink('port', 'ajaxGetTbody','model=&lastID=0&pag $('#showData > tbody').append(data); if($('#showData tbody').find('tr').hasClass('showmore') === false) $('#showData tfoot').removeClass('hidden'); $('#showData tbody').find('.picker-select').picker({chosenMode: true}); - $('.form-date').datetimepicker('update'); + $('.form-date').datetimepicker({minView: 2, format: "yyyy-mm-dd"}); $('.form-datetime').datetimepicker('update'); $('#showData > tbody').removeClass('load-indicator loading'); }) @@ -37,7 +37,7 @@ function loadData($showmore) $showmore.after(data); if($('#showData tbody').find('tr').hasClass('showmore') === false) $('#showData tfoot').removeClass('hidden'); $('#showData tbody').find('.picker-select').picker({chosenMode: true}).removeClass('nopicker'); - $('.form-date').datetimepicker('update'); + $('.form-date').datetimepicker({minView: 2, format: "yyyy-mm-dd"}); $('.form-datetime').datetimepicker('update'); }) } diff --git a/module/story/js/edit.js b/module/story/js/edit.js index 7e1c65d088..d81afca352 100644 --- a/module/story/js/edit.js +++ b/module/story/js/edit.js @@ -80,10 +80,13 @@ $(function() modalTrigger.show(); }); - $('#duplicateStory').picker( + if($('#duplicateStory').length > 0) { - disableEmptySearch : true, - dropWidth : 'auto', - maxAutoDropWidth : document.body.scrollWidth + document.getElementById('duplicateStory').offsetWidth - document.getElementById('duplicateStoryBox').getBoundingClientRect().right - }); + $('#duplicateStory').picker( + { + disableEmptySearch : true, + dropWidth : 'auto', + maxAutoDropWidth : document.body.scrollWidth + document.getElementById('duplicateStory').offsetWidth - document.getElementById('duplicateStoryBox').getBoundingClientRect().right + }); + } }) From 162c12800b93a7df0b8c6ebf29b60a4b181f0a16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E5=BB=B6=E4=B9=89?= Date: Sun, 9 Oct 2022 09:36:13 +0800 Subject: [PATCH 06/15] * Finish task #71886. --- config/filter.php | 18 ++++++++------- module/execution/control.php | 1 + module/execution/js/all.js | 36 ++++++++++++++++++++++++++++++ module/execution/view/all.html.php | 5 +++-- 4 files changed, 50 insertions(+), 10 deletions(-) diff --git a/config/filter.php b/config/filter.php index 89ee1296f0..c700ab2094 100755 --- a/config/filter.php +++ b/config/filter.php @@ -172,6 +172,7 @@ $filter->tree->browse = new stdclass(); $filter->productplan->browse = new stdclass(); $filter->kanban->space = new stdclass(); $filter->execution->kanban = new stdclass(); +$filter->execution->all = new stdclass(); $filter->index->index->get['open'] = 'reg::base64'; @@ -300,14 +301,15 @@ $filter->productplan->browse->cookie['viewType'] = 'code'; $filter->task->create->cookie['lastTaskModule'] = 'int'; $filter->task->export->cookie['checkedItem'] = 'reg::checked'; -$filter->execution->default->cookie['kanbanview'] = 'code'; -$filter->execution->story->cookie['storyPreExecutionID'] = 'int'; -$filter->execution->story->cookie['storyModuleParam'] = 'int'; -$filter->execution->story->cookie['storyProductParam'] = 'int'; -$filter->execution->story->cookie['storyBranchParam'] = 'int'; -$filter->execution->story->cookie['executionStoryOrder'] = 'code'; -$filter->execution->export->cookie['checkedItem'] = 'reg::checked'; -$filter->execution->kanban->cookie['taskToOpen'] = 'int'; +$filter->execution->default->cookie['kanbanview'] = 'code'; +$filter->execution->story->cookie['storyPreExecutionID'] = 'int'; +$filter->execution->story->cookie['storyModuleParam'] = 'int'; +$filter->execution->story->cookie['storyProductParam'] = 'int'; +$filter->execution->story->cookie['storyBranchParam'] = 'int'; +$filter->execution->story->cookie['executionStoryOrder'] = 'code'; +$filter->execution->export->cookie['checkedItem'] = 'reg::checked'; +$filter->execution->kanban->cookie['taskToOpen'] = 'int'; +$filter->execution->all->cookie['showExecutionBatchEdit'] = 'int'; $filter->testcase->browse->cookie['caseModule'] = 'int'; $filter->testcase->browse->cookie['caseSuite'] = 'int'; diff --git a/module/execution/control.php b/module/execution/control.php index efc0e4a767..5d92d3ed7e 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -3760,6 +3760,7 @@ class execution extends control $this->view->from = $from; $this->view->param = $param; $this->view->isStage = (isset($project->model) and $project->model == 'waterfall') ? true : false; + $this->view->showBatchEdit = $this->cookie->showExecutionBatchEdit; $this->display(); } diff --git a/module/execution/js/all.js b/module/execution/js/all.js index 7d52829c0b..09f2fd3767 100644 --- a/module/execution/js/all.js +++ b/module/execution/js/all.js @@ -79,9 +79,45 @@ $(function() }); } }) + + $('input[name^="showEdit"]').click(function() + { + $.cookie('showExecutionBatchEdit', $(this).is(':checked') ? 1 : 0, {expires: config.cookieLife, path: config.webRoot}); + setCheckbox(); + }); + setCheckbox(); + + $('#executionTableList tr').on('click', function(e) + { + if($.cookie('showExecutionBatchEdit') != 1) e.stopPropagation(); + }); }); +/** + * Location to product list. + * + * @param int productID + * @param int projectID + * @param string status + * @access public + * @return void + */ function byProduct(productID, projectID, status) { location.href = createLink('project', 'all', "status=" + status + "&project=" + projectID + "&orderBy=" + orderBy + '&productID=' + productID); } + +/** + * Set batch edit checkbox. + * + * @access public + * @return void + */ +function setCheckbox() +{ + $('#executionsForm .checkbox-primary').hide(); + $('.check-all, .sortable tr').removeClass('checked'); + $(":checkbox[name^='executionIDList']").prop('checked', false); + $('#executionsForm').removeClass('has-row-checked'); + if($.cookie('showExecutionBatchEdit') == 1) $('#executionsForm .checkbox-primary').show(); +} diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php index 715cf14aae..4b86eb16ac 100644 --- a/module/execution/view/all.html.php +++ b/module/execution/view/all.html.php @@ -25,8 +25,9 @@ js::set('unfoldAll', $lang->execution->treeLevel['all']); js::set('foldAll', $lang->execution->treeLevel['root']); js::set('isCNLang', !$this->loadModel('common')->checkNotCN()) ?> + diff --git a/module/project/css/execution.css b/module/project/css/execution.css index 41848ea166..b28fcb4440 100644 --- a/module/project/css/execution.css +++ b/module/project/css/execution.css @@ -10,3 +10,5 @@ th.table-nest-title .check-all {position: absolute; left: 15px; top: 7px;} .c-date {text-align: center;} #executionTableList > tr:not(.has-nest-child) .table-nest-toggle {display: none;} #executionTableList > tr:not(.has-nest-child) .project-type-label {margin-left: 22px;} +.table-statistic {padding-left: 10px;} +#executionTableList .table-nest-icon {top: 6px;} diff --git a/module/project/js/execution.js b/module/project/js/execution.js index 9e037beeb9..5ebe1941b8 100644 --- a/module/project/js/execution.js +++ b/module/project/js/execution.js @@ -1,5 +1,7 @@ $(function() { + $("#" + status + "Tab").addClass('btn-active-text'); + $('input[name^="showTask"]').click(function() { var show = $(this).is(':checked') ? 1 : 0; @@ -38,14 +40,10 @@ $(function() } if(notCheckedLength > 0) $('#executionForm .checkAll').prop('checked', false); - var summary = checkedExecutions.replace('%s', checkedLength); - if(cilentLang == "en" && checkedLength < 2) summary = summary.replace('items', 'item'); - var statistic = "
" + summary + "
"; if(checkedLength > 0) { $('#executionSummary').addClass('hidden'); $('#executionsSummary').remove(); - $('.editCheckbox').after(statistic); } else { @@ -63,12 +61,8 @@ $(function() $("#executionForm .checkAll").prop('checked', true); $('#executionForm').addClass('has-row-checked'); var checkedLength = $(":checkbox[name^='executionIDList']:checked").length; - var summary = checkedExecutions.replace('%s', checkedLength); - if(cilentLang == "en" && checkedLength < 2) summary = summary.replace('items', 'item'); - var statistic = "
" + summary + "
"; $('#executionSummary').addClass('hidden'); $('#executionsSummary').remove(); - $('.editCheckbox').after(statistic); $(this).next('label').addClass('hover'); } else @@ -91,6 +85,37 @@ $(function() }); $('#executionsForm .checkAll').prop('checked', false); }, 10); + + // Update table summary text + $('#executionForm').table( + { + statisticCreator: function(table) + { + var $table = table.getTable(); + var $checkedRows = $table.find(table.isDataTable ? '.datatable-row-left.checked' : 'tbody>tr.checked'); + var $originTable = table.isDataTable ? table.$.find('.datatable-origin') : null; + var checkedTotal = $checkedRows.length; + var $rows = checkedTotal ? $checkedRows : $table.find(table.isDataTable ? '.datatable-rows .datatable-row-left' : 'tbody>tr'); + + var checkedWait = 0; + var checkedDoing = 0; + var executionIDList = []; + $rows.each(function() + { + var $row = $(this); + if ($originTable) $row = $originTable.find('tbody>tr[data-id="' + $row.data('id') + '"]'); + + var data = $row.data(); + executionIDList.push(data.id); + + if(data.status === 'wait') checkedWait++; + if(data.status === 'doing') checkedDoing++; + }); + + if(status != 'all') return (checkedTotal ? checkedExecutions : executionSummary).replace('%s', $rows.length); + return (checkedTotal ? checkedSummary : pageSummary).replace('%total%', $rows.length).replace('%wait%', checkedWait).replace('%doing%', checkedDoing); + } + }) }) window.addEventListener('scroll', this.handleScroll) diff --git a/module/project/view/execution.html.php b/module/project/view/execution.html.php index f63268a42f..a3c52ed861 100644 --- a/module/project/view/execution.html.php +++ b/module/project/view/execution.html.php @@ -8,6 +8,10 @@ project->disabledInputTip, $lang->edit . $lang->executionCommon));?> edit . $lang->executionCommon);?> project->disabledInputTip, $lang->programplan->stageCustom->task));?> +execution->checkedExecSummary);?> +execution->pageExecSummary);?> +execution->executionSummary);?> +execution->checkedExecutions);?>