diff --git a/module/testcase/control.php b/module/testcase/control.php index d1e1e08687..7385613c8e 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -1404,7 +1404,13 @@ class testcase extends control $case = $this->testcase->getById($caseID); $libCase = $this->testcase->getById($libcaseID); $version = $case->version + 1; - $this->dao->update(TABLE_CASE)->set('version')->eq($version)->set('fromCaseVersion')->eq($version)->where('id')->eq($caseID)->exec(); + $this->dao->update(TABLE_CASE) + ->set('version')->eq($version) + ->set('fromCaseVersion')->eq($version) + ->set('precondition')->eq($libCase->precondition) + ->where('id')->eq($caseID) + ->exec(); + foreach($libCase->steps as $step) { unset($step->id);