From 97b2e63ea0bd682b8a797a798aa06b6e88048855 Mon Sep 17 00:00:00 2001 From: songchenxuan Date: Thu, 2 Dec 2021 08:14:58 +0800 Subject: [PATCH] * 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);