diff --git a/module/testcase/control.php b/module/testcase/control.php index 0a70d0dd81..e7c51b6b98 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -993,11 +993,11 @@ class testcase extends control * @access public * @return void */ - public function confirmChange($caseID, $from = 'view') + public function confirmChange($caseID, $taskID = 0, $from = 'view') { $case = $this->testcase->getById($caseID); $this->dao->update(TABLE_TESTRUN)->set('version')->eq($case->version)->where('`case`')->eq($caseID)->exec(); - if($from == 'view') die(js::locate(inLink('view', "caseID=$caseID"), 'parent')); + if($from == 'view') die(js::locate(inlink('view', "caseID=$caseID&version=$case->version&from=testtask&taskID=$taskID"), 'parent')); die(js::reload('parent')); } diff --git a/module/testcase/view/view.html.php b/module/testcase/view/view.html.php index 2afa66376d..4ba36914ac 100644 --- a/module/testcase/view/view.html.php +++ b/module/testcase/view/view.html.php @@ -223,7 +223,7 @@ if($case->version > $case->currentVersion and $from == 'testtask') { echo "(testcase->fromTesttask}>{$lang->testcase->changed} "; - if(common::hasPriv('testcase', 'confirmchange')) echo html::a($this->createLink('testcase', 'confirmchange', "caseID=$case->id"), $lang->testcase->sync, 'hiddenwin', "class='btn btn-mini btn-info'"); + if(common::hasPriv('testcase', 'confirmchange')) echo html::a($this->createLink('testcase', 'confirmchange', "caseID=$case->id&taskID=$taskID"), $lang->testcase->sync, 'hiddenwin', "class='btn btn-mini btn-info'"); echo ")"; } if(isset($case->fromCaseVersion) and $case->fromCaseVersion > $case->version and $from != 'testtask') diff --git a/module/testtask/model.php b/module/testtask/model.php index e7d2b9c3a0..d2abd38e79 100644 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -1278,7 +1278,7 @@ class testtaskModel extends model case 'actions': if($caseChanged) { - common::printIcon('testcase', 'confirmChange', "id=$run->case&from=list", $run, 'list', 'search', 'hiddenwin'); + common::printIcon('testcase', 'confirmChange', "id=$run->case&taskID=$run->task&from=list", $run, 'list', 'search', 'hiddenwin'); break; }