This commit is contained in:
daitingting
2024-01-10 01:46:48 +00:00
parent 42fb2fa11f
commit 87fca00a07
+9 -7
View File
@@ -645,8 +645,9 @@ class storyModel extends model
->where('id')->eq($storyID)->exec();
if(dao::isError()) return false;
$specChanged = $oldStory->version != $story->version;
$this->loadModel('file')->updateObjectID($this->post->uid, $storyID, 'story');
$specChanged = $oldStory->version != $story->version;
if($specChanged)
{
$addedFiles = $this->file->saveUpload($oldStory->type, $storyID, $story->version);
@@ -675,12 +676,6 @@ class storyModel extends model
$this->dao->update(TABLE_STORY)->set('URChanged')->eq(0)->where('id')->eq($oldStory->id)->exec();
$this->updateStoryVersion($newStory);
}
else
{
/* IF is requirement changed, notify its relation. */
$relations = $this->storyTao->getRelation($storyID, 'requirement');
$this->dao->update(TABLE_STORY)->set('URChanged')->eq(1)->where('id')->in($relations)->exec();
}
if($story->reviewerHasChanged)
{
@@ -1080,6 +1075,13 @@ class storyModel extends model
if($actionID) $this->action->logHistory($actionID, $changes);
}
if($story->result == 'pass' && $oldStory->type == 'requirement')
{
/* IF is requirement changed, notify its relation. */
$relations = $this->storyTao->getRelation($storyID, 'requirement');
$this->dao->update(TABLE_STORY)->set('URChanged')->eq(1)->where('id')->in($relations)->exec();
}
if(!empty($oldStory->twins)) $this->syncTwins($oldStory->id, $oldStory->twins, $changes, 'Reviewed');
return true;