diff --git a/module/story/control.php b/module/story/control.php index ae69a87af3..dee777b5c0 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -42,7 +42,14 @@ class story extends control $this->loadModel('action'); $actionID = $this->action->create('story', $storyID, 'Opened', ''); $this->sendMail($storyID, $actionID); - die(js::locate($this->createLink('story', 'view', "storyID=$storyID"), 'parent')); + if($projectID == 0) + { + die(js::locate($this->createLink('story', 'view', "storyID=$storyID"), 'parent')); + } + else + { + die(js::locate($this->createLink('project', 'story', "projectID=$projectID"), 'parent')); + } } /* Set products, users and module. */