From 50b39ac2d55074676591a413b252fa6cd22d6790 Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Wed, 18 May 2022 03:13:21 +0000 Subject: [PATCH 01/45] * Finish task #54477. --- module/project/control.php | 9 ++++++++- module/project/view/createguide.html.php | 6 +++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/module/project/control.php b/module/project/control.php index bb048bcf56..00926f96cd 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -434,7 +434,14 @@ class project extends control if($this->app->tab == 'program') { - return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('program', 'browse'))); + if(empty($programID)) + { + return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('program', 'browse'))); + } + else + { + return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('program', 'project', 'program=' . $programID))); + } } elseif($this->app->tab == 'doc') { diff --git a/module/project/view/createguide.html.php b/module/project/view/createguide.html.php index 9d333eca4d..6231872da1 100644 --- a/module/project/view/createguide.html.php +++ b/module/project/view/createguide.html.php @@ -22,21 +22,21 @@
- createLink("project", "create", "model=scrum&programID=$programID©ProjectID=0&extra=productID=$productID,branchID=$branchID"), "", '', "data-app='project' class='createButton'")?> + createLink("project", "create", "model=scrum&programID=$programID©ProjectID=0&extra=productID=$productID,branchID=$branchID"), "", '', "data-app='{$this->app->tab}' class='createButton'")?>

project->scrum; ?>

project->scrumTitle; ?>

- createLink("project", "create", "model=waterfall&programID=$programID©ProjectID=0&extra=productID=$productID,branchID=$branchID"), "", '', "data-app='project' class='createButton'")?> + createLink("project", "create", "model=waterfall&programID=$programID©ProjectID=0&extra=productID=$productID,branchID=$branchID"), "", '', "data-app='{$this->app->tab}' class='createButton'")?>

project->waterfall; ?>

project->waterfallTitle; ?>

- createLink("project", "create", "model=kanban&programID=$programID©ProjectID=0&extra=productID=$productID,branchID=$branchID"), "", '', "data-app='project' class='createButton'")?> + createLink("project", "create", "model=kanban&programID=$programID©ProjectID=0&extra=productID=$productID,branchID=$branchID"), "", '', "data-app='{$this->app->tab}' class='createButton'")?>

project->kanban;?>

project->kanbanTitle;?>

From 0cdfceebc93e53751328cc24f9a41f1089f3c147 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Wed, 18 May 2022 17:11:09 +0800 Subject: [PATCH 02/45] * Code for task#54477. --- module/project/control.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/project/control.php b/module/project/control.php index 00926f96cd..2eb4c26fab 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -440,7 +440,7 @@ class project extends control } else { - return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('program', 'project', 'program=' . $programID))); + return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('program', 'project', "programID=$programID"))); } } elseif($this->app->tab == 'doc') @@ -498,6 +498,7 @@ class project extends control } if($this->app->tab == 'doc') unset($this->lang->doc->menu->project['subMenu']); + if($this->app->tab == 'product' and isset($output['productID'])) $this->loadModel('product')->setMenu($output['productID']); $topProgramID = $this->program->getTopByID($programID); From 430209e92b7c48c6781f715629ce7810d2ee06da Mon Sep 17 00:00:00 2001 From: zenggang Date: Thu, 19 May 2022 03:23:35 +0000 Subject: [PATCH 03/45] * Fix bug#22554,22673 --- module/action/control.php | 3 ++- module/productplan/control.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/module/action/control.php b/module/action/control.php index 2df3d88288..ac9224fabe 100755 --- a/module/action/control.php +++ b/module/action/control.php @@ -175,7 +175,8 @@ class action extends control { $story = $this->loadModel('story')->getById($objectID); $executions = explode(',', $this->app->user->view->sprints); - if(!array_intersect(array_keys($story->executions), $executions)) return print(js::error($this->lang->error->accessDenied)); + $products = explode(',', $this->app->user->view->products); + if(!array_intersect(array_keys($story->executions), $executions) and !in_array($story->product, $products)) return print(js::error($this->lang->error->accessDenied)); } $actionID = $this->action->create($objectType, $objectID, 'Commented', $this->post->comment); diff --git a/module/productplan/control.php b/module/productplan/control.php index 85cd593b8c..8eca73eb17 100644 --- a/module/productplan/control.php +++ b/module/productplan/control.php @@ -372,7 +372,7 @@ class productplan extends control * @access public * @return void */ - public function view($planID = 0, $type = 'story', $orderBy = 'id_desc', $link = 'false', $param = '', $recTotal = 0, $recPerPage = 100, $pageID = 1) + public function view($planID = 0, $type = 'story', $orderBy = 'order_asc', $link = 'false', $param = '', $recTotal = 0, $recPerPage = 100, $pageID = 1) { $planID = (int)$planID; $plan = $this->productplan->getByID($planID, true); From b5e98b46eaee11dc36979e14ed121a562b02bede Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Thu, 19 May 2022 05:20:51 +0000 Subject: [PATCH 04/45] * Finish task #54471. --- module/my/lang/en.php | 1 + module/my/lang/zh-cn.php | 1 + module/my/view/preference.html.php | 10 +++++++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/module/my/lang/en.php b/module/my/lang/en.php index a8a1c61bcf..306da142f5 100644 --- a/module/my/lang/en.php +++ b/module/my/lang/en.php @@ -42,6 +42,7 @@ $lang->my->testtask = 'My Test Task'; $lang->my->testcase = 'My Case'; $lang->my->storyConcept = 'Story Concept'; $lang->my->pri = 'Priority'; +$thid->my->alert = 'Later, you can click the avatar at the top right and select "Preference" to modify the information.'; $lang->my->indexAction = 'My Index'; $lang->my->calendarAction = 'My Calendar'; diff --git a/module/my/lang/zh-cn.php b/module/my/lang/zh-cn.php index 8a59dfb2ca..a0a4e36334 100644 --- a/module/my/lang/zh-cn.php +++ b/module/my/lang/zh-cn.php @@ -42,6 +42,7 @@ $lang->my->testtask = '我的测试单'; $lang->my->testcase = '我的用例'; $lang->my->storyConcept = $config->URAndSR ? '默认需求概念组合' : '默认需求概念'; $lang->my->pri = '优先级'; +$lang->my->alert = '后续您可以点击右上方的头像,选择“个性化设置”修改信息。'; $lang->my->indexAction = '地盘仪表盘'; $lang->my->calendarAction = '我的日程'; diff --git a/module/my/view/preference.html.php b/module/my/view/preference.html.php index e2d0e772b0..3d37c4eeef 100755 --- a/module/my/view/preference.html.php +++ b/module/my/view/preference.html.php @@ -68,7 +68,15 @@ html,body {height: 100%;} - + + + +
+
+ my->alert;?> +
+ + From 2b7a97731ccfee6ba3a2ed2e85ac20d08c3e3e84 Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Thu, 19 May 2022 05:27:22 +0000 Subject: [PATCH 05/45] * Finish task #54471. --- module/my/lang/en.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/my/lang/en.php b/module/my/lang/en.php index 306da142f5..1ca02beb4b 100644 --- a/module/my/lang/en.php +++ b/module/my/lang/en.php @@ -42,7 +42,7 @@ $lang->my->testtask = 'My Test Task'; $lang->my->testcase = 'My Case'; $lang->my->storyConcept = 'Story Concept'; $lang->my->pri = 'Priority'; -$thid->my->alert = 'Later, you can click the avatar at the top right and select "Preference" to modify the information.'; +$thid->my->alert = 'You can click on your profile at the top right and select "Preference" to modify your information. '; $lang->my->indexAction = 'My Index'; $lang->my->calendarAction = 'My Calendar'; From cd399239cd1ce4698349be93c95ed0a2524017a8 Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Thu, 19 May 2022 05:47:14 +0000 Subject: [PATCH 06/45] * Finish task #54471. --- module/my/lang/en.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/my/lang/en.php b/module/my/lang/en.php index 1ca02beb4b..344033dd8f 100644 --- a/module/my/lang/en.php +++ b/module/my/lang/en.php @@ -42,7 +42,7 @@ $lang->my->testtask = 'My Test Task'; $lang->my->testcase = 'My Case'; $lang->my->storyConcept = 'Story Concept'; $lang->my->pri = 'Priority'; -$thid->my->alert = 'You can click on your profile at the top right and select "Preference" to modify your information. '; +$lang->my->alert = 'You can click on your profile at the top right and select "Preference" to modify your information. '; $lang->my->indexAction = 'My Index'; $lang->my->calendarAction = 'My Calendar'; From 8b6c4b1e3855e2e5a5780adef1f6116268eecded Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Thu, 19 May 2022 06:03:18 +0000 Subject: [PATCH 07/45] * Finish task #54471. --- module/my/css/preference.css | 1 + module/my/view/preference.html.php | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 module/my/css/preference.css diff --git a/module/my/css/preference.css b/module/my/css/preference.css new file mode 100644 index 0000000000..d5e009ffa0 --- /dev/null +++ b/module/my/css/preference.css @@ -0,0 +1 @@ +.tip {margin-top: 10px;} diff --git a/module/my/view/preference.html.php b/module/my/view/preference.html.php index 3d37c4eeef..509bc66434 100755 --- a/module/my/view/preference.html.php +++ b/module/my/view/preference.html.php @@ -72,8 +72,7 @@ html,body {height: 100%;}
-
- my->alert;?> +

my->alert;?>

From 463ff11e9dffaf21958879cf7d794fe7c8494740 Mon Sep 17 00:00:00 2001 From: zenggang Date: Thu, 19 May 2022 07:03:55 +0000 Subject: [PATCH 08/45] * Add project name --- module/execution/css/importtask.css | 2 +- module/execution/model.php | 20 ++++++++------------ module/execution/view/importtask.html.php | 2 +- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/module/execution/css/importtask.css b/module/execution/css/importtask.css index 942bf6c0f9..f05cfeace0 100644 --- a/module/execution/css/importtask.css +++ b/module/execution/css/importtask.css @@ -1,2 +1,2 @@ #fromproject_chosen .chosen-single {width: 220px;} -.c-name {width: 150px;} +.c-name {width: 200px;} diff --git a/module/execution/model.php b/module/execution/model.php index 689ec1dcfb..108f02118b 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -1929,18 +1929,14 @@ class executionModel extends model */ public function getToImport($executionIds, $type) { - $executions = $this->dao->select('*')->from(TABLE_EXECUTION) - ->where('id')->in($executionIds) - ->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->sprints)->fi() - ->andWhere('type')->eq($type) - ->andWhere('deleted')->eq(0) - ->orderBy('id desc') - ->fetchAll('id'); - - $pairs = array(); - $now = date('Y-m-d'); - foreach($executions as $id => $execution) $pairs[$id] = $execution->name; - return $pairs; + return $this->dao->select('t1.id,concat_ws(" / ", t2.name, t1.name) as name')->from(TABLE_EXECUTION)->alias('t1') + ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t2.id=t1.project') + ->where('t1.id')->in($executionIds) + ->beginIF(!$this->app->user->admin)->andWhere('t1.id')->in($this->app->user->view->sprints)->fi() + ->andWhere('t1.type')->eq($type) + ->andWhere('t1.deleted')->eq(0) + ->orderBy('t1.id desc') + ->fetchPairs('id', 'name'); } /** diff --git a/module/execution/view/importtask.html.php b/module/execution/view/importtask.html.php index 5baf2ceadd..e03a6f48d7 100644 --- a/module/execution/view/importtask.html.php +++ b/module/execution/view/importtask.html.php @@ -53,7 +53,7 @@
id);?> - execution];?> + execution];?> pri == '0' ? '' : zget($lang->task->priList, $task->pri, $task->pri);?> id", $task->name)) echo $task->name;?> >assignedToRealName;?> From c5fd021c6e05ca4ab0b9d0779e1dbc4ad030076b Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 19 May 2022 15:25:18 +0800 Subject: [PATCH 09/45] * Add testcase of user module. --- test/class/user.class.php | 11 +++++++++++ test/model/user/getcancreatestoryusers.php | 18 ++++++++++++++++++ test/model/user/getlist.php | 2 +- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100755 test/model/user/getcancreatestoryusers.php diff --git a/test/class/user.class.php b/test/class/user.class.php index 51e4393123..92abbd2b55 100755 --- a/test/class/user.class.php +++ b/test/class/user.class.php @@ -932,4 +932,15 @@ class userTest { return $this->objectModel->getVisionList(); } + + /** + * Get users who have authority to create stories. + * + * @access public + * @return array + */ + public function getCanCreateStoryUsersTest() + { + return $this->objectModel->getCanCreateStoryUsers(); + } } diff --git a/test/model/user/getcancreatestoryusers.php b/test/model/user/getcancreatestoryusers.php new file mode 100755 index 0000000000..8964304e65 --- /dev/null +++ b/test/model/user/getcancreatestoryusers.php @@ -0,0 +1,18 @@ +#!/usr/bin/env php +getCanCreateStoryUsers(); +cid=1 +pid=1 + +查找系统中有权限创建、批量创建需求的用户 >> A:admin;T:产品主管48 + +*/ + +$user = new userTest(); +r($user->getCanCreateStoryUsersTest()) && p('admin;td48') && e('A:admin;T:产品主管48'); //查找系统中有权限创建、批量创建需求的用户 diff --git a/test/model/user/getlist.php b/test/model/user/getlist.php index abb3fa8847..8e8ca259cb 100755 --- a/test/model/user/getlist.php +++ b/test/model/user/getlist.php @@ -18,7 +18,7 @@ pid=1 */ $user = new userTest(); -a($user->getListTest());die; + r($user->getListTest()) && p('1:realname') && e('开发1'); //查找系统中第二个未删除的、内部用户真实姓名,根据account正序排 r($user->getListTest()) && p('998:realname') && e('测试99'); //查找系统中未删除的、根据account正序排的最后一个用户的姓名 r($user->getListTest(true)) && p() && e('999'); //查找系统中所有未删除的、内部用户的数量 From 7ef420688efa6fd178a33803e88cbd3b2a39dc71 Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Thu, 19 May 2022 07:53:07 +0000 Subject: [PATCH 10/45] * Finish task #54471. --- module/common/model.php | 2 +- module/my/control.php | 3 ++- module/my/view/preference.html.php | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/module/common/model.php b/module/common/model.php index b3ef19aac3..2ef0c334fe 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -450,7 +450,7 @@ class commonModel extends model echo '
  • ' . html::a(helper::createLink('tutorial', 'start'), " " . $lang->tutorialAB, '', "class='iframe' data-class-name='modal-inverse' data-width='800' data-headerless='true' data-backdrop='true' data-keyboard='true'") . '
  • '; } - echo '
  • ' . html::a(helper::createLink('my', 'preference', '', '', true), " " . $lang->preference, '', "class='iframe' data-width='700'") . '
  • '; + echo '
  • ' . html::a(helper::createLink('my', 'preference', 'false', '', true), " " . $lang->preference, '', "class='iframe' data-width='700'") . '
  • '; } if(common::hasPriv('my', 'changePassword')) echo '
  • ' . html::a(helper::createLink('my', 'changepassword', '', '', true), " " . $lang->changePassword, '', "class='iframe' data-width='600'") . '
  • '; diff --git a/module/my/control.php b/module/my/control.php index f4c29ef4dd..3850eda41f 100755 --- a/module/my/control.php +++ b/module/my/control.php @@ -1205,7 +1205,7 @@ EOF; * @access public * @return void */ - public function preference() + public function preference($showTip = true) { $this->loadModel('setting'); @@ -1221,6 +1221,7 @@ EOF; $this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->preference; $this->view->position[] = $this->lang->my->preference; + $this->view->showTip = $showTip; $this->view->URSRList = $this->loadModel('custom')->getURSRPairs(); $this->view->URSR = $this->setting->getURSR(); diff --git a/module/my/view/preference.html.php b/module/my/view/preference.html.php index 509bc66434..73cf4e670b 100755 --- a/module/my/view/preference.html.php +++ b/module/my/view/preference.html.php @@ -70,7 +70,7 @@ html,body {height: 100%;} - +

    my->alert;?>

    From de835ecb3e3a9bc8494e19cc10780731bbc5cd90 Mon Sep 17 00:00:00 2001 From: zenggang Date: Thu, 19 May 2022 08:08:39 +0000 Subject: [PATCH 11/45] * Fix bug#22555 --- module/execution/control.php | 2 +- module/execution/js/story.js | 2 +- module/execution/view/story.html.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index 27a71cf6e5..83e3c5e8b0 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -679,7 +679,7 @@ class execution extends control * @access public * @return void */ - public function story($executionID = 0, $orderBy = 'order_desc', $type = 'all', $param = 0, $recTotal = 0, $recPerPage = 50, $pageID = 1) + public function story($executionID = 0, $orderBy = 'order_asc', $type = 'all', $param = 0, $recTotal = 0, $recPerPage = 50, $pageID = 1) { /* Load these models. */ $this->loadModel('story'); diff --git a/module/execution/js/story.js b/module/execution/js/story.js index cc62255f89..85903c09fb 100644 --- a/module/execution/js/story.js +++ b/module/execution/js/story.js @@ -10,7 +10,7 @@ $(function() $target.hide(); $target.fadeIn(1000); order = 'order_asc' - history.pushState({}, 0, createLink('project', 'story', "executionID=" + executionID + '&orderBy=' + order)); + history.pushState({}, 0, createLink('execution', 'story', "executionID=" + executionID + '&orderBy=' + order)); }); }); diff --git a/module/execution/view/story.html.php b/module/execution/view/story.html.php index ddc55901e9..486bf36df5 100644 --- a/module/execution/view/story.html.php +++ b/module/execution/view/story.html.php @@ -46,8 +46,8 @@ createLink('execution', 'story', "executionID=$execution->id&orderBy=order_desc&type=all"), "{$lang->story->allStories}" . ($type == 'all' ? " {$pager->recTotal}" : ''), '', "class='btn btn-link" . ($type == 'all' ? " btn-active-text" : '') . "'"); - echo html::a($this->createLink('execution', 'story', "executionID=$execution->id&orderBy=order_desc&type=unclosed"), "{$lang->story->unclosed}" . ($type == 'unclosed' ? " {$pager->recTotal}" : ''), '', "class='btn btn-link" . ($type == 'unclosed' ? " btn-active-text" : '') . "'"); + echo html::a($this->createLink('execution', 'story', "executionID=$execution->id&orderBy=order_asc&type=all"), "{$lang->story->allStories}" . ($type == 'all' ? " {$pager->recTotal}" : ''), '', "class='btn btn-link" . ($type == 'all' ? " btn-active-text" : '') . "'"); + echo html::a($this->createLink('execution', 'story', "executionID=$execution->id&orderBy=order_asc&type=unclosed"), "{$lang->story->unclosed}" . ($type == 'unclosed' ? " {$pager->recTotal}" : ''), '', "class='btn btn-link" . ($type == 'unclosed' ? " btn-active-text" : '') . "'"); } if(common::hasPriv('execution', 'storykanban')) echo html::a($this->createLink('execution', 'storykanban', "executionID=$execution->id"), "{$lang->execution->kanban}", '', "class='btn btn-link'"); ?> From 087b3ac65fd55713b7690e267c7988099cfcbd2d Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Thu, 19 May 2022 16:20:35 +0800 Subject: [PATCH 12/45] * Code for task#54467. --- module/kanban/model.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/kanban/model.php b/module/kanban/model.php index 1ec4b7fc47..27843d9e90 100644 --- a/module/kanban/model.php +++ b/module/kanban/model.php @@ -1519,7 +1519,9 @@ class kanbanModel extends model if($browseType == 'task') { - $cardData['name'] = $object->name; + $cardData['name'] = $object->name; + $cardData['status'] = $object->status; + $cardData['left'] = $object->left; } else { From 765cf7438e9f86fa5ea39731af85310e8aa31ea4 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 19 May 2022 16:25:06 +0800 Subject: [PATCH 13/45] * When mandatory review, add required items to the review. --- module/story/control.php | 1 + module/story/view/batchcreate.html.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/module/story/control.php b/module/story/control.php index 1fb8b8e976..29425f0ff2 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -602,6 +602,7 @@ class story extends control $this->view->branches = $branches; /* When the user is product owner or add story in project or not set review, the default is not to review. */ $this->view->needReview = ($this->app->user->account == $product->PO || $executionID > 0 || $this->config->story->needReview == 0) ? 0 : 1; + $this->view->forceReview = $this->story->checkForceReview(); $this->view->executionID = $executionID; $this->display(); diff --git a/module/story/view/batchcreate.html.php b/module/story/view/batchcreate.html.php index 13876bf8a5..6c9f1ff6c0 100755 --- a/module/story/view/batchcreate.html.php +++ b/module/story/view/batchcreate.html.php @@ -62,7 +62,7 @@ story->category;?> '>story->pri;?> '>story->estimate;?> - ' style="width: 200px !important">story->reviewedBy;?> + ' style="width: 200px !important">story->reviewedBy;?> '>story->keywords;?> story->getFlowExtendFields(); From 2f751595cca29e7331e0960d7175baa7967c8bb4 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 19 May 2022 16:25:58 +0800 Subject: [PATCH 14/45] * Resoled issue #640. --- module/testcase/js/batchcreate.js | 15 +++++++++++++++ module/testcase/js/batchedit.js | 15 +++++++++++++++ module/testcase/view/batchcreate.html.php | 1 + module/testcase/view/batchedit.html.php | 1 + 4 files changed, 32 insertions(+) diff --git a/module/testcase/js/batchcreate.js b/module/testcase/js/batchcreate.js index 009b944c14..8a788bd65a 100644 --- a/module/testcase/js/batchcreate.js +++ b/module/testcase/js/batchcreate.js @@ -26,4 +26,19 @@ $(document).ready(function() inputFocusJump('down'); } }); + + $('#customField').click(function() + { + $('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function() + { + var field = ',' + $(this).val() + ','; + var required = ',' + requiredFields + ','; + if(required.indexOf(field) >= 0) $(this).attr('disabled', 'disabled'); + }); + }); + + $('#formSettingForm .btn-primary').click(function() + { + $('#formSettingForm > .checkboxes > .checkbox-primary > input').removeAttr('disabled'); + }); }); diff --git a/module/testcase/js/batchedit.js b/module/testcase/js/batchedit.js index 94f8c09890..280f5d2e45 100644 --- a/module/testcase/js/batchedit.js +++ b/module/testcase/js/batchedit.js @@ -113,6 +113,21 @@ $(function() }); }); } + + $('#customField').click(function() + { + $('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function() + { + var field = ',' + $(this).val() + ','; + var required = ',' + requiredFields + ','; + if(required.indexOf(field) >= 0) $(this).attr('disabled', 'disabled'); + }); + }); + + $('#formSettingForm .btn-primary').click(function() + { + $('#formSettingForm > .checkboxes > .checkbox-primary > input').removeAttr('disabled'); + }); }); $(document).on('click', '.chosen-with-drop', function(){oldValue = $(this).prev('select').val();})//Save old value. diff --git a/module/testcase/view/batchcreate.html.php b/module/testcase/view/batchcreate.html.php index a9102056f6..3a225bceb2 100644 --- a/module/testcase/view/batchcreate.html.php +++ b/module/testcase/view/batchcreate.html.php @@ -14,6 +14,7 @@ testcase->batchCreate);?> +testcase->create->requiredFields)?>

    diff --git a/module/testcase/view/batchedit.html.php b/module/testcase/view/batchedit.html.php index 8a7aca5fb6..e4ab1fabde 100644 --- a/module/testcase/view/batchedit.html.php +++ b/module/testcase/view/batchedit.html.php @@ -16,6 +16,7 @@ testcase->confirmUnlinkTesttask);?> +testcase->edit->requiredFields)?>

    testcase->common . $lang->colon . $lang->testcase->batchEdit;?>

    From ab9f80ecfbfd72e3b96a483c7a3e8eb0afeaf5d5 Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Thu, 19 May 2022 08:52:19 +0000 Subject: [PATCH 15/45] * Finish task #54478. --- module/execution/control.php | 6 +++++- module/execution/lang/en.php | 3 ++- module/execution/lang/zh-cn.php | 1 + module/execution/view/create.html.php | 2 +- module/execution/view/tips.html.php | 3 ++- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index 27a71cf6e5..832e49b77b 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -3152,8 +3152,12 @@ class execution extends control */ public function tips($executionID) { - $this->view->execution = $this->execution->getById($executionID); + $execution = $this->execution->getById($executionID); + $projectID = $execution->project; + + $this->view->execution = $execution; $this->view->executionID = $executionID; + $this->view->projectID = $projectID; $this->display('execution', 'tips'); } diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index 8236f40263..92c51bbe04 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -358,7 +358,8 @@ $lang->execution->afterInfo = "{$lang->executionCommon} is cre $lang->execution->setTeam = 'Set Team'; $lang->execution->linkStory = 'Link Story'; $lang->execution->createTask = 'Create Task'; -$lang->execution->goback = "Go Back"; +$lang->execution->goback = "Go Back Task List"; +$lang->execution->gobackExecution = "Go Back Executioni List"; $lang->execution->noweekend = 'Exclude Weekend'; $lang->execution->nodelay = 'Exclude Delay Date'; $lang->execution->withweekend = 'Include Weekend'; diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index 80299ff188..214478b5d6 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -359,6 +359,7 @@ $lang->execution->setTeam = '设置团队'; $lang->execution->linkStory = "关联{$lang->SRCommon}"; $lang->execution->createTask = '创建任务'; $lang->execution->goback = "返回任务列表"; +$lang->execution->gobackExecution = "返回迭代列表"; $lang->execution->noweekend = '去除周末'; $lang->execution->nodelay = '去除延期日期'; $lang->execution->withweekend = '显示周末'; diff --git a/module/execution/view/create.html.php b/module/execution/view/create.html.php index 434c094f6c..92bcc82447 100644 --- a/module/execution/view/create.html.php +++ b/module/execution/view/create.html.php @@ -15,7 +15,7 @@ createLink('execution', 'task', "execution=$executionID");?> -