From 2a57f28bc5cb0aa8a123335f9bbf217fe8bd859b Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 22 Sep 2022 08:31:44 +0800 Subject: [PATCH] * code for create story. --- module/story/control.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/module/story/control.php b/module/story/control.php index 803318006e..1edb12e9ec 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -66,12 +66,15 @@ class story extends control } else if($this->app->tab == 'project') { - $objectID = empty($objectID) ? $this->session->project : $objectID; - if($this->session->noSprint) $objectID = $this->session->project; + $objects = $this->project->getPairsByProgram(); - $objects = $this->project->getPairsByProgram(); - $objectID = $this->project->saveState($objectID, $objects); - $this->project->setMenu($objectID); + if(empty($objectID)) $objectID = $this->session->project; + + $projectID = $objectID; + if($this->session->noSprint) $projectID = $this->session->project; + $projectID = isset($objects[$projectID]) ? $projectID : $this->session->project; + $projectID = $this->project->saveState($projectID, $objects); + $this->project->setMenu($projectID); } else if($this->app->tab == 'execution') {