* [refac#story,1h,0h] change the launched to active for story.
This commit is contained in:
@@ -2944,7 +2944,7 @@ class executionModel extends model
|
||||
|
||||
foreach($planStories as $id => $story)
|
||||
{
|
||||
if(!in_array($story->status, array('active', 'launched')) || (!empty($story->branch) && !empty($executionBranches) && !isset($executionBranches[$story->branch]))) unset($planStories[$id]);
|
||||
if($story->status != 'active') || (!empty($story->branch) && !empty($executionBranches) && !isset($executionBranches[$story->branch]))) unset($planStories[$id]);
|
||||
if(strpos($project->storyType, $story->type) === false) unset($planStories[$id]);
|
||||
if(!in_array($execution->attribute, array('mix', 'request', 'design')) && $story->type != 'story' && $execution->multiple) unset($planStories[$id]);
|
||||
}
|
||||
@@ -2981,9 +2981,6 @@ class executionModel extends model
|
||||
}
|
||||
$this->dao->delete()->from(TABLE_PROJECTSTORY)->where('project')->eq($executionID)->andWhere('story')->eq($storyID)->limit(1)->exec();
|
||||
|
||||
/* In ipd project, unlink stories change it's status to launched. */
|
||||
if($execution->model == 'ipd' and $storyType == 'requirement') $this->dao->update(TABLE_STORY)->set('status')->eq('launched')->where('id')->eq($storyID)->exec();
|
||||
|
||||
/* Resolve TABLE_KANBANCELL's field cards. */
|
||||
if($execution->type == 'kanban')
|
||||
{
|
||||
|
||||
@@ -584,7 +584,7 @@ class productplan extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$allStories = $this->story->getProductStories($this->view->product->id, $plan->branch ? "0,{$plan->branch}" : 0, '0', 'draft,reviewing,active,changing,launched', 'all', 'id_desc', true, array_keys($planStories), $pager);
|
||||
$allStories = $this->story->getProductStories($this->view->product->id, $plan->branch ? "0,{$plan->branch}" : 0, '0', 'draft,reviewing,active,changing', 'all', 'id_desc', true, array_keys($planStories), $pager);
|
||||
}
|
||||
|
||||
$modules = $this->loadModel('tree')->getOptionMenu($plan->product, 'story', 0, 'all');
|
||||
|
||||
+4
-11
@@ -966,8 +966,8 @@ class storyModel extends model
|
||||
$this->computeEstimate($parentID);
|
||||
|
||||
$status = $oldParentStory->status;
|
||||
if(count($childrenStatus) == 1 and current($childrenStatus) == 'closed') $status = current($childrenStatus); // Close parent story.
|
||||
if($oldParentStory->status == 'closed' && in_array($childStory->status, array('launched', 'active'))) $status = $this->getActivateStatus($parentID); // Activate parent story.
|
||||
if(count($childrenStatus) == 1 and current($childrenStatus) == 'closed') $status = current($childrenStatus); // Close parent story.
|
||||
if($oldParentStory->status == 'closed' && $childStory->status == 'active') $status = $this->getActivateStatus($parentID); // Activate parent story.
|
||||
|
||||
$action = '';
|
||||
$preStatus = '';
|
||||
@@ -977,7 +977,7 @@ class storyModel extends model
|
||||
if(dao::isError()) return false;
|
||||
if(!$createAction) return $story;
|
||||
|
||||
if(strpos('launched,active,draft,changing', $status) !== false) $action = 'Activated';
|
||||
if(strpos('active,draft,changing', $status) !== false) $action = 'Activated';
|
||||
if($status == 'closed')
|
||||
{
|
||||
/* Record the status before closed. */
|
||||
@@ -1336,7 +1336,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' and $this->config->vision == 'rnd') ? 'launched' : 'active';
|
||||
$story->status = '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();
|
||||
}
|
||||
|
||||
@@ -1373,7 +1373,6 @@ class storyModel extends model
|
||||
|
||||
$story->reviewer = implode(',', $story->reviewer);
|
||||
if($story->reviewer) $story->status = 'reviewing';
|
||||
if($this->config->systemMode == 'PLM' && $this->config->vision == 'rnd' && $oldStory->type == 'requirement' && $story->status == 'active') $story->status = 'launched';
|
||||
|
||||
$this->dao->update(TABLE_STORY)->data($story, 'reviewer')->where('id')->in($twinsIdList)->exec();
|
||||
|
||||
@@ -2095,9 +2094,6 @@ class storyModel extends model
|
||||
$story = $postData;
|
||||
$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' and $this->config->vision == 'rnd') $story->status = 'launched';
|
||||
|
||||
$this->dao->update(TABLE_STORY)->data($story, 'comment')->autoCheck()->checkFlow()->where('id')->eq($storyID)->exec();
|
||||
|
||||
/* Update parent story status. */
|
||||
@@ -4493,9 +4489,6 @@ 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' and $this->config->vision == 'rnd') $story->status = 'launched';
|
||||
|
||||
return $story;
|
||||
}
|
||||
|
||||
|
||||
@@ -1193,9 +1193,7 @@ class storyZen extends story
|
||||
/* Need and force review, then set status to reviewing. */
|
||||
if($storyData->status != 'draft' and $this->story->checkForceReview($storyType) and !$this->post->needNotReview) $storyData->status = 'reviewing';
|
||||
|
||||
/* If in ipd mode, set requirement status = 'launched'. */
|
||||
if($this->config->systemMode == 'PLM' && $storyData->type == 'requirement' && $storyData->status == 'active' && $this->config->vision == 'rnd') $storyData->status = 'launched';
|
||||
if($storyData->status == 'launched' && $this->app->tab != 'product') $storyData->status = 'developing';
|
||||
if($storyData->status == 'active' && $this->app->tab != 'product') $storyData->status = 'developing';
|
||||
|
||||
return $this->loadModel('file')->processImgURL($storyData, $editorFields, $this->post->uid);
|
||||
}
|
||||
@@ -1311,9 +1309,6 @@ class storyZen extends story
|
||||
->setDefault('version', $oldStory->version)
|
||||
->get();
|
||||
|
||||
/* If in ipd mode, set requirement 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));
|
||||
$_POST['reviewer'] = isset($_POST['reviewer']) ? $_POST['reviewer'] : array();
|
||||
@@ -1513,9 +1508,6 @@ class storyZen extends story
|
||||
|
||||
!empty($story->assignedTo) && $story->assignedDate = $now;
|
||||
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 $this->config->vision == 'rnd' and $storyType == 'requirement' and $story->status == 'active') $story->status = 'launched';
|
||||
}
|
||||
|
||||
return $stories;
|
||||
|
||||
Reference in New Issue
Block a user