diff --git a/module/my/view/testcase.html.php b/module/my/view/testcase.html.php
index ca9fd9f131..b2d275fa91 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 = "data-form-action='$actionLink'";
echo html::commonButton($lang->edit, $misc);
}
diff --git a/module/testcase/control.php b/module/testcase/control.php
index 5710c60b0d..8b7d862e35 100644
--- a/module/testcase/control.php
+++ b/module/testcase/control.php
@@ -889,7 +889,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)
{
@@ -971,8 +971,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);