diff --git a/module/story/model.php b/module/story/model.php index 7d39eb5fba..a50a40f960 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -1201,7 +1201,7 @@ class storyModel extends model $story = new stdclass(); $story->title = $titleList[$twinID]->title; $story->version = $oldStory->version - 1; - $story->status = ($this->config->systemMode == 'PLM' and $oldStory->type == 'requirement') ? 'launched' : 'active'; + $story->status = ($this->config->systemMode == 'PLM' and $oldStory->type == 'requirement' and $this->config->vision == 'rnd') ? 'launched' : 'active'; $this->dao->update(TABLE_STORY)->set('title')->eq($story->title)->set('version')->eq($story->version)->set('status')->eq($story->status)->where('id')->eq($storyID)->exec(); } @@ -1240,7 +1240,7 @@ class storyModel extends model } $story->reviewer = implode(',', $story->reviewer); - $story->status = ($this->config->systemMode == 'PLM' and $oldStory->type == 'requirement' and $story->status == 'active') ? 'launched' : 'reviewing'; + $story->status = ($this->config->systemMode == 'PLM' and $oldStory->type == 'requirement' and $story->status == 'active' and $this->config->vision == 'rnd') ? 'launched' : 'reviewing'; $this->dao->update(TABLE_STORY)->data($story, 'reviewer')->where('id')->in($twinsIdList)->exec(); @@ -1783,7 +1783,7 @@ class storyModel extends model $story->status = $this->getActivateStatus($storyID); /* If in ipd mode, set requirement status = 'launched'. */ - if($this->config->systemMode == 'PLM' and $oldStory->type == 'requirement' and $story->status == 'active') $story->status = 'launched'; + if($this->config->systemMode == 'PLM' and $oldStory->type == 'requirement' and $story->status == 'active' and $this->config->vision == 'rnd') $story->status = 'launched'; $this->dao->update(TABLE_STORY)->data($story, 'comment')->autoCheck()->checkFlow()->where('id')->eq($storyID)->exec(); @@ -3837,7 +3837,7 @@ class storyModel extends model $story->finalResult = $result; /* If in ipd mode, set requirement status = 'launched'. */ - if($this->config->systemMode == 'PLM' and $oldStory->type == 'requirement' and $story->status == 'active') $story->status = 'launched'; + if($this->config->systemMode == 'PLM' and $oldStory->type == 'requirement' and $story->status == 'active' and $this->config->vision == 'rnd') $story->status = 'launched'; return $story; } diff --git a/module/story/zen.php b/module/story/zen.php index cdf0be10e6..f4a3b9fa41 100644 --- a/module/story/zen.php +++ b/module/story/zen.php @@ -1099,7 +1099,7 @@ class storyZen extends story if($storyData->status != 'draft' and $this->story->checkForceReview() and !$this->post->needNotReview) $storyData->status = 'reviewing'; /* If in ipd mode, set requirement status = 'launched'. */ - if($this->config->systemMode == 'PLM' and $story->type == 'requirement' and $story->status == 'active') $story->status = 'launched'; + if($this->config->systemMode == 'PLM' and $story->type == 'requirement' and $story->status == 'active' and $this->config->vision == 'rnd') $story->status = 'launched'; return $this->loadModel('file')->processImgURL($storyData, $editorFields, $this->post->uid); } @@ -1198,7 +1198,7 @@ class storyZen extends story ->get(); /* If in ipd mode, set requirement status = 'launched'. */ - if($this->config->systemMode == 'PLM' and $oldStory->type == 'requirement' and $story->status == 'active') $story->status = 'launched'; + if($this->config->systemMode == 'PLM' and $this->config->vision == 'rnd' and $oldStory->type == 'requirement' and $story->status == 'active') $story->status = 'launched'; $specChanged = false; $oldStoryReviewers = array_keys($this->story->getReviewerPairs($storyID, $oldStory->version)); @@ -1386,7 +1386,7 @@ class storyZen extends story if($this->post->uploadImage && $this->post->uploadImage[$i]) $story->uploadImage = $this->post->uploadImage[$i]; /* If in ipd mode, set requirement status = 'launched'. */ - if($this->config->systemMode == 'PLM' and $storyType == 'requirement' and $story->status == 'active') $story->status = 'launched'; + if($this->config->systemMode == 'PLM' and $this->config->vision == 'rnd' and $storyType == 'requirement' and $story->status == 'active') $story->status = 'launched'; } return $stories;