";
echo "";
From ab994d6f92ef27ace68b159695f9a834bfddd1fe Mon Sep 17 00:00:00 2001
From: qiyu-xie
Date: Mon, 26 Apr 2021 13:50:07 +0800
Subject: [PATCH 09/24] * Fix bug#12372.
---
module/testcase/view/view.html.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/module/testcase/view/view.html.php b/module/testcase/view/view.html.php
index 246eb73ade..e87fc1e0e0 100644
--- a/module/testcase/view/view.html.php
+++ b/module/testcase/view/view.html.php
@@ -202,7 +202,8 @@
storyTitle)) echo html::a($this->createLink('story', 'view', "storyID=$case->story", '', true), "#$case->story:$case->storyTitle", '', "class=$class data-width='80%'");
+ $param = $this->app->openApp == 'project' ? "&version=0&projectID={$this->session->project}" : '';
+ if(isset($case->storyTitle)) echo html::a($this->createLink('story', 'view', "storyID=$case->story" . $param, '', true), "#$case->story:$case->storyTitle", '', "class=$class data-width='80%'");
if($case->story and $case->storyStatus == 'active' and $case->latestStoryVersion > $case->storyVersion)
{
echo "({$lang->story->changed} ";
From 0046b58c1d7711a780c797757cde8f24acdba507 Mon Sep 17 00:00:00 2001
From: holan20180123 <56391770@qq.com>
Date: Mon, 26 Apr 2021 13:55:56 +0800
Subject: [PATCH 10/24] * Fix bug #12327.
---
module/task/control.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/module/task/control.php b/module/task/control.php
index ddd5cbbcc1..762703d031 100644
--- a/module/task/control.php
+++ b/module/task/control.php
@@ -677,7 +677,7 @@ class task extends control
/* Set menu. */
$execution = $this->execution->getById($task->execution);
- $this->execution->setMenu($execution->id);
+ if($this->app->openApp == 'execution') $this->execution->setMenu($execution->id);
$this->executeHooks($taskID);
From 9b1438d40c90b908ebace5b44f51bf7a317c5121 Mon Sep 17 00:00:00 2001
From: tianshujie98
Date: Mon, 26 Apr 2021 14:03:58 +0800
Subject: [PATCH 11/24] * Fix bug #12392.
---
module/execution/control.php | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/module/execution/control.php b/module/execution/control.php
index 5382f57de5..ff9790639d 100644
--- a/module/execution/control.php
+++ b/module/execution/control.php
@@ -2044,6 +2044,13 @@ class execution extends control
if($unresolvedBugs->count) $tips .= sprintf($this->lang->execution->unresolvedBug, $unresolvedBugs->count);
if($tips) $tips = $this->lang->execution->unfinishedExecution . $tips;
+ $type = $this->dao->select('type')->from(TABLE_EXECUTION)->where('id')->eq($executionID)->fetch('type');
+ if($type == 'stage')
+ {
+ if($tips) $tips = str_replace($this->lang->executionCommon, $this->lang->project->stage, $tips);
+ $this->lang->execution->confirmDelete = str_replace($this->lang->executionCommon, $this->lang->project->stage, $this->lang->execution->confirmDelete);
+ }
+
echo js::confirm($tips . sprintf($this->lang->execution->confirmDelete, $this->executions[$executionID]), $this->createLink('execution', 'delete', "executionID=$executionID&confirm=yes"));
exit;
}
From ce762a919aab19e4734465f364d78276470ae5c4 Mon Sep 17 00:00:00 2001
From: tianshujie98
Date: Mon, 26 Apr 2021 14:17:54 +0800
Subject: [PATCH 12/24] * Fix bug #12394.
---
module/execution/model.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/module/execution/model.php b/module/execution/model.php
index c2b818b864..98d21220cf 100644
--- a/module/execution/model.php
+++ b/module/execution/model.php
@@ -387,10 +387,10 @@ class executionModel extends model
$this->app->loadLang('doc');
$lib = new stdclass();
$lib->execution = $executionID;
- $lib->name = $this->lang->doclib->main['execution'];
- $lib->type = 'execution';
- $lib->main = '1';
- $lib->acl = 'default';
+ $lib->name = $type == 'stage' ? str_replace($this->lang->executionCommon, $this->lang->project->stage, $this->lang->doclib->main['execution']) : $this->lang->doclib->main['execution'];
+ $lib->type = 'execution';
+ $lib->main = '1';
+ $lib->acl = 'default';
$this->dao->insert(TABLE_DOCLIB)->data($lib)->exec();
$whitelist = explode(',', $sprint->whitelist);
From f00d94cf42f2ca62f2bf4592d3f2291bfa265cc6 Mon Sep 17 00:00:00 2001
From: holan20180123 <56391770@qq.com>
Date: Mon, 26 Apr 2021 14:48:23 +0800
Subject: [PATCH 13/24] * Fix bug #12325.
---
module/program/js/create.js | 11 +++++++++++
module/program/js/edit.js | 11 +++++++++++
module/project/control.php | 2 +-
module/project/js/common.js | 6 ++++++
4 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/module/program/js/create.js b/module/program/js/create.js
index 54607ac1d9..a23674ec40 100644
--- a/module/program/js/create.js
+++ b/module/program/js/create.js
@@ -25,6 +25,17 @@ $(function()
$('#end').removeAttr('disabled');
}
});
+
+ $('#end').change(function()
+ {
+ var beginDate = $('#begin').val();
+ var endDate = $('#end').val();
+ var begin = new Date(beginDate.replace(/-/g,"/"));
+ var end = new Date(endDate.replace(/-/g,"/"));
+ var time = end.getTime() - begin.getTime();
+ var days = parseInt(time / (1000 * 60 * 60 * 24)) + 1;
+ if(days != $("input:radio[name='delta']:checked").val()) $("input:radio[name='delta']:checked").attr('checked',false);
+ })
});
function setCopyProject(copiedProgramID)
diff --git a/module/program/js/edit.js b/module/program/js/edit.js
index 1dcb3582f2..2949acf5fa 100644
--- a/module/program/js/edit.js
+++ b/module/program/js/edit.js
@@ -27,5 +27,16 @@ $(function()
}
});
+ $('#end').change(function()
+ {
+ var beginDate = $('#begin').val();
+ var endDate = $('#end').val();
+ var begin = new Date(beginDate.replace(/-/g,"/"));
+ var end = new Date(endDate.replace(/-/g,"/"));
+ var time = end.getTime() - begin.getTime();
+ var days = parseInt(time / (1000 * 60 * 60 * 24)) + 1;
+ if(days != $("input:radio[name='delta']:checked").val()) $("input:radio[name='delta']:checked").attr('checked',false);
+ })
+
$('#isCat').change();
});
diff --git a/module/project/control.php b/module/project/control.php
index dd8c4a05c6..72a554689a 100644
--- a/module/project/control.php
+++ b/module/project/control.php
@@ -273,7 +273,7 @@ class project extends control
$this->loadModel('action')->create('project', $projectID, 'opened');
/* Link the plan stories. */
- if($_POST['plans'])
+ if(!empty($_POST['plans']))
{
foreach($_POST['plans'] as $planID)
{
diff --git a/module/project/js/common.js b/module/project/js/common.js
index 760170c28a..7e2ab51d43 100644
--- a/module/project/js/common.js
+++ b/module/project/js/common.js
@@ -75,6 +75,12 @@ function computeWorkDays(currentID)
{
beginDate = $('#begin').val();
endDate = $('#end').val();
+
+ var begin = new Date(beginDate.replace(/-/g,"/"));
+ var end = new Date(endDate.replace(/-/g,"/"));
+ var time = end.getTime() - begin.getTime();
+ var days = parseInt(time / (1000 * 60 * 60 * 24)) + 1;
+ if(days != $("input:radio[name='delta']:checked").val()) $("input:radio[name='delta']:checked").attr('checked',false);
}
if(beginDate && endDate)
From 8dce53e8520d978e1cecaebf172809f8796be86a Mon Sep 17 00:00:00 2001
From: tianshujie98
Date: Mon, 26 Apr 2021 14:52:16 +0800
Subject: [PATCH 14/24] * Fix bug #12332.
---
module/todo/js/common.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/module/todo/js/common.js b/module/todo/js/common.js
index 65789831af..ecff38d232 100644
--- a/module/todo/js/common.js
+++ b/module/todo/js/common.js
@@ -53,8 +53,12 @@ function loadList(type, id)
{
link = createLink('review', 'ajaxGetUserReviews', param);
}
+ else if(type == 'feedback')
+ {
+ link = createLink('feedback', 'ajaxGetUserFeedback', param);
+ }
- if(type == 'bug' || type == 'task' || type == 'story' || type == 'issue' || type == 'risk' || type == 'testtask' || type == 'review' )
+ if(type == 'bug' || type == 'task' || type == 'story' || type == 'issue' || type == 'risk' || type == 'testtask' || type == 'review' || type == 'feedback')
{
$.get(link, function(data, status)
{
From fd03cbbb805c047b4d246e55de4d92221dd27660 Mon Sep 17 00:00:00 2001
From: hufangzhou <746775970@qq.com>
Date: Mon, 26 Apr 2021 15:03:51 +0800
Subject: [PATCH 15/24] * Link the plan stories when edit the project.
---
module/project/control.php | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/module/project/control.php b/module/project/control.php
index 72a554689a..0a4c927da4 100644
--- a/module/project/control.php
+++ b/module/project/control.php
@@ -400,6 +400,14 @@ class project extends control
if($_POST)
{
+ $oldPlans = $this->dao->select('plan')->from(TABLE_PROJECTPRODUCT)->where('project')->eq($projectID)->fetchPairs('plan');
+ $oldPlanStories = $this->dao->select('t1.story')->from(TABLE_PROJECTSTORY)->alias('t1')
+ ->leftJoin(TABLE_PROJECTPRODUCT)->alias('t2')->on('t1.project=t2.project')
+ ->where('t1.project')->eq($projectID)
+ ->andWhere('t2.plan')->in(array_keys($oldPlans))
+ ->fetchAll('story');
+ $diffResult = array_diff($oldPlans, $_POST['plans']);
+
$changes = $this->project->update($projectID);
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
@@ -409,6 +417,31 @@ class project extends control
$this->action->logHistory($actionID, $changes);
}
+ /* Link the plan stories. */
+ if(!empty($_POST['plans']) and !empty($diffResult))
+ {
+ $this->dao->delete()->from(TABLE_PROJECTSTORY)->where('project')->eq($projectID)->andWhere('story')->in(array_keys($oldPlanStories))->exec();
+ foreach($_POST['plans'] as $planID)
+ {
+ $planStories = $planProducts = array();
+ $planStory = $this->loadModel('story')->getPlanStories($planID);
+ if(!empty($planStory))
+ {
+ foreach($planStory as $id => $story)
+ {
+ if($story->status == 'draft')
+ {
+ unset($planStory[$id]);
+ continue;
+ }
+ $planProducts[$story->id] = $story->product;
+ }
+ $planStories = array_keys($planStory);
+ $this->execution->linkStory($projectID, $planStories, $planProducts);
+ }
+ }
+ }
+
$locateLink = $this->session->projectList ? $this->session->projectList : inLink('view', "projectID=$projectID");
if($from == 'program') $locateLink = $this->createLink('program', 'browse');
if($from == 'programProject') $locateLink = $this->session->programProject ? $this->session->programProject : $this->createLink('program', 'project', "projectID=$projectID");
From c7a282cdd367ca7434d0cb9b6c264eeb3614f5d4 Mon Sep 17 00:00:00 2001
From: holan20180123 <56391770@qq.com>
Date: Mon, 26 Apr 2021 15:24:29 +0800
Subject: [PATCH 16/24] * Fix bug #12401.
---
module/product/view/view.html.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/module/product/view/view.html.php b/module/product/view/view.html.php
index 2ae7a771db..1d9c4b9207 100644
--- a/module/product/view/view.html.php
+++ b/module/product/view/view.html.php
@@ -26,7 +26,7 @@
type == 'platform'):?>
- product->branchName['platform'];?>
+
From 09f16fe1b44e7ed8375fdb02b819c71d45ddf696 Mon Sep 17 00:00:00 2001
From: qiyu-xie
Date: Mon, 26 Apr 2021 15:25:42 +0800
Subject: [PATCH 17/24] * Fix bug#12376.
---
module/product/view/browse.html.php | 1 +
module/projectrelease/control.php | 1 +
module/projectrelease/view/view.html.php | 2 +-
module/story/control.php | 23 +++++++++++++++--------
4 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php
index 9b10f31353..d04443ca66 100644
--- a/module/product/view/browse.html.php
+++ b/module/product/view/browse.html.php
@@ -341,6 +341,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
moduleName = $this->app->rawModule;
- $this->methodName = $this->app->rawMethod;
- foreach(customModel::getFeatureMenu($this->moduleName, $this->methodName) as $menuItem)
+ foreach(customModel::getFeatureMenu($this->app->rawModule, $this->app->rawMethod) as $menuItem)
{
if(isset($menuItem->hidden)) continue;
if($menuItem->name == 'emptysr' && $storyType == 'story') continue;
From f2fb924b0cb8cadafe912e25a74c8ebde7e65bed Mon Sep 17 00:00:00 2001
From: tianshujie98
Date: Mon, 26 Apr 2021 16:58:29 +0800
Subject: [PATCH 22/24] * Fix bug #12189.
---
module/execution/control.php | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/module/execution/control.php b/module/execution/control.php
index ff9790639d..d9b8526fc4 100644
--- a/module/execution/control.php
+++ b/module/execution/control.php
@@ -2824,6 +2824,10 @@ class execution extends control
$this->fetch('file', 'export2' . $this->post->fileType, $_POST);
}
+ $this->loadModel('project');
+ $project = $this->project->getByID($this->session->project);
+ if($project->model == 'waterfall') $this->lang->executionCommon = $this->lang->project->stage;
+
$this->view->fileName = (in_array($status, array('all', 'undone')) ? $this->lang->execution->$status : $this->lang->execution->statusList[$status]) . $this->lang->executionCommon;
$this->display();
From 6141efa38c36cd3d0741d3c97979856aa79ef989 Mon Sep 17 00:00:00 2001
From: tianshujie98
Date: Mon, 26 Apr 2021 17:12:04 +0800
Subject: [PATCH 23/24] * Fix bug #12405.
---
module/execution/model.php | 8 ++++++++
module/repo/lang/de.php | 1 +
module/repo/lang/en.php | 1 +
module/repo/lang/fr.php | 1 +
module/repo/lang/vi.php | 1 +
module/repo/lang/zh-cn.php | 2 +-
6 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/module/execution/model.php b/module/execution/model.php
index 98d21220cf..a65a6ec287 100644
--- a/module/execution/model.php
+++ b/module/execution/model.php
@@ -69,6 +69,14 @@ class executionModel extends model
/* Unset story, bug, build and testtask if type is ops. */
$execution = $this->getByID($executionID);
+ if($execution->type == 'stage')
+ {
+ global $lang;
+ $this->loadModel('execution');
+ $lang->executionCommon = $lang->project->stage;
+ include $this->app->getModulePath('execution') . 'lang/' . $this->app->getClientLang() . '.php';
+ }
+
if($execution and $execution->lifetime == 'ops')
{
unset($this->lang->execution->menu->story);
diff --git a/module/repo/lang/de.php b/module/repo/lang/de.php
index 5a7cb805fb..bf3115dcdf 100644
--- a/module/repo/lang/de.php
+++ b/module/repo/lang/de.php
@@ -3,6 +3,7 @@ $lang->repo->common = 'Repo';
$lang->repo->browse = 'View';
$lang->repo->viewRevision = 'View Revision';
$lang->repo->product = 'Product';
+$lang->repo->execution = $lang->execution->common;
$lang->repo->create = 'Create';
$lang->repo->createAction = 'Create Repo';
$lang->repo->maintain = 'Repo List';
diff --git a/module/repo/lang/en.php b/module/repo/lang/en.php
index eee7437991..b3e3dc2c0d 100644
--- a/module/repo/lang/en.php
+++ b/module/repo/lang/en.php
@@ -3,6 +3,7 @@ $lang->repo->common = 'Repo';
$lang->repo->browse = 'View';
$lang->repo->viewRevision = 'View Revision';
$lang->repo->product = 'Product';
+$lang->repo->execution = $lang->execution->common;
$lang->repo->create = 'Create';
$lang->repo->maintain = 'Repo List';
$lang->repo->edit = 'Edit';
diff --git a/module/repo/lang/fr.php b/module/repo/lang/fr.php
index 3f011c9ee1..c721198dc5 100644
--- a/module/repo/lang/fr.php
+++ b/module/repo/lang/fr.php
@@ -3,6 +3,7 @@ $lang->repo->common = 'Référentiel';
$lang->repo->browse = 'Aff';
$lang->repo->viewRevision = 'Aff Modifs';
$lang->repo->product = 'Product';
+$lang->repo->execution = $lang->execution->common;
$lang->repo->create = 'Créer';
$lang->repo->createAction = 'Créer Ref';
$lang->repo->maintain = 'Liste Ref';
diff --git a/module/repo/lang/vi.php b/module/repo/lang/vi.php
index c10b46b417..8bb4b65b87 100644
--- a/module/repo/lang/vi.php
+++ b/module/repo/lang/vi.php
@@ -3,6 +3,7 @@ $lang->repo->common = 'Repo';
$lang->repo->browse = 'Xem';
$lang->repo->viewRevision = 'Xem Revision';
$lang->repo->product = 'Product';
+$lang->repo->execution = $lang->execution->common;
$lang->repo->create = 'Tạo';
$lang->repo->createAction = 'Tạo Repo';
$lang->repo->maintain = 'Repo danh sách';
diff --git a/module/repo/lang/zh-cn.php b/module/repo/lang/zh-cn.php
index 84cf76f53d..d073a70b36 100644
--- a/module/repo/lang/zh-cn.php
+++ b/module/repo/lang/zh-cn.php
@@ -3,7 +3,7 @@ $lang->repo->common = '代码';
$lang->repo->browse = '浏览';
$lang->repo->viewRevision = '查看修订';
$lang->repo->product = '所属产品';
-$lang->repo->execution = '所属' . $lang->executionCommon;
+$lang->repo->execution = '所属' . $lang->execution->common;
$lang->repo->create = '创建';
$lang->repo->maintain = '版本库列表';
$lang->repo->edit = '编辑';
From a20f580a5db0366e5971421494e96e4f8ec6f43e Mon Sep 17 00:00:00 2001
From: tianshujie98
Date: Mon, 26 Apr 2021 17:29:18 +0800
Subject: [PATCH 24/24] * Fix bug #12402.
---
module/action/view/trash.html.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/module/action/view/trash.html.php b/module/action/view/trash.html.php
index 918bd224d7..d29da838b8 100755
--- a/module/action/view/trash.html.php
+++ b/module/action/view/trash.html.php
@@ -54,8 +54,8 @@
$methodName = 'view';
if($module == 'caselib')
{
- $methodName = 'libview';
- $module = 'testsuite';
+ $methodName = 'view';
+ $module = 'caselib';
}
if(isset($config->action->customFlows[$action->objectType]))
{
|