diff --git a/module/task/model.php b/module/task/model.php index 2cb785747d..ae901f920b 100755 --- a/module/task/model.php +++ b/module/task/model.php @@ -3792,6 +3792,8 @@ class taskModel extends model public function confirmStoryChange(int $taskID): bool { $task = $this->getByID($taskID); + if($task->storyVersion == $task->latestStoryVersion) return true; + $this->dao->update(TABLE_TASK)->set('storyVersion')->eq($task->latestStoryVersion)->where('id')->eq($taskID)->exec(); $this->dao->update(TABLE_TASKTEAM)->set('storyVersion')->eq($task->latestStoryVersion)->where('task')->eq($taskID)->andWhere('account')->eq($this->app->user->account)->exec(); if(dao::isError()) return false; diff --git a/module/testcase/control.php b/module/testcase/control.php index e1a3860af3..bb5d477b0b 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -1102,7 +1102,7 @@ class testcase extends control if($case->story) { $story = $this->loadModel('story')->fetchBaseInfo($case->story); - if($story->version) + if($story->version != $case->storyVersion) { $this->dao->update(TABLE_CASE)->set('storyVersion')->eq($story->version)->where('id')->eq($caseID)->exec(); $this->loadModel('action')->create('case', $caseID, 'confirmed', '', $story->version);