This commit is contained in:
songchenxuan
2021-12-02 08:14:58 +08:00
parent 85ec2d1cc9
commit 97b2e63ea0
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -116,7 +116,7 @@
<?php
if($canBatchEdit)
{
$actionLink = $this->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);
}
+3 -3
View File
@@ -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);