From e100ad058c5bc38e5026565d7b0820827b499d11 Mon Sep 17 00:00:00 2001 From: wangyuting <851424971@qq.com> Date: Thu, 1 Dec 2022 09:03:16 +0000 Subject: [PATCH 01/11] * Fix bug. --- module/project/control.php | 4 +--- module/project/view/build.html.php | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/module/project/control.php b/module/project/control.php index 067259fdd9..f742d6eb9c 100755 --- a/module/project/control.php +++ b/module/project/control.php @@ -1427,7 +1427,6 @@ class project extends control $queryID = ($type == 'bysearch') ? (int)$param : 0; $actionURL = $this->createLink('project', 'build', "projectID=$projectID&type=bysearch&queryID=myQueryID"); - $allExecutions = $this->loadModel('execution')->getByProject($projectID, 'all', '', true); $devel = $project->model == 'waterfall' ? true : false; $executions = $this->loadModel('execution')->getByProject($projectID, 'all', '', true, $devel); $this->config->build->search['fields']['execution'] = $this->project->lang->executionCommon; @@ -1488,8 +1487,7 @@ class project extends control $this->view->projectID = $projectID; $this->view->project = $project; $this->view->products = $products; - $this->view->allExecutions = $allExecutions; - $this->view->executions = $executions; + $this->view->executions = $this->execution->getPairs(); $this->view->buildPairs = $this->loadModel('build')->getBuildPairs(0); $this->view->type = $type; diff --git a/module/project/view/build.html.php b/module/project/view/build.html.php index 6c5358032b..e38be60903 100644 --- a/module/project/view/build.html.php +++ b/module/project/view/build.html.php @@ -11,8 +11,6 @@ */ ?> - - project->noDevStage)?> project->createExecution)?> @@ -91,7 +89,7 @@ - +
From 59c7949f9aedff4a00dbe6b65baea9b53ddd4d29 Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Fri, 2 Dec 2022 09:53:03 +0800 Subject: [PATCH 02/11] change copyproject to copyProject --- module/project/lang/de.php | 10 +++++----- module/project/lang/en.php | 10 +++++----- module/project/lang/fr.php | 10 +++++----- module/project/lang/zh-cn.php | 10 +++++----- module/project/view/create.html.php | 8 ++++---- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/module/project/lang/de.php b/module/project/lang/de.php index fa0ecdf414..e40046ff4f 100644 --- a/module/project/lang/de.php +++ b/module/project/lang/de.php @@ -375,8 +375,8 @@ $lang->project->action->managed = '$date, managed by $actor. $e $lang->project->multiple = "Multi {$lang->executionCommon}"; -$lang->project->copyproject = new stdClass(); -$lang->project->copyproject->nameTips = '『Project Name』Cannot be repeated.'; -$lang->project->copyproject->codeTips = '『Project Code』Cannot be repeated.'; -$lang->project->copyproject->endTips = '『Schedule End』Cannot be empty.'; -$lang->project->copyproject->daysTips = '『Available working days』Should be numerical.'; \ No newline at end of file +$lang->project->copyProject = new stdClass(); +$lang->project->copyProject->nameTips = '『Project Name』Cannot be repeated.'; +$lang->project->copyProject->codeTips = '『Project Code』Cannot be repeated.'; +$lang->project->copyProject->endTips = '『Schedule End』Cannot be empty.'; +$lang->project->copyProject->daysTips = '『Available working days』Should be numerical.'; \ No newline at end of file diff --git a/module/project/lang/en.php b/module/project/lang/en.php index bb0cd04d43..d8d7ca0258 100644 --- a/module/project/lang/en.php +++ b/module/project/lang/en.php @@ -375,8 +375,8 @@ $lang->project->action->managed = '$date, managed by $actor. $e $lang->project->multiple = "Multi {$lang->executionCommon}"; -$lang->project->copyproject = new stdClass(); -$lang->project->copyproject->nameTips = '『Project Name』Cannot be repeated.'; -$lang->project->copyproject->codeTips = '『Project Code』Cannot be repeated.'; -$lang->project->copyproject->endTips = '『Schedule End』Cannot be empty.'; -$lang->project->copyproject->daysTips = '『Available working days』Should be numerical.'; \ No newline at end of file +$lang->project->copyProject = new stdClass(); +$lang->project->copyProject->nameTips = '『Project Name』Cannot be repeated.'; +$lang->project->copyProject->codeTips = '『Project Code』Cannot be repeated.'; +$lang->project->copyProject->endTips = '『Schedule End』Cannot be empty.'; +$lang->project->copyProject->daysTips = '『Available working days』Should be numerical.'; \ No newline at end of file diff --git a/module/project/lang/fr.php b/module/project/lang/fr.php index 90593cf170..bbb06e432f 100644 --- a/module/project/lang/fr.php +++ b/module/project/lang/fr.php @@ -375,8 +375,8 @@ $lang->project->action->managed = '$date, managed by $actor. $e $lang->project->multiple = "Multi {$lang->executionCommon}"; -$lang->project->copyproject = new stdClass(); -$lang->project->copyproject->nameTips = '『Project Name』Cannot be repeated.'; -$lang->project->copyproject->codeTips = '『Project Code』Cannot be repeated.'; -$lang->project->copyproject->endTips = '『Schedule End』Cannot be empty.'; -$lang->project->copyproject->daysTips = '『Available working days』Should be numerical.'; \ No newline at end of file +$lang->project->copyProject = new stdClass(); +$lang->project->copyProject->nameTips = '『Project Name』Cannot be repeated.'; +$lang->project->copyProject->codeTips = '『Project Code』Cannot be repeated.'; +$lang->project->copyProject->endTips = '『Schedule End』Cannot be empty.'; +$lang->project->copyProject->daysTips = '『Available working days』Should be numerical.'; \ No newline at end of file diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php index 531acbdefb..e8f21c9b32 100644 --- a/module/project/lang/zh-cn.php +++ b/module/project/lang/zh-cn.php @@ -375,8 +375,8 @@ $lang->project->action->managed = '$date, 由 $actor 维护。$ $lang->project->multiple = "启用{$lang->executionCommon}"; -$lang->project->copyproject = new stdClass(); -$lang->project->copyproject->nameTips = '『项目名称』不可重复需要修改。'; -$lang->project->copyproject->codeTips = '『项目代号』不可重复需要修改。'; -$lang->project->copyproject->endTips = '『计划完成』不能为空。'; -$lang->project->copyproject->daysTips = '『可用工作日』应当是数字。'; \ No newline at end of file +$lang->project->copyProject = new stdClass(); +$lang->project->copyProject->nameTips = '『项目名称』不可重复需要修改。'; +$lang->project->copyProject->codeTips = '『项目代号』不可重复需要修改。'; +$lang->project->copyProject->endTips = '『计划完成』不能为空。'; +$lang->project->copyProject->daysTips = '『可用工作日』应当是数字。'; \ No newline at end of file diff --git a/module/project/view/create.html.php b/module/project/view/create.html.php index 6a90207c3b..c10995d240 100755 --- a/module/project/view/create.html.php +++ b/module/project/view/create.html.php @@ -36,10 +36,10 @@ project->create->requiredFields;?> -project->copyproject->nameTips);?> -project->copyproject->codeTips);?> -project->copyproject->endTips);?> -project->copyproject->daysTips);?> +project->copyProject->nameTips);?> +project->copyProject->codeTips);?> +project->copyProject->endTips);?> +project->copyProject->daysTips);?>
From 2b66d5d5ca121d17189a8a2dab0c0faff195d41d Mon Sep 17 00:00:00 2001 From: zenggang Date: Fri, 2 Dec 2022 05:32:33 +0000 Subject: [PATCH 03/11] * Fix bug#30470 --- module/execution/model.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index 1e83956238..ed66a03b88 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -5189,6 +5189,7 @@ class executionModel extends model $_POST = array(); $_POST['project'] = $projectID; $_POST['name'] = $project->name; + $_POST['code'] = $project->code; $_POST['begin'] = $project->begin; $_POST['end'] = $project->end; $_POST['realBegan'] = $project->realBegan; @@ -5202,8 +5203,6 @@ class executionModel extends model $_POST['status'] = $project->status; $_POST['acl'] = 'open'; - if(!empty($_POST['code'])) $_POST['code'] = $project->code; - $projectProducts = $this->dao->select('*')->from(TABLE_PROJECTPRODUCT)->where('project')->eq($projectID)->fetchAll(); foreach($projectProducts as $projectProduct) { From 15aecd0bf9ddb4cb05eec656c2869c0bf059f550 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 2 Dec 2022 14:54:59 +0800 Subject: [PATCH 04/11] * fix bug #30506. --- module/report/model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/report/model.php b/module/report/model.php index 7d4f9d220c..d25d4b0978 100644 --- a/module/report/model.php +++ b/module/report/model.php @@ -698,6 +698,7 @@ class reportModel extends model { $effort = $this->dao->select('count(*) as count, sum(consumed) as consumed')->from(TABLE_EFFORT) ->where('LEFT(date, 4)')->eq($year) + ->andWhere('deleted')->eq(0) ->beginIF($accounts)->andWhere('account')->in($accounts)->fi() ->fetch(); From 90c061cb40df4cab7a56c3f8a335eb8f5ab8b180 Mon Sep 17 00:00:00 2001 From: Lufei Date: Fri, 2 Dec 2022 15:07:22 +0800 Subject: [PATCH 05/11] * Change report bug lang. --- module/misc/lang/de.php | 2 +- module/misc/lang/en.php | 2 +- module/misc/lang/fr.php | 2 +- module/misc/lang/zh-cn.php | 2 +- module/misc/lang/zh-tw.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/module/misc/lang/de.php b/module/misc/lang/de.php index 620c0d9f9d..15242cc32a 100644 --- a/module/misc/lang/de.php +++ b/module/misc/lang/de.php @@ -42,7 +42,7 @@ $lang->misc->zentao->support['ask'] = "Official Answer"; $lang->misc->zentao->support['video'] = "Use Video"; $lang->misc->zentao->support['qqgroup'] = "Official QQ Group"; -$lang->misc->zentao->cowin['reportbug'] = "Bug melden "; +$lang->misc->zentao->cowin['reportbug'] = "Report Bug"; $lang->misc->zentao->cowin['feedback'] = "Feedback"; $lang->misc->zentao->cowin['recommend'] = "More"; diff --git a/module/misc/lang/en.php b/module/misc/lang/en.php index 98b516bad7..9ace3c33ea 100644 --- a/module/misc/lang/en.php +++ b/module/misc/lang/en.php @@ -42,7 +42,7 @@ $lang->misc->zentao->support['ask'] = "Official Answer"; $lang->misc->zentao->support['video'] = "Use Video"; $lang->misc->zentao->support['qqgroup'] = "Official QQ Group"; -$lang->misc->zentao->cowin['reportbug'] = "Report Bug "; +$lang->misc->zentao->cowin['reportbug'] = "Report Bug"; $lang->misc->zentao->cowin['feedback'] = "Feedback"; $lang->misc->zentao->cowin['recommend'] = "More"; diff --git a/module/misc/lang/fr.php b/module/misc/lang/fr.php index 6ad3cd0fa1..2792a3ce78 100644 --- a/module/misc/lang/fr.php +++ b/module/misc/lang/fr.php @@ -42,7 +42,7 @@ $lang->misc->zentao->support['ask'] = "Official Answer"; $lang->misc->zentao->support['video'] = "Use Video"; $lang->misc->zentao->support['qqgroup'] = "Official QQ Group"; -$lang->misc->zentao->cowin['reportbug'] = "Signaler un Bug"; +$lang->misc->zentao->cowin['reportbug'] = "Report Bug"; $lang->misc->zentao->cowin['feedback'] = "Feedback"; $lang->misc->zentao->cowin['recommend'] = "Plus..."; diff --git a/module/misc/lang/zh-cn.php b/module/misc/lang/zh-cn.php index 45a270c7ea..c235c42d89 100644 --- a/module/misc/lang/zh-cn.php +++ b/module/misc/lang/zh-cn.php @@ -42,7 +42,7 @@ $lang->misc->zentao->support['ask'] = "官方问答"; $lang->misc->zentao->support['video'] = "使用视频"; $lang->misc->zentao->support['qqgroup'] = "官方QQ群"; -$lang->misc->zentao->cowin['reportbug'] = "汇报Bug"; +$lang->misc->zentao->cowin['reportbug'] = "反馈Bug"; $lang->misc->zentao->cowin['feedback'] = "反馈需求"; $lang->misc->zentao->cowin['recommend'] = "推荐给朋友"; diff --git a/module/misc/lang/zh-tw.php b/module/misc/lang/zh-tw.php index 3daf3d5f61..2d9a8e5707 100644 --- a/module/misc/lang/zh-tw.php +++ b/module/misc/lang/zh-tw.php @@ -40,7 +40,7 @@ $lang->misc->zentao->support['ask'] = "官方問答"; $lang->misc->zentao->support['video'] = "使用視頻"; $lang->misc->zentao->support['qqgroup'] = "官方QQ群"; -$lang->misc->zentao->cowin['reportbug'] = "彙報Bug"; +$lang->misc->zentao->cowin['reportbug'] = "反饋Bug"; $lang->misc->zentao->cowin['feedback'] = "反饋需求"; $lang->misc->zentao->cowin['translate'] = "參與翻譯"; $lang->misc->zentao->cowin['recommend'] = "推薦給朋友"; From 82948abf2b1002a97364f7b994630ed102b688d3 Mon Sep 17 00:00:00 2001 From: zenggang Date: Fri, 2 Dec 2022 07:20:59 +0000 Subject: [PATCH 06/11] * Fix bug#25845 --- module/doc/view/browse.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/doc/view/browse.html.php b/module/doc/view/browse.html.php index 0a22344249..16d5112f47 100644 --- a/module/doc/view/browse.html.php +++ b/module/doc/view/browse.html.php @@ -84,7 +84,7 @@ id&objectType=doc");?>" title="" class='btn btn-link ajaxCollect'> - id&comment=false", "", '', "title='{$lang->edit}' class='btn btn-link iframe'", true, true)?> + id&comment=false", "", '', "title='{$lang->edit}' class='btn btn-link'", true, false)?> id&confirm=no", "", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?> From 099eaa8a5ec57576827ac22975ad68e027367e65 Mon Sep 17 00:00:00 2001 From: wangyuting <851424971@qq.com> Date: Fri, 2 Dec 2022 07:43:05 +0000 Subject: [PATCH 07/11] * Finish task #78357. --- module/project/view/build.html.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module/project/view/build.html.php b/module/project/view/build.html.php index e38be60903..5aba3338ab 100644 --- a/module/project/view/build.html.php +++ b/module/project/view/build.html.php @@ -48,7 +48,7 @@ build->id;?> - build->name;?> + build->name;?> hasProduct):?> build->product;?> @@ -69,11 +69,11 @@ id"), sprintf('%03d', $build->id), '', "data-app='project'");?> - execution):?> - - branchName) echo "{$build->branchName}"?> createLink($module, 'view', "buildID=$build->id"), $build->name, '', "data-app='project'");?> + execution):?> + + hasProduct):?> productName;?> From 14ea643f619d78e9594e4d670a03d989e4081312 Mon Sep 17 00:00:00 2001 From: daitingting Date: Fri, 2 Dec 2022 08:03:37 +0000 Subject: [PATCH 08/11] * Finish task #78361,#78362. --- module/bug/js/common.js | 2 +- module/bug/view/activate.html.php | 2 +- module/bug/view/batchcreate.html.php | 2 +- module/bug/view/browse.html.php | 2 +- module/bug/view/create.html.php | 2 +- module/bug/view/edit.html.php | 2 +- module/bug/view/resolve.html.php | 2 +- module/build/lang/de.php | 2 +- module/build/lang/en.php | 2 +- module/build/lang/fr.php | 2 +- module/build/lang/zh-cn.php | 2 +- module/build/model.php | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/module/bug/js/common.js b/module/bug/js/common.js index 0c74f79a6f..3cf0a2ac8b 100644 --- a/module/bug/js/common.js +++ b/module/bug/js/common.js @@ -35,7 +35,7 @@ function markReleasedBuilds($option) if(!$option.find('.label-released').length) { var optionText = $option.find('.picker-option-text').html(); - $option.find('.picker-option-text').replaceWith("

" + releasedBuild + " " + optionText + "

"); + $option.find('.picker-option-text').replaceWith("

" + optionText + " " + released + "

"); } } } diff --git a/module/bug/view/activate.html.php b/module/bug/view/activate.html.php index 37cc6027b6..4ea8e2bab9 100644 --- a/module/bug/view/activate.html.php +++ b/module/bug/view/activate.html.php @@ -58,6 +58,6 @@
product); -js::set('releasedBuild', $lang->build->releasedBuild); +js::set('released', $lang->build->released); ?> diff --git a/module/bug/view/batchcreate.html.php b/module/bug/view/batchcreate.html.php index eb34d2370a..6e62fc7d47 100755 --- a/module/bug/view/batchcreate.html.php +++ b/module/bug/view/batchcreate.html.php @@ -14,7 +14,7 @@ include '../../common/view/header.html.php'; js::set('requiredFields', $config->bug->create->requiredFields); js::set('productID', $productID); -js::set('releasedBuild', $lang->build->releasedBuild); +js::set('released', $lang->build->released); ?> bug->mySelects[$browseType]) && in_array($brow { $actionLink = $this->createLink('bug', 'batchResolve', "resolution=fixed&resolvedBuild=$key"); echo "
  • "; - echo html::a('javascript:;', (in_array($key, $releasedBuilds) ? "{$lang->build->releasedBuild} " : '') . $build, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin', '#bugList')\""); + echo html::a('javascript:;', $build . (in_array($key, $releasedBuilds) ? " {$lang->build->released} " : ''), '', "onclick=\"setFormAction('$actionLink', 'hiddenwin', '#bugList')\""); echo "
  • "; } echo ""; diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php index 3cb9f567a2..27819e3c62 100644 --- a/module/bug/view/create.html.php +++ b/module/bug/view/create.html.php @@ -31,7 +31,7 @@ js::set('requiredFields', $config->bug->create->requiredFields); js::set('showFields', $showFields); js::set('projectExecutionPairs', $projectExecutionPairs); js::set('productID', $productID); -js::set('releasedBuild', $lang->build->releasedBuild); +js::set('released', $lang->build->released); if($this->app->tab == 'execution') js::set('objectID', zget($execution, 'id', '')); if($this->app->tab == 'project') js::set('objectID', $projectID); ?> diff --git a/module/bug/view/edit.html.php b/module/bug/view/edit.html.php index 5abdec20a3..10ad3fdc16 100644 --- a/module/bug/view/edit.html.php +++ b/module/bug/view/edit.html.php @@ -31,7 +31,7 @@ js::set('bugBranch' , $bug->branch); js::set('isClosedBug' , $bug->status == 'closed'); js::set('projectExecutionPairs' , $projectExecutionPairs); js::set('productID' , $product->id); -js::set('releasedBuild' , $lang->build->releasedBuild); +js::set('released' , $lang->build->released); if($this->app->tab == 'execution') js::set('objectID', $bug->execution); if($this->app->tab == 'project') js::set('objectID', $bug->project); ?> diff --git a/module/bug/view/resolve.html.php b/module/bug/view/resolve.html.php index b284f83a5c..78ed516c22 100644 --- a/module/bug/view/resolve.html.php +++ b/module/bug/view/resolve.html.php @@ -16,7 +16,7 @@ product); -js::set('releasedBuild', $lang->build->releasedBuild); +js::set('released', $lang->build->released); ?>
    diff --git a/module/build/lang/de.php b/module/build/lang/de.php index 0164196034..f229af3274 100644 --- a/module/build/lang/de.php +++ b/module/build/lang/de.php @@ -36,7 +36,7 @@ $lang->build->execution = $lang->executionCommon; $lang->build->integrated = 'Integrated'; $lang->build->singled = 'Singled'; $lang->build->builds = 'Included Builds'; -$lang->build->releasedBuild = 'Released Build'; +$lang->build->released = 'Released'; $lang->build->name = 'Name'; $lang->build->date = 'Datum'; $lang->build->builder = 'Builder'; diff --git a/module/build/lang/en.php b/module/build/lang/en.php index 75343df3d0..55fa55eaa3 100644 --- a/module/build/lang/en.php +++ b/module/build/lang/en.php @@ -36,7 +36,7 @@ $lang->build->execution = $lang->executionCommon; $lang->build->integrated = 'Integrated'; $lang->build->singled = 'Singled'; $lang->build->builds = 'Included Builds'; -$lang->build->releasedBuild = 'Released Build'; +$lang->build->released = 'Released'; $lang->build->name = 'Name'; $lang->build->date = 'Date'; $lang->build->builder = 'Builder'; diff --git a/module/build/lang/fr.php b/module/build/lang/fr.php index e6500fd173..c81c80ed03 100644 --- a/module/build/lang/fr.php +++ b/module/build/lang/fr.php @@ -36,7 +36,7 @@ $lang->build->execution = $lang->executionCommon; $lang->build->integrated = 'Integrated'; $lang->build->singled = 'Singled'; $lang->build->builds = 'Included Builds'; -$lang->build->releasedBuild = 'Released Build'; +$lang->build->released = 'Released'; $lang->build->name = 'Nom'; $lang->build->date = 'Date'; $lang->build->builder = 'Builder'; diff --git a/module/build/lang/zh-cn.php b/module/build/lang/zh-cn.php index fe804daf9c..59f8a6e824 100644 --- a/module/build/lang/zh-cn.php +++ b/module/build/lang/zh-cn.php @@ -36,7 +36,7 @@ $lang->build->execution = '所属' . $lang->executionCommon; $lang->build->integrated = '集成版本'; $lang->build->singled = '单一版本'; $lang->build->builds = '包含版本'; -$lang->build->releasedBuild = '发布版本'; +$lang->build->released = '发布'; $lang->build->name = '名称编号'; $lang->build->date = '打包日期'; $lang->build->builder = '构建者'; diff --git a/module/build/model.php b/module/build/model.php index fd739b41a0..baa9253ead 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -327,7 +327,7 @@ class buildModel extends model $releaseName = $release->name; $branchName = $release->branchName ? $release->branchName : $this->lang->branch->main; if($release->productType != 'normal') $releaseName = (strpos($params, 'withbranch') !== false ? $branchName . '/' : '') . $releaseName; - if(strpos($params, 'releasetag') !== false) $releaseName = "[{$this->lang->build->releasedBuild}] " . $releaseName; + if(strpos($params, 'releasetag') !== false) $releaseName = $releaseName . " [{$this->lang->build->released}]"; $builds[$release->date][$release->shadow] = $releaseName; foreach(explode(',', trim($release->build, ',')) as $buildID) { From 2fd85774c144871d560684502b571b3d0fe6c6cd Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 5 Dec 2022 08:49:00 +0800 Subject: [PATCH 09/11] * code for task #78383. --- module/projectrelease/control.php | 7 +-- module/projectrelease/js/create.js | 28 --------- module/projectrelease/view/create.html.php | 10 ++-- module/release/control.php | 1 - module/release/js/create.js | 23 ------- module/release/lang/de.php | 2 +- module/release/lang/en.php | 2 +- module/release/lang/fr.php | 2 +- module/release/lang/zh-cn.php | 2 +- module/release/model.php | 4 +- module/release/view/create.html.php | 10 ++-- test/class/build.class.php | 14 ----- test/model/build/filterlinked.php | 70 ---------------------- 13 files changed, 19 insertions(+), 156 deletions(-) delete mode 100644 test/model/build/filterlinked.php diff --git a/module/projectrelease/control.php b/module/projectrelease/control.php index f06687f7b4..c1f353dd97 100644 --- a/module/projectrelease/control.php +++ b/module/projectrelease/control.php @@ -142,8 +142,6 @@ class projectrelease extends control $this->view->builds = $builds; $this->view->lastRelease = $this->projectrelease->getLast($projectID); $this->view->users = $this->loadModel('user')->getPairs('noclosed'); - $this->view->confirmLink = $this->lang->release->confirmLink; - $this->view->notEmptyBuilds = $this->build->filterLinked(array_keys($builds)); $this->display(); } @@ -816,9 +814,6 @@ class projectrelease extends control $releasedBuilds = $this->projectrelease->getReleasedBuilds($projectID); foreach($releasedBuilds as $build) unset($builds[$build]); - /* Get the builds of the linked stories or bugs. */ - $notEmptyBuilds = $this->build->filterLinked(array_keys($builds)); - - return print(html::select('build[]', $builds, '', "class='form-control chosen' multiple data-notemptybuilds='" . join(',', $notEmptyBuilds) . "'")); + return print(html::select('build[]', $builds, '', "class='form-control chosen' multiple")); } } diff --git a/module/projectrelease/js/create.js b/module/projectrelease/js/create.js index 43c1298bac..1cd106dcdb 100644 --- a/module/projectrelease/js/create.js +++ b/module/projectrelease/js/create.js @@ -1,27 +1,3 @@ -$('#submit').click(function() -{ - var dateFormat = new RegExp(/^\d{4}\-\d{2}\-\d{2}$/); - var name = $('#name').val(); - var date = $('#date').val(); - var build = $('#build').val(); - var notEmptyBuild = false; - - $.each(build, function(index, value) - { - if(typeof(notEmptyBuilds[value]) != 'undefined') - { - notEmptyBuild = true; - return false; - } - }) - - if(name && build && notEmptyBuild && dateFormat.test(date)) - { - var result = confirm(confirmLink) ? true : false; - $('#sync').val(result); - } -}); - /** * Ajax load unlinked builds with project and product. * @@ -35,10 +11,6 @@ function loadBuilds() $('#buildBox').load(createLink('projectrelease', 'ajaxLoadBuilds', "projectID=" + projectID + "&productID=" + productID + "&branch=" + branch), function() { $('#build').attr('data-placeholder', multipleSelect).chosen(); - $.each($('#build').attr('data-notemptybuilds').split(','), function(index, value) - { - notEmptyBuilds[value] = value; - }); }); } diff --git a/module/projectrelease/view/create.html.php b/module/projectrelease/view/create.html.php index fa3671ae44..7de52be52c 100644 --- a/module/projectrelease/view/create.html.php +++ b/module/projectrelease/view/create.html.php @@ -12,8 +12,6 @@ ?> - -
    @@ -53,7 +51,12 @@ release->includedBuild;?> build->placeholder->multipleSelect}'");?> - + +
    + + +
    + release->date;?> @@ -84,7 +87,6 @@ - diff --git a/module/release/control.php b/module/release/control.php index 360cad5302..1fedaf1531 100644 --- a/module/release/control.php +++ b/module/release/control.php @@ -96,7 +96,6 @@ class release extends control $this->view->builds = $builds; $this->view->users = $this->loadModel('user')->getPairs('noclosed'); $this->view->lastRelease = $this->release->getLast($productID, $branch); - $this->view->notEmptyBuilds = $this->build->filterLinked(array_keys($builds)); $this->display(); } diff --git a/module/release/js/create.js b/module/release/js/create.js index 87a9d72468..e69de29bb2 100644 --- a/module/release/js/create.js +++ b/module/release/js/create.js @@ -1,23 +0,0 @@ -$('#submit').click(function() -{ - var dateFormat = new RegExp(/^\d{4}\-\d{2}\-\d{2}$/); - var name = $('#name').val(); - var date = $('#date').val(); - var build = $('#build').val(); - var notEmptyBuild = false; - - $.each(build, function(index, value) - { - if(typeof(notEmptyBuilds[value]) != 'undefined') - { - notEmptyBuild = true; - return false; - } - }) - - if(name && build && notEmptyBuild && dateFormat.test(date)) - { - var result = confirm(confirmLink) ? true : false; - $('#sync').val(result); - } -}); diff --git a/module/release/lang/de.php b/module/release/lang/de.php index dfd0244395..0772adf5d3 100644 --- a/module/release/lang/de.php +++ b/module/release/lang/de.php @@ -24,7 +24,7 @@ $lang->release->batchUnlinkStory = "Mehrere Storys entfernen"; $lang->release->batchUnlinkBug = "Mehrere Bugs entfernen"; $lang->release->confirmDelete = "Möchten Sie dieses Releas löschen?"; -$lang->release->confirmLink = "Whether to link the stories completed in the version and the bugs solved to the release?"; +$lang->release->syncFromBuilds = "Link the stories completed in the version and the bugs solved to the release"; $lang->release->confirmUnlinkStory = "Möchten Sie diese Story löschen?"; $lang->release->confirmUnlinkBug = "Möchten Sie diesen Bug löschen?"; $lang->release->existBuild = '『Build』『%s』 existiert bereits. Sie können den 『name』 ändern oder ein anderes 『build』 wählen.'; diff --git a/module/release/lang/en.php b/module/release/lang/en.php index 7b6be960a0..ecdcfab2b6 100644 --- a/module/release/lang/en.php +++ b/module/release/lang/en.php @@ -24,7 +24,7 @@ $lang->release->batchUnlinkStory = "Batch Unlink Stories"; $lang->release->batchUnlinkBug = "Batch Unlink Bugs"; $lang->release->confirmDelete = "Do you want to delete this release?"; -$lang->release->confirmLink = "Whether to link the stories completed in the version and the bugs solved to the release?"; +$lang->release->syncFromBuilds = "Link the stories completed in the version and the bugs solved to the release"; $lang->release->confirmUnlinkStory = "Do you want to remove this story?"; $lang->release->confirmUnlinkBug = "Do you want to remove this bug?"; $lang->release->existBuild = '『Build』『%s』existed. You could change『name』or choose a『build』.'; diff --git a/module/release/lang/fr.php b/module/release/lang/fr.php index 3a7bdc1b1e..e4b46198d1 100644 --- a/module/release/lang/fr.php +++ b/module/release/lang/fr.php @@ -24,7 +24,7 @@ $lang->release->batchUnlinkStory = "Retirer Stories par Lot"; $lang->release->batchUnlinkBug = "Retirer Bugs par Lot"; $lang->release->confirmDelete = "Voulez-vous réellement supprimer cette release ?"; -$lang->release->confirmLink = "Whether to link the stories completed in the version and the bugs solved to the release?"; +$lang->release->syncFromBuilds = "Link the stories completed in the version and the bugs solved to the release"; $lang->release->confirmUnlinkStory = "Voulez-vous retirer cette story de la release ?"; $lang->release->confirmUnlinkBug = "Voulez-vous retirer ce bug de la release ?"; $lang->release->existBuild = '『Build』『%s』existant. Vous pouvez changer『name』ou choisir un『build』.'; diff --git a/module/release/lang/zh-cn.php b/module/release/lang/zh-cn.php index 3e48d6e1b8..9f3af90ca8 100644 --- a/module/release/lang/zh-cn.php +++ b/module/release/lang/zh-cn.php @@ -24,7 +24,7 @@ $lang->release->batchUnlinkStory = "批量移除{$lang->SRCommon}"; $lang->release->batchUnlinkBug = "批量移除Bug"; $lang->release->confirmDelete = "您确认删除该发布吗?"; -$lang->release->confirmLink = "是否将版本中完成的{$lang->SRCommon}和已解决的Bug关联到发布下?"; +$lang->release->syncFromBuilds = "将版本中完成的{$lang->SRCommon}和已解决的Bug关联到发布下"; $lang->release->confirmUnlinkStory = "您确认移除该{$lang->SRCommon}吗?"; $lang->release->confirmUnlinkBug = "您确认移除该Bug吗?"; $lang->release->existBuild = '『版本』已经有『%s』这条记录了。您可以更改『发布名称』或者选择一个『版本』。'; diff --git a/module/release/model.php b/module/release/model.php index 4b8930bcc1..5b94a157b0 100644 --- a/module/release/model.php +++ b/module/release/model.php @@ -225,7 +225,7 @@ class releaseModel extends model $branches[$build->branch] = $build->branch; $projects[$build->project] = $build->project; - if($this->post->sync == 'true') + if($this->post->sync) { $build->stories = trim($build->stories, ','); $build->bugs = trim($build->bugs, ','); @@ -233,7 +233,7 @@ class releaseModel extends model if($build->bugs) $release->bugs .= ',' . $build->bugs; } } - if($this->post->sync == 'true' and $release->bugs) + if($this->post->sync and $release->bugs) { $releaseBugs = $this->loadModel('bug')->getReleaseBugs(array_keys($builds), $release->product, $release->branch); $release->bugs = join(',', array_intersect(explode(',', $release->bugs), array_keys($releaseBugs))); diff --git a/module/release/view/create.html.php b/module/release/view/create.html.php index 1c41c1a01f..5bc476e931 100644 --- a/module/release/view/create.html.php +++ b/module/release/view/create.html.php @@ -12,8 +12,6 @@ ?> -release->confirmLink);?> -
    @@ -36,7 +34,12 @@ release->includedBuild;?> build->placeholder->multipleSelect}'");?> - + +
    + + +
    + release->date;?> @@ -67,7 +70,6 @@ - diff --git a/test/class/build.class.php b/test/class/build.class.php index 26532d486c..a51cd8ba1f 100644 --- a/test/class/build.class.php +++ b/test/class/build.class.php @@ -149,20 +149,6 @@ class buildTest return $objects; } - /** - * Test for filterLinked method - * - * @param array $buildIdList - * @access public - * @return string - */ - public function filterLinkedTest($buildIdList) - { - $notEmptyBuilds = $this->objectModel->filterLinked($buildIdList); - sort($notEmptyBuilds); - return empty($notEmptyBuilds) ? 'null' : join(',', $notEmptyBuilds); - } - /** * Function getLast test by build * diff --git a/test/model/build/filterlinked.php b/test/model/build/filterlinked.php deleted file mode 100644 index 4a53458aed..0000000000 --- a/test/model/build/filterlinked.php +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/env php -filterLinked(); -cid=1 -pid=1 - -不传任何数据 >> null -迭代版本未关联需求和Bug >> null -迭代版本关联需求和Bug >> 101 -项目版本关联版本关联需求和Bug >> 102 -项目版本关联版本未关联需求和Bug >> null -版本列表中关联需求和Bug >> 101 -版本列表中混合项目版本和迭代版本 >> 101,102 - -*/ - -$build = new buildTest(); - -$buildData = new stdclass(); -$buildData->id = 100; -$buildData->product = 1; -$buildData->project = 1; -$buildData->execution = 2; -$buildData->name = 'test1'; -$buildData->date = date('Y-m-d'); -$build->objectModel->dao->replace(TABLE_BUILD)->data($buildData)->exec(); -$buildId1 = $buildData->id; - -$buildData->id = 101; -$buildData->name = 'test2'; -$buildData->stories = '1,2,3'; -$build->objectModel->dao->replace(TABLE_BUILD)->data($buildData)->exec(); -$buildId2 = $buildData->id; - -$buildData = new stdclass(); -$buildData->id = 102; -$buildData->product = 1; -$buildData->project = 1; -$buildData->execution = 0; -$buildData->builds = ",$buildId2,"; -$buildData->name = 'test3'; -$buildData->date = date('Y-m-d'); -$build->objectModel->dao->replace(TABLE_BUILD)->data($buildData)->exec(); -$buildId3 = $buildData->id; - -$buildData = new stdclass(); -$buildData->id = 103; -$buildData->product = 1; -$buildData->project = 1; -$buildData->execution = 0; -$buildData->builds = ",$buildId1,"; -$buildData->name = 'test4'; -$buildData->date = date('Y-m-d'); -$build->objectModel->dao->replace(TABLE_BUILD)->data($buildData)->exec(); -$buildId4 = $buildData->id; - - -r($build->filterLinkedTest(array())) && p() && e('null'); //不传任何数据 -r($build->filterLinkedTest(array($buildId1))) && p() && e('null'); //迭代版本未关联需求和Bug -r($build->filterLinkedTest(array($buildId2))) && p() && e('101'); //迭代版本关联需求和Bug -r($build->filterLinkedTest(array($buildId3))) && p() && e('102'); //项目版本关联版本关联需求和Bug -r($build->filterLinkedTest(array($buildId4))) && p() && e('null'); //项目版本关联版本未关联需求和Bug -r($build->filterLinkedTest(array($buildId1, $buildId2))) && p() && e('101'); //版本列表中关联需求和Bug -r($build->filterLinkedTest(array($buildId3, $buildId2))) && p() && e('101,102'); //版本列表中混合项目版本和迭代版本 From 5fc4eeb5dd9350c22b8aea50a72ebe047af7514b Mon Sep 17 00:00:00 2001 From: dingguodong Date: Mon, 5 Dec 2022 10:00:37 +0800 Subject: [PATCH 10/11] * Adjust extension loading priority for saas. --- framework/base/model.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/base/model.class.php b/framework/base/model.class.php index bf4a0136ab..3c734d0071 100644 --- a/framework/base/model.class.php +++ b/framework/base/model.class.php @@ -281,8 +281,8 @@ class baseModel /* 设置扩展的名字和相应的文件。Set extenson name and extension file. */ $moduleExtPath = $this->app->getModuleExtPath($this->appName, $moduleName, $type); if(!empty($moduleExtPath['site'])) $extensionFile = $moduleExtPath['site'] . 'class/' . $extensionName . '.class.php'; - if(!isset($extensionFile) or !file_exists($extensionFile)) $extensionFile = $moduleExtPath['custom'] . 'class/' . $extensionName . '.class.php'; if(!isset($extensionFile) or !file_exists($extensionFile)) $extensionFile = $moduleExtPath['saas'] . 'class/' . $extensionName . '.class.php'; + if(!isset($extensionFile) or !file_exists($extensionFile)) $extensionFile = $moduleExtPath['custom'] . 'class/' . $extensionName . '.class.php'; if(!isset($extensionFile) or !file_exists($extensionFile)) $extensionFile = $moduleExtPath['vision'] . 'class/' . $extensionName . '.class.php'; if(!isset($extensionFile) or !file_exists($extensionFile)) $extensionFile = $moduleExtPath['xuan'] . 'class/' . $extensionName . '.class.php'; if(!isset($extensionFile) or !file_exists($extensionFile)) $extensionFile = $moduleExtPath['common'] . 'class/' . $extensionName . '.class.php'; From 42e85ebbb8a4a089b5ccffd4474117f695a7ae6f Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 5 Dec 2022 10:10:59 +0800 Subject: [PATCH 11/11] * code for task #78384. --- module/build/control.php | 1 + module/build/lang/de.php | 1 + module/build/lang/en.php | 1 + module/build/lang/fr.php | 1 + module/build/lang/zh-cn.php | 1 + module/execution/view/build.html.php | 11 +++++++---- module/project/view/build.html.php | 15 +++++++++------ 7 files changed, 21 insertions(+), 10 deletions(-) diff --git a/module/build/control.php b/module/build/control.php index f2772a442f..767239b781 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -181,6 +181,7 @@ class build extends control } $executions = $this->product->getExecutionPairsByProduct($build->product, $build->branch, 'id_desc', $this->session->project, 'stagefilter'); + if($build->execution and !isset($executions[$build->execution])) $executions[$build->execution] = $this->loadModel('execution')->getById($build->execution)->name; /* Get stories and bugs. */ $orderBy = 'status_asc, stage_asc, id_desc'; diff --git a/module/build/lang/de.php b/module/build/lang/de.php index 0164196034..385db70d1c 100644 --- a/module/build/lang/de.php +++ b/module/build/lang/de.php @@ -40,6 +40,7 @@ $lang->build->releasedBuild = 'Released Build'; $lang->build->name = 'Name'; $lang->build->date = 'Datum'; $lang->build->builder = 'Builder'; +$lang->build->url = 'URL'; $lang->build->scmPath = 'SCM Pfad'; $lang->build->filePath = 'Dateipfad'; $lang->build->desc = 'Beschreibung'; diff --git a/module/build/lang/en.php b/module/build/lang/en.php index 75343df3d0..0b64199217 100644 --- a/module/build/lang/en.php +++ b/module/build/lang/en.php @@ -40,6 +40,7 @@ $lang->build->releasedBuild = 'Released Build'; $lang->build->name = 'Name'; $lang->build->date = 'Date'; $lang->build->builder = 'Builder'; +$lang->build->url = 'URL'; $lang->build->scmPath = 'SCM Path'; $lang->build->filePath = 'File Path'; $lang->build->desc = 'Description'; diff --git a/module/build/lang/fr.php b/module/build/lang/fr.php index e6500fd173..7633876217 100644 --- a/module/build/lang/fr.php +++ b/module/build/lang/fr.php @@ -40,6 +40,7 @@ $lang->build->releasedBuild = 'Released Build'; $lang->build->name = 'Nom'; $lang->build->date = 'Date'; $lang->build->builder = 'Builder'; +$lang->build->url = 'URL'; $lang->build->scmPath = 'Chemin SCM'; $lang->build->filePath = 'Chemin Fichier'; $lang->build->desc = 'Description'; diff --git a/module/build/lang/zh-cn.php b/module/build/lang/zh-cn.php index fe804daf9c..f24b21bb26 100644 --- a/module/build/lang/zh-cn.php +++ b/module/build/lang/zh-cn.php @@ -40,6 +40,7 @@ $lang->build->releasedBuild = '发布版本'; $lang->build->name = '名称编号'; $lang->build->date = '打包日期'; $lang->build->builder = '构建者'; +$lang->build->url = '地址'; $lang->build->scmPath = '源代码地址'; $lang->build->filePath = '下载地址'; $lang->build->desc = '描述'; diff --git a/module/execution/view/build.html.php b/module/execution/view/build.html.php index c1610c1616..4a8faa823a 100644 --- a/module/execution/view/build.html.php +++ b/module/execution/view/build.html.php @@ -51,8 +51,7 @@ build->id;?> build->product;?> build->name;?> - build->scmPath;?> - build->filePath;?> + build->url;?> build->date;?> build->builder;?> actions;?> @@ -68,8 +67,12 @@ branchName) echo "{$build->branchName}"?> createLink('build', 'view', "build=$build->id"), $build->name);?> - scmPath, 'http') === 0 ? html::a($build->scmPath) : $build->scmPath;?> - filePath, 'http') === 0 ? html::a($build->filePath) : $build->filePath;?> + + scmPath) echo "
    " . (strpos($build->scmPath, 'http') === 0 ? html::a($build->scmPath) : $build->scmPath) . '
    '; + if($build->filePath) echo "
    " . (strpos($build->filePath, 'http') === 0 ? html::a($build->filePath) : $build->filePath) . '
    '; + ?> + date?> builder);?> build->buildOperateMenu($build, 'browse', "executionID={$execution->id}&productID={$productID}");?> diff --git a/module/project/view/build.html.php b/module/project/view/build.html.php index e38be60903..7fe72a1081 100644 --- a/module/project/view/build.html.php +++ b/module/project/view/build.html.php @@ -50,13 +50,12 @@ build->id;?> build->name;?> hasProduct):?> - build->product;?> + build->product;?> multiple):?> - executionCommon;?> + executionCommon;?> - build->scmPath;?> - build->filePath;?> + build->url;?> build->date;?> build->builder;?> actions;?> @@ -97,8 +96,12 @@ - scmPath, 'http') === 0 ? html::a($build->scmPath) : $build->scmPath;?> - filePath, 'http') === 0 ? html::a($build->filePath) : $build->filePath;?> + + scmPath) echo "
    " . (strpos($build->scmPath, 'http') === 0 ? html::a($build->scmPath) : $build->scmPath) . '
    '; + if($build->filePath) echo "
    " . (strpos($build->filePath, 'http') === 0 ? html::a($build->filePath) : $build->filePath) . '
    '; + ?> + date?> builder);?> build->buildOperateMenu($build, 'browse');?>