diff --git a/module/story/model.php b/module/story/model.php index cfcd5844a7..e70e2a5796 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -795,12 +795,12 @@ class storyModel extends model ->where('id')->eq($storyID)->exec(); if(dao::isError()) return false; - $this->loadModel('file')->updateObjectID($this->post->uid, $storyID, 'story'); + $this->loadModel('file')->updateObjectID($this->post->uid, $storyID, $oldStory->type); $specChanged = $oldStory->version != $story->version; if($specChanged) { - $this->loadModel('file')->processFileDiffsForObject('story', $oldStory, $story, (string)$story->version); + $this->loadModel('file')->processFileDiffsForObject($oldStory->type, $oldStory, $story, (string)$story->version); $this->storyTao->doCreateSpec($storyID, $story, $story->files); if(!empty($story->reviewer)) $this->storyTao->doCreateReviewer($storyID, $story->reviewer, $story->version); @@ -871,8 +871,8 @@ class storyModel extends model if(dao::isError()) return false; $this->loadModel('action'); - $this->loadModel('file')->updateObjectID($this->post->uid, $storyID, 'story'); - $this->file->processFileDiffsForObject('story', $oldStory, $story, (string)$oldStory->version); + $this->loadModel('file')->updateObjectID($this->post->uid, $storyID, $oldStory->type); + $this->file->processFileDiffsForObject($oldStory->type, $oldStory, $story, (string)$oldStory->version); $this->storyTao->doUpdateSpec($storyID, $story, $oldStory); $this->storyTao->doUpdateLinkStories($storyID, $story, $oldStory); diff --git a/module/transfer/tao.php b/module/transfer/tao.php index fe3120611e..1526f44102 100644 --- a/module/transfer/tao.php +++ b/module/transfer/tao.php @@ -85,11 +85,11 @@ class transferTao extends transferModel */ protected function getFileGroups(string $module, array $idList): array { + if(in_array($module, array('epic', 'requirement'))) $module = "{$module},story"; return $this->dao->select('id, objectID, pathname, title')->from(TABLE_FILE) - ->where('objectType')->eq($module) + ->where('objectType')->in($module) ->beginIf($idList)->andWhere('objectID')->in($idList)->fi() - ->andWhere('extra') - ->ne('editor') + ->andWhere('extra')->ne('editor') ->fetchGroup('objectID'); }