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') {