From 86d811108184dd231228ec6a63d435afaf720da7 Mon Sep 17 00:00:00 2001 From: songchenxuan Date: Wed, 1 Dec 2021 13:23:45 +0800 Subject: [PATCH 1/4] * Fix bug #16967. --- module/my/view/testcase.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/my/view/testcase.html.php b/module/my/view/testcase.html.php index ca9fd9f131..f23b15d871 100644 --- a/module/my/view/testcase.html.php +++ b/module/my/view/testcase.html.php @@ -77,7 +77,7 @@ - id); ?> + case); ?> pri?>' title='testcase->priList, $case->pri, $case->pri);?>'>testcase->priList, $case->pri, $case->pri)?> version";?> From 85ec2d1cc9e97ab11812cc83da7ff52dfdc44325 Mon Sep 17 00:00:00 2001 From: songchenxuan Date: Wed, 1 Dec 2021 16:11:35 +0800 Subject: [PATCH 2/4] * Fix bug #16967. --- module/my/view/testcase.html.php | 4 ++-- module/testcase/view/browse.html.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/my/view/testcase.html.php b/module/my/view/testcase.html.php index f23b15d871..8c7469cc5f 100644 --- a/module/my/view/testcase.html.php +++ b/module/my/view/testcase.html.php @@ -77,7 +77,7 @@ - case); ?> + id); ?> pri?>' title='testcase->priList, $case->pri, $case->pri);?>'>testcase->priList, $case->pri, $case->pri)?> version";?> @@ -117,7 +117,7 @@ if($canBatchEdit) { $actionLink = $this->createLink('testcase', 'batchEdit', "productID=0&branch=all"); - $misc = "data-form-action='$actionLink'"; + $misc = "onclick=\"setFormAction('$actionLink', '', '#myCaseForm')\""; echo html::commonButton($lang->edit, $misc); } if($canBatchRun) diff --git a/module/testcase/view/browse.html.php b/module/testcase/view/browse.html.php index bb574ce338..33d134774b 100644 --- a/module/testcase/view/browse.html.php +++ b/module/testcase/view/browse.html.php @@ -129,7 +129,7 @@ js::set('suiteID', $suiteID); echo html::commonButton($lang->testtask->runCase, $misc); $actionLink = $this->createLink('testcase', 'batchEdit', "productID=$productID&branch=$branch"); - $misc = $canBatchEdit ? "onclick=\"setFormAction('$actionLink')\"" : "disabled='disabled'"; + $misc = $canBatchEdit ? "onclick=\"setFormAction('$actionLink', '', '#caseForm')\"" : "disabled='disabled'"; echo html::commonButton($lang->edit, $misc); ?> From 97b2e63ea0bd682b8a797a798aa06b6e88048855 Mon Sep 17 00:00:00 2001 From: songchenxuan Date: Thu, 2 Dec 2021 08:14:58 +0800 Subject: [PATCH 3/4] * Fix bug #16967. --- module/my/view/testcase.html.php | 2 +- module/testcase/control.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/module/my/view/testcase.html.php b/module/my/view/testcase.html.php index 8c7469cc5f..6db6b892ae 100644 --- a/module/my/view/testcase.html.php +++ b/module/my/view/testcase.html.php @@ -116,7 +116,7 @@ createLink('testcase', 'batchEdit', "productID=0&branch=all"); + $actionLink = $this->createLink('testcase', 'batchEdit', "productID=0&branch=all&type=case&tab=my"); $misc = "onclick=\"setFormAction('$actionLink', '', '#myCaseForm')\""; echo html::commonButton($lang->edit, $misc); } diff --git a/module/testcase/control.php b/module/testcase/control.php index 0cf4106843..f3cad9c747 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -890,7 +890,7 @@ class testcase extends control * @access public * @return void */ - public function batchEdit($productID = 0, $branch = 0, $type = 'case') + public function batchEdit($productID = 0, $branch = 0, $type = 'case', $tab = '') { if($this->post->title) { @@ -972,8 +972,8 @@ class testcase extends control $cases = $this->dao->select('t1.*,t2.id as runID')->from(TABLE_CASE)->alias('t1') ->leftJoin(TABLE_TESTRUN)->alias('t2')->on('t1.id = t2.case') ->where('t1.deleted')->eq(0) - ->beginIF($this->app->tab == 'my')->andWhere('t2.id')->in($caseIDList)->fi() - ->beginIF($this->app->tab != 'my')->andWhere('t1.id')->in($caseIDList)->fi() + ->beginIF($tab == 'my')->andWhere('t2.id')->in($caseIDList)->fi() + ->beginIF($tab != 'my')->andWhere('t1.id')->in($caseIDList)->fi() ->fetchAll('id'); $caseIDList = array_keys($cases); From 0e97d5b4199b599b51951ca66039791d6d8287ee Mon Sep 17 00:00:00 2001 From: songchenxuan Date: Thu, 2 Dec 2021 08:17:13 +0800 Subject: [PATCH 4/4] * Fix bug #16967. --- module/my/view/testcase.html.php | 2 +- module/testcase/view/browse.html.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/my/view/testcase.html.php b/module/my/view/testcase.html.php index 6db6b892ae..b2d275fa91 100644 --- a/module/my/view/testcase.html.php +++ b/module/my/view/testcase.html.php @@ -117,7 +117,7 @@ if($canBatchEdit) { $actionLink = $this->createLink('testcase', 'batchEdit', "productID=0&branch=all&type=case&tab=my"); - $misc = "onclick=\"setFormAction('$actionLink', '', '#myCaseForm')\""; + $misc = "data-form-action='$actionLink'"; echo html::commonButton($lang->edit, $misc); } if($canBatchRun) diff --git a/module/testcase/view/browse.html.php b/module/testcase/view/browse.html.php index 33d134774b..bb574ce338 100644 --- a/module/testcase/view/browse.html.php +++ b/module/testcase/view/browse.html.php @@ -129,7 +129,7 @@ js::set('suiteID', $suiteID); echo html::commonButton($lang->testtask->runCase, $misc); $actionLink = $this->createLink('testcase', 'batchEdit', "productID=$productID&branch=$branch"); - $misc = $canBatchEdit ? "onclick=\"setFormAction('$actionLink', '', '#caseForm')\"" : "disabled='disabled'"; + $misc = $canBatchEdit ? "onclick=\"setFormAction('$actionLink')\"" : "disabled='disabled'"; echo html::commonButton($lang->edit, $misc); ?>