From 6cbf8074f28bd7e8db419e64ea470db7f21e75b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B9=BF=E6=98=8E?= Date: Tue, 19 Oct 2021 15:46:57 +0800 Subject: [PATCH 01/19] * Add cases of user. --- test/api/users/delete.php | 18 ++++++++++++++++++ test/api/users/edit.php | 17 +++++++++++++++++ test/api/users/getbyid.php | 0 test/api/users/getlist.php | 18 ++++++++++++++++++ test/api/users/insert.php | 1 - 5 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 test/api/users/delete.php create mode 100644 test/api/users/edit.php mode change 100755 => 100644 test/api/users/getbyid.php create mode 100644 test/api/users/getlist.php mode change 100755 => 100644 test/api/users/insert.php diff --git a/test/api/users/delete.php b/test/api/users/delete.php new file mode 100644 index 0000000000..34aa2671ff --- /dev/null +++ b/test/api/users/delete.php @@ -0,0 +1,18 @@ +#!use/bin/env php +> message:success + +*/ + +global $token; +$result = $rest->delete('/users/10', array('token' => $token->token)); + +r($result) && c(200) && p() && e("message:success") ; //删除ID为10的用户,判断返回信息 diff --git a/test/api/users/edit.php b/test/api/users/edit.php new file mode 100644 index 0000000000..60bb708d0a --- /dev/null +++ b/test/api/users/edit.php @@ -0,0 +1,17 @@ +#!/usr/bin/env php +> 李铁柱 + +*/ +global $token; +$user = $rest->put('/users/3', array('realname' => '李铁柱'), array('token' => $token->token)); + +r($user) && c(200) && p('realname') && e('李铁柱'); // 编辑ID为3的用户,获取真实姓名 \ No newline at end of file diff --git a/test/api/users/getbyid.php b/test/api/users/getbyid.php old mode 100755 new mode 100644 diff --git a/test/api/users/getlist.php b/test/api/users/getlist.php new file mode 100644 index 0000000000..548ecabcbd --- /dev/null +++ b/test/api/users/getlist.php @@ -0,0 +1,18 @@ +#!use/bin/env php +> admin,测试1 + +*/ + +global $token; +$list = $rest->get('/users?page=1&limit=2&order=id_asc', array('token' => $token->token)); + +r($list->body->users) && p('realname') && e('admin,测试1'); //获取用户列表,判断ID为1和2的真实姓名 \ No newline at end of file diff --git a/test/api/users/insert.php b/test/api/users/insert.php old mode 100755 new mode 100644 index 6a81af7f96..d39d497166 --- a/test/api/users/insert.php +++ b/test/api/users/insert.php @@ -16,7 +16,6 @@ $insert = array( 'account' => 'sgm', 'password' => 'qaz19950422', 'realname' => '孙广明', - 'gender' => 'm', 'email' => 'sgm0422@163.com', ); $user = $rest->post('/users', $insert, array('token' => $token->token)); From bf6b6588105a5afa7f4f4b6db324d615e48b2a77 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Fri, 22 Oct 2021 08:45:02 +0800 Subject: [PATCH 02/19] * Fix bug #15717. --- module/upgrade/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 48da796885..6ba64df16f 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -4580,7 +4580,7 @@ class upgradeModel extends model { $projectCase->project = $projectID; $projectCase->order = $projectCase->case * 5; - $this->dao->insert(TABLE_PROJECTCASE)->data($projectCase)->exec(); + $this->dao->replace(TABLE_PROJECTCASE)->data($projectCase)->exec(); } /* Put sprint cases into project case table. */ From 28a87df5993bd4ac55ddceef461a93656a62358c Mon Sep 17 00:00:00 2001 From: liyuchun Date: Fri, 22 Oct 2021 11:11:10 +0800 Subject: [PATCH 03/19] * Fix bug #15164. --- module/install/lang/en.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/module/install/lang/en.php b/module/install/lang/en.php index d19fe950e9..5f33fbb725 100644 --- a/module/install/lang/en.php +++ b/module/install/lang/en.php @@ -48,7 +48,10 @@ $lang->install->introductionContent = <<Dear users, welcome to ZenTao project management system.

ZenTao has two managment modes in version 15.0 and up. One is the classic management mode, providing two core features, Product and Project; the other is a new project management mode, with Program and Execution added. The following is an introduction to the new mode:

-

Program

+
+

Program

+

Program is used to manage a group of products and projects, and the company executives or PMO can use it for strategic planning.

+

Product

Product is used to subdivide the company's strategy into requirements that can be developed, and the product manager can use it to make release plans.

From 58116c1bbcf301ef9659c8d9bbe41ff5b9190480 Mon Sep 17 00:00:00 2001 From: xiawenlong Date: Tue, 26 Oct 2021 10:06:38 +0800 Subject: [PATCH 04/19] * Finish task #43543. --- module/api/css/index.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/api/css/index.css b/module/api/css/index.css index 3b8c3f5263..228854c88d 100644 --- a/module/api/css/index.css +++ b/module/api/css/index.css @@ -11,7 +11,7 @@ .main-col .doc-title {display: flex; font-size: 16px; margin-bottom: 15px;} .main-col .doc-title .title {margin: 0; line-height: 30px; font-size: 25px;} .main-col .doc-title .http-method {line-height: 27px; height: 27px; font-size: 13px; margin-right: 10px; padding: 0 10px;} -.main-col .doc-title .path { line-height: 30px; font-size: 20px; margin-right: 15px;} +.main-col .doc-title .path { line-height: 30px; font-size: 20px; margin-right: 15px;width:60%;word-wrap: break-word; } .main-col .doc-title .info {flex: 1 1 0;} .main-col .doc-title .version a {font-size: 13px; color: #8c8c8c;} .main-col .doc-title .version .dropdown-menu a:hover {color: #ffffff;} From a577f54958e53813536741635c57fe1b92e1b9cd Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Tue, 26 Oct 2021 10:45:49 +0800 Subject: [PATCH 05/19] * Finish task #43557. --- module/task/view/batchcreate.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/task/view/batchcreate.html.php b/module/task/view/batchcreate.html.php index d8ff99104d..4298515d20 100644 --- a/module/task/view/batchcreate.html.php +++ b/module/task/view/batchcreate.html.php @@ -51,7 +51,7 @@ } } $colspan = count($visibleFields) + 3; - $hiddenStory = (isonlybody() and $storyID) ? ' hidden' : ''; + $hiddenStory = ''; if($hiddenStory and isset($visibleFields['story'])) $colspan -= 1; ?>

From b28abf1c4cee8c15b15921b3d7251b4ab18de937 Mon Sep 17 00:00:00 2001 From: zhouxin Date: Tue, 26 Oct 2021 13:02:12 +0800 Subject: [PATCH 06/19] Finish task#43538. --- module/user/lang/de.php | 6 +++--- module/user/lang/en.php | 6 +++--- module/user/lang/fr.php | 6 +++--- module/user/lang/vi.php | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/module/user/lang/de.php b/module/user/lang/de.php index 548a7c5e86..e1fac43bbf 100644 --- a/module/user/lang/de.php +++ b/module/user/lang/de.php @@ -121,7 +121,7 @@ $lang->user->testTask2Him = 'Build'; $lang->user->case2Him = 'Fall zugeordnet'; $lang->user->caseByHim = 'Fall geöffnet'; -$lang->user->errorDeny = "Sorry, your access to %s of %s is denied. Please contact your Admin to get privileges. Return to home page or login again."; +$lang->user->errorDeny = "Sorry, your access to %2\$s of %1\$s is denied. Please contact your Admin to get privileges. Return to home page or login again."; $lang->user->errorView = "Sorry, your access view %s is denied. Please contact your Admin to get privileges. Return to home page or login again."; $lang->user->loginFailed = "Login fehlgeschlagen. Bitte prüfen Sie Ihren Benutzernamen und das Passwort."; $lang->user->lockWarning = "Sie haben %s Versuche."; @@ -249,14 +249,14 @@ $lang->user->process4DB = "It is detected that you may be using the one click i $lang->user->mkdirWin = <<
-
不能创建临时目录,请确认目录%s是否存在并有操作权限。
+
不能创建临时目录,请确认目录%s是否存在并有操作权限。
Can't create tmp directory, make sure the directory %s exists and has permission to operate.
EOT; $lang->user->mkdirLinux = <<
-
不能创建临时目录,请确认目录%s是否存在并有操作权限。
+
不能创建临时目录,请确认目录%s是否存在并有操作权限。
命令为:chmod o=rwx -R %s
Can't create tmp directory, make sure the directory %s exists and has permission to operate.
Commond: chmod o=rwx -R %s.
diff --git a/module/user/lang/en.php b/module/user/lang/en.php index 615a392c1b..f964a41a94 100644 --- a/module/user/lang/en.php +++ b/module/user/lang/en.php @@ -137,7 +137,7 @@ $lang->user->testTask2Him = 'RequestsAssignedTo%s'; $lang->user->case2Him = 'CasesAssignedTo%s'; $lang->user->caseByHim = 'CasesCreatedBy%s'; -$lang->user->errorDeny = "Sorry, your access to %s of %s is denied. Please contact your Admin to get privileges. Return to home page or login again."; +$lang->user->errorDeny = "Sorry, your access to %2\$s of %1\$s is denied. Please contact your Admin to get privileges. Return to home page or login again."; $lang->user->errorView = "Sorry, your access view %s is denied. Please contact your Admin to get privileges. Return to home page or login again."; $lang->user->loginFailed = "Login failed. Please check your account and password."; $lang->user->lockWarning = "You can try %s times."; @@ -267,14 +267,14 @@ $lang->user->process4DB = "It is detected that you might use the one-click inst $lang->user->mkdirWin = <<
-
不能创建临时目录,请确认目录%s是否存在并有操作权限。
+
不能创建临时目录,请确认目录%s是否存在并有操作权限。
A tmp directory cannot be created. Make sure the directory %s exists and you have the right permission.
EOT; $lang->user->mkdirLinux = <<
-
不能创建临时目录,请确认目录%s是否存在并有操作权限。
+
不能创建临时目录,请确认目录%s是否存在并有操作权限。
命令为:chmod o=rwx -R %s
A tmp directory cannot be created. Make sure the directory %s exists and you have the right permission.
Commond: chmod o=rwx -R %s.
diff --git a/module/user/lang/fr.php b/module/user/lang/fr.php index ccb6cae872..4fee2d2e56 100644 --- a/module/user/lang/fr.php +++ b/module/user/lang/fr.php @@ -121,7 +121,7 @@ $lang->user->testTask2Him = 'Recette assignée à %s'; $lang->user->case2Him = 'CasTest assigné à %s'; $lang->user->caseByHim = 'CasTest créé par %s'; -$lang->user->errorDeny = "Sorry, your access to %s of %s is denied. Please contact your Admin to get privileges. Return to home page or login again."; +$lang->user->errorDeny = "Sorry, your access to %2\$s of %1\$s is denied. Please contact your Admin to get privileges. Return to home page or login again."; $lang->user->errorView = "Sorry, your access view %s is denied. Please contact your Admin to get privileges. Return to home page or login again."; $lang->user->loginFailed = "Echec de connexion. Vérifiez votre login et mot de passe."; $lang->user->lockWarning = "Vous avez %s essais."; @@ -249,14 +249,14 @@ $lang->user->process4DB = "It is detected that you may be using the one click i $lang->user->mkdirWin = <<
-
不能创建临时目录,请确认目录%s是否存在并有操作权限。
+
不能创建临时目录,请确认目录%s是否存在并有操作权限。
Can't create tmp directory, make sure the directory %s exists and has permission to operate.
EOT; $lang->user->mkdirLinux = <<
-
不能创建临时目录,请确认目录%s是否存在并有操作权限。
+
不能创建临时目录,请确认目录%s是否存在并有操作权限。
命令为:chmod o=rwx -R %s
Can't create tmp directory, make sure the directory %s exists and has permission to operate.
Commond: chmod o=rwx -R %s.
diff --git a/module/user/lang/vi.php b/module/user/lang/vi.php index 140b8826fe..be2c0df758 100644 --- a/module/user/lang/vi.php +++ b/module/user/lang/vi.php @@ -121,7 +121,7 @@ $lang->user->testTask2Him = 'Nhận yêu cầu'; $lang->user->case2Him = 'Nhận tình huống'; $lang->user->caseByHim = 'Tạo tình huống'; -$lang->user->errorDeny = "Sorry, your access to %s of %s is denied. Please contact your Admin to get privileges. Return to home page or login again."; +$lang->user->errorDeny = "Sorry, your access to %2\$s of %1\$s is denied. Please contact your Admin to get privileges. Return to home page or login again."; $lang->user->errorView = "Sorry, your access view %s is denied. Please contact your Admin to get privileges. Return to home page or login again."; $lang->user->loginFailed = "Đăng nhập thất bại. Vui lòng kiểm tra tài khoản và mật khẩu của bạn."; $lang->user->lockWarning = "Bạn có thể thử %s lần."; @@ -249,14 +249,14 @@ $lang->user->process4DB = "It is detected that you may be using the one click i $lang->user->mkdirWin = <<
-
不能创建临时目录,请确认目录%s是否存在并有操作权限。
+
不能创建临时目录,请确认目录%s是否存在并有操作权限。
Can't create tmp directory, make sure the directory %s exists and has permission to operate.
EOT; $lang->user->mkdirLinux = << From aa9aeb37b0afb4dbd7a0471fc352263863a4e0ea Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Tue, 26 Oct 2021 14:38:30 +0800 Subject: [PATCH 09/19] * Finish task #43549. --- module/bug/model.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/module/bug/model.php b/module/bug/model.php index 24718b5a6b..cfe3c1200e 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -202,7 +202,10 @@ class bugModel extends model foreach(explode(',', $this->config->bug->create->requiredFields) as $field) { $field = trim($field); - if($field and isset($bug->$field) and empty($bug->$field)) die(js::alert(sprintf($this->lang->error->notempty, $this->lang->bug->$field))); + if($field and empty($bug->$field)) + { + die(js::alert(sprintf($this->lang->error->notempty, $this->lang->bug->$field))); + } } $bugs[$i] = $bug; From 4e082eb88320b91ec5ba15012b6697ebd502b92d Mon Sep 17 00:00:00 2001 From: mayue Date: Tue, 26 Oct 2021 14:48:54 +0800 Subject: [PATCH 10/19] *Fix a bug #15739 --- module/api/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/api/model.php b/module/api/model.php index bead5e677a..c0ded9a840 100644 --- a/module/api/model.php +++ b/module/api/model.php @@ -194,7 +194,7 @@ class apiModel extends model * * @param int $apiID * @access public - * @return void + * @return bool|array */ public function update($apiID) { From dd729bb202a495e83267da2ce8ae64220cbd1c7a Mon Sep 17 00:00:00 2001 From: liugang Date: Tue, 26 Oct 2021 14:55:15 +0800 Subject: [PATCH 11/19] * Fix return value. --- module/release/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/release/model.php b/module/release/model.php index 3ffa2e60e0..da4afb63c3 100644 --- a/module/release/model.php +++ b/module/release/model.php @@ -474,7 +474,7 @@ class releaseModel extends model public function changeStatus($releaseID, $status) { $this->dao->update(TABLE_RELEASE)->set('status')->eq($status)->where('id')->eq($releaseID)->exec(); - return dao::isError(); + return !dao::isError(); } /** From c884f078689765e3093d3ee661ddefdf3d230852 Mon Sep 17 00:00:00 2001 From: liugang Date: Tue, 26 Oct 2021 14:56:48 +0800 Subject: [PATCH 12/19] * Remove the outdated code. --- lib/base/front/front.class.php | 3 --- lib/front/front.class.php | 2 -- 2 files changed, 5 deletions(-) diff --git a/lib/base/front/front.class.php b/lib/base/front/front.class.php index 4779559811..a8cd5c52d1 100644 --- a/lib/base/front/front.class.php +++ b/lib/base/front/front.class.php @@ -172,7 +172,6 @@ class baseHTML $selectedItems = ",$selectedItems,"; foreach($options as $key => $value) { - $key = str_replace('item', '', $key); $selected = strpos($selectedItems, ",$key,") !== false ? " selected='selected'" : ''; $string .= "\n"; } @@ -209,7 +208,6 @@ class baseHTML $string .= "\n"; foreach($options as $key => $value) { - $key = str_replace('item', '', $key); $selected = strpos($selectedItems, ",$key,") !== false ? " selected='selected'" : ''; $string .= "\n"; } @@ -280,7 +278,6 @@ class baseHTML foreach($options as $key => $value) { - $key = str_replace('item', '', $key); if($isBlock) $string .= "
-
不能创建临时目录,请确认目录%s是否存在并有操作权限。
+
不能创建临时目录,请确认目录%s是否存在并有操作权限。
命令为:chmod o=rwx -R %s
Can't create tmp directory, make sure the directory %s exists and has permission to operate.
Commond: chmod o=rwx -R %s.
From 9edd3746121d0b0304f550f782a1ac7724f0c921 Mon Sep 17 00:00:00 2001 From: xiawenlong Date: Tue, 26 Oct 2021 14:06:45 +0800 Subject: [PATCH 07/19] * Finish task #43551. --- module/common/model.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module/common/model.php b/module/common/model.php index df20f14caa..236880cb26 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -740,6 +740,11 @@ class commonModel extends model } } + /* Check has views permission. */ + global $app; + $acls = $app->user->rights['acls']; + if($currentModule == 'report' and !(empty($acls['views'] || in_array($currentModule, $acls['views'])))) $display = false; + if(!$display) continue; /* Assign vars. */ From 17118b4595044ef2d52a5c1f05b0d8d1cf86d28d Mon Sep 17 00:00:00 2001 From: mayue Date: Tue, 26 Oct 2021 14:37:42 +0800 Subject: [PATCH 08/19] *Fix a bug #15739 --- module/api/control.php | 16 +--------------- module/api/model.php | 25 ++++++++++++++++++++----- module/api/view/edit.html.php | 1 + 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/module/api/control.php b/module/api/control.php index d601c7ba31..0c3c7253a0 100755 --- a/module/api/control.php +++ b/module/api/control.php @@ -414,21 +414,7 @@ class api extends control { if(helper::isAjaxRequest() && !empty($_POST)) { - $this->loadModel('api'); - - $now = helper::now(); - $userId = $this->app->user->account; - $params = fixer::input('post') - ->remove('type') - ->skipSpecial('params,response') - ->add('addedBy', $userId) - ->add('addedDate', $now) - ->add('editedBy', $userId) - ->add('editedDate', $now) - ->setDefault('product,module', 0) - ->get(); - - $changes = $this->api->update($apiID, $params); + $changes = $this->api->update($apiID); if(dao::isError()) return $this->sendError(dao::getError()); if($changes) diff --git a/module/api/model.php b/module/api/model.php index c5171d84e8..bead5e677a 100644 --- a/module/api/model.php +++ b/module/api/model.php @@ -192,14 +192,29 @@ class apiModel extends model /** * Update an api doc. * - * @param int $id - * @param object $data + * @param int $apiID * @access public * @return void */ - public function update($id, $data) + public function update($apiID) { - $oldApi = $this->dao->findByID($id)->from(TABLE_API)->fetch(); + $oldApi = $this->dao->findByID($apiID)->from(TABLE_API)->fetch(); + + if(!empty($_POST['editedDate']) and $oldApi->editedDate != $this->post->editedDate) + { + dao::$errors[] = $this->lang->error->editedByOther; + return false; + } + + $now = helper::now(); + $account = $this->app->user->account; + $data = fixer::input('post') + ->remove('type') + ->skipSpecial('params,response') + ->add('editedBy', $account) + ->add('editedDate', $now) + ->setDefault('product,module', 0) + ->get(); $data->id = $oldApi->id; $data->version = $oldApi->version + 1; @@ -212,7 +227,7 @@ class apiModel extends model ->data($data) ->autoCheck() ->batchCheck($this->config->api->edit->requiredFields, 'notempty') - ->where('id')->eq($id) + ->where('id')->eq($apiID) ->exec(); return common::createChanges($oldApi, $data); diff --git a/module/api/view/edit.html.php b/module/api/view/edit.html.php index 5441e6b912..0aba1ce526 100644 --- a/module/api/view/edit.html.php +++ b/module/api/view/edit.html.php @@ -227,6 +227,7 @@ js::set('api', $api);
+ editedDate);?> goback, "data-app='{$app->tab}'");?> goback, '', "class='btn btn-back btn-wide'");?>
- + - + @@ -64,13 +64,13 @@ code)):?> - + - + @@ -86,10 +86,10 @@ code)):?> - + - + acl == 'custom'):?> @@ -116,11 +116,11 @@ - + - + diff --git a/module/story/lang/en.php b/module/story/lang/en.php index d59c74c0bb..06a78366b2 100644 --- a/module/story/lang/en.php +++ b/module/story/lang/en.php @@ -115,8 +115,8 @@ $lang->story->stage = 'Phase'; $lang->story->stageAB = 'Phase'; $lang->story->stagedBy = 'SetBy'; $lang->story->mailto = 'Mailto'; -$lang->story->openedBy = 'CreatedBy'; -$lang->story->openedDate = 'CreatedDate'; +$lang->story->openedBy = 'Created By'; +$lang->story->openedDate = 'Created Date'; $lang->story->assignedTo = 'AssignTo'; $lang->story->assignedDate = 'AssignedDate'; $lang->story->lastEditedBy = 'EditedBy'; From 396d267729941e02649a2d95fb850253b8bf5026 Mon Sep 17 00:00:00 2001 From: zhouxin Date: Tue, 26 Oct 2021 16:00:50 +0800 Subject: [PATCH 16/19] Finish task #43561. --- module/story/lang/de.php | 2 +- module/story/lang/en.php | 2 +- module/story/lang/fr.php | 2 +- module/story/lang/vi.php | 2 +- module/story/lang/zh-cn.php | 2 +- module/story/lang/zh-tw.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/module/story/lang/de.php b/module/story/lang/de.php index e589726df6..7e01c9697c 100644 --- a/module/story/lang/de.php +++ b/module/story/lang/de.php @@ -254,7 +254,7 @@ $lang->story->lblClose = 'Close'; $lang->story->lblTBC = 'Task/Bug/Case'; $lang->story->checkAffection = 'Impact'; -$lang->story->affectedProjects = "{$lang->project->common}s/{$lang->execution->common}s"; +$lang->story->affectedProjects = $config->systemMode == 'new' ? "{$lang->project->common}s/{$lang->execution->common}s" : "{$lang->project->common}s"; $lang->story->affectedBugs = 'Bug'; $lang->story->affectedCases = 'Fall'; diff --git a/module/story/lang/en.php b/module/story/lang/en.php index d59c74c0bb..ad95ee7afc 100644 --- a/module/story/lang/en.php +++ b/module/story/lang/en.php @@ -256,7 +256,7 @@ $lang->story->lblClose = 'Close'; $lang->story->lblTBC = 'Task/Bug/Case'; $lang->story->checkAffection = 'Influence'; -$lang->story->affectedProjects = "{$lang->project->common}s/{$lang->execution->common}s"; +$lang->story->affectedProjects = $config->systemMode == 'new' ? "{$lang->project->common}s/{$lang->execution->common}s" : "{$lang->project->common}s"; $lang->story->affectedBugs = 'Bugs'; $lang->story->affectedCases = 'Cases'; diff --git a/module/story/lang/fr.php b/module/story/lang/fr.php index 3246283bd3..e90d636936 100644 --- a/module/story/lang/fr.php +++ b/module/story/lang/fr.php @@ -254,7 +254,7 @@ $lang->story->lblClose = 'Fermer'; $lang->story->lblTBC = 'Tâche/Bug/CasTest'; $lang->story->checkAffection = 'Influence'; -$lang->story->affectedProjects = "{$lang->project->common}s/{$lang->execution->common}s"; +$lang->story->affectedProjects = $config->systemMode == 'new' ? "{$lang->project->common}s/{$lang->execution->common}s" : "{$lang->project->common}s"; $lang->story->affectedBugs = 'Bugs'; $lang->story->affectedCases = 'CasTests'; diff --git a/module/story/lang/vi.php b/module/story/lang/vi.php index b8d22f1713..b12e410b61 100644 --- a/module/story/lang/vi.php +++ b/module/story/lang/vi.php @@ -254,7 +254,7 @@ $lang->story->lblClose = 'Đóng'; $lang->story->lblTBC = 'Nhiệm vụ/Bug/Tình huống'; $lang->story->checkAffection = 'Ảnh hưởng'; -$lang->story->affectedProjects = "{$lang->project->common}s/{$lang->execution->common}s"; +$lang->story->affectedProjects = $config->systemMode == 'new' ? "{$lang->project->common}s/{$lang->execution->common}s" : "{$lang->project->common}s"; $lang->story->affectedBugs = 'Bugs'; $lang->story->affectedCases = 'Tình huống'; diff --git a/module/story/lang/zh-cn.php b/module/story/lang/zh-cn.php index 30e658b15b..1d34df98bd 100644 --- a/module/story/lang/zh-cn.php +++ b/module/story/lang/zh-cn.php @@ -256,7 +256,7 @@ $lang->story->lblClose = "关闭{$lang->SRCommon}"; $lang->story->lblTBC = '任务Bug用例'; $lang->story->checkAffection = '影响范围'; -$lang->story->affectedProjects = "影响的{$lang->project->common}或{$lang->execution->common}"; +$lang->story->affectedProjects = $config->systemMode == 'new' ? "影响的{$lang->project->common}或{$lang->execution->common}" : "影响的{$lang->project->common}"; $lang->story->affectedBugs = '影响的Bug'; $lang->story->affectedCases = '影响的用例'; diff --git a/module/story/lang/zh-tw.php b/module/story/lang/zh-tw.php index a71dd8030a..c25e83ec61 100644 --- a/module/story/lang/zh-tw.php +++ b/module/story/lang/zh-tw.php @@ -256,7 +256,7 @@ $lang->story->lblClose = "關閉{$lang->SRCommon}"; $lang->story->lblTBC = '任務Bug用例'; $lang->story->checkAffection = '影響範圍'; -$lang->story->affectedProjects = "影響的{$lang->project->common}或{$lang->execution->common}"; +$lang->story->affectedProjects = $config->systemMode == 'new' ? "影響的{$lang->project->common}或{$lang->execution->common}": "影響的{$lang->project->common}"; $lang->story->affectedBugs = '影響的Bug'; $lang->story->affectedCases = '影響的用例'; From 131b428d20cdf3b70f48c84788b2d634c5a1d959 Mon Sep 17 00:00:00 2001 From: mayue Date: Tue, 26 Oct 2021 18:20:14 +0800 Subject: [PATCH 17/19] *Fix a bug #15712 --- module/story/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/story/model.php b/module/story/model.php index 90cc985186..25a49f5c07 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -3771,7 +3771,7 @@ class storyModel extends model common::printIcon('story', 'close', $vars, $story, 'list', '', '', 'iframe', true); common::printIcon('story', 'edit', $vars . "&from=$story->from", $story, 'list', '', '', '', false, "data-group=$story->from"); if($story->type != 'requirement') common::printIcon('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$vars", $story, 'list', 'sitemap', '', '', false, "data-app='qa'"); - common::printIcon('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=$story->module&storyID=$story->id", $story, 'list', 'split', '', '', '', '', $this->lang->story->subdivide); + if($this->app->rawModule != 'projectstory') common::printIcon('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=$story->module&storyID=$story->id", $story, 'list', 'split', '', '', '', '', $this->lang->story->subdivide); if($this->app->rawModule == 'projectstory') common::printIcon('projectstory', 'unlinkStory', "projectID={$this->session->project}&storyID=$story->id", '', 'list', 'unlink', 'hiddenwin'); } else From a6544b38edb7893d0220d0467ab2c0bc2f4f1a99 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Wed, 27 Oct 2021 10:05:51 +0800 Subject: [PATCH 18/19] * Finish task #43557. --- module/task/js/batchcreate.js | 9 --------- module/task/view/batchcreate.html.php | 9 +++------ 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/module/task/js/batchcreate.js b/module/task/js/batchcreate.js index e7ee7788cc..e16f20e260 100755 --- a/module/task/js/batchcreate.js +++ b/module/task/js/batchcreate.js @@ -222,15 +222,6 @@ $(document).on('mousedown', 'select', function() $(function() { - /* Adjust width for ie chosen width. */ - if(!hiddenStory) - { - var chosenWidth = $('#module1_chosen').width(); - } - else - { - var chosenWidth = 170; - } $('.chosen-container[id^=module]').width(chosenWidth); $('.chosen-container[id^=module]').css('max-width', chosenWidth); diff --git a/module/task/view/batchcreate.html.php b/module/task/view/batchcreate.html.php index 4298515d20..905c159823 100644 --- a/module/task/view/batchcreate.html.php +++ b/module/task/view/batchcreate.html.php @@ -51,8 +51,6 @@ } } $colspan = count($visibleFields) + 3; - $hiddenStory = ''; - if($hiddenStory and isset($visibleFields['story'])) $colspan -= 1; ?>
@@ -62,7 +60,7 @@
type != 'ops'):?> - + @@ -108,7 +106,7 @@ type != 'ops'):?> - -
productCommon;?> productCommon;?> PO);?> product->release;?> product->release;?> RD);?>
product->code;?>product->code;?> code;?> product->type;?> product->typeList, $product->type);?> story->openedBy?>story->openedBy?> createdBy);?>
productCommon . $lang->product->status;?>productCommon ." ". $lang->product->status;?> product->statusList, $product->status);?> product->acl;?>product->acl;?> code) ? "colspan='4'" : "colspan='2'";?>>product->aclList[$product->acl];?>
story->statusList['active'] . $space . $lang->story->common;?>story->statusList['active'] . $space . $lang->story->common;?> stories['active']?> product->plans?> plans?>product->bugs?>product->bugs?> bugs?>
idAB;?> '>task->module?> '>task->story;?>'>task->story;?> task->name;?> typeAB;?> style='overflow: visible'> + style='overflow: visible'>
@@ -176,7 +174,7 @@ id, \"%s\")'")?>
style='overflow: visible'> + style='overflow: visible'>
@@ -227,6 +225,5 @@ task->ditto);?> - From 554214895b1b5f9df6fbdb7a2cf4a8ced5a8993b Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Wed, 27 Oct 2021 10:26:23 +0800 Subject: [PATCH 19/19] * Finish task #43557 --- module/task/js/batchcreate.js | 1 - 1 file changed, 1 deletion(-) diff --git a/module/task/js/batchcreate.js b/module/task/js/batchcreate.js index e16f20e260..2b11382752 100755 --- a/module/task/js/batchcreate.js +++ b/module/task/js/batchcreate.js @@ -222,7 +222,6 @@ $(document).on('mousedown', 'select', function() $(function() { - $('.chosen-container[id^=module]').width(chosenWidth); $('.chosen-container[id^=module]').css('max-width', chosenWidth);