From dd4fc6c897db79f7818e769bcfbda88423173a81 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Fri, 19 Jan 2024 14:15:27 +0800 Subject: [PATCH] * Fix bug #44192. --- module/story/model.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/module/story/model.php b/module/story/model.php index 400c255107..478fb952aa 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -6233,8 +6233,12 @@ 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'; - if($story->status == 'launched' and $this->app->tab != 'product') $story->status = 'developing'; + if($this->config->systemMode == 'PLM' and $oldStory->type == 'requirement' and $story->status == 'active' and (strpos($oldStory->vision, 'rnd') !== false)) $story->status = 'launched'; + if($story->status == 'launched') + { + $project = $this->dao->select('project')->from(TABLE_PROJECTSTORY)->where('story')->eq($oldStory->id)->orderBy('project')->fetch(); + if($project) $story->status = 'developing'; + } return $story; }