diff --git a/module/product/control.php b/module/product/control.php index ee3d3e1427..72c732df21 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -347,6 +347,7 @@ class product extends control $this->view->storyType = $storyType; $this->view->from = $this->app->tab; $this->view->modulePairs = $showModule ? $this->tree->getModulePairs($productID, 'story', $showModule) : array(); + $this->view->project = $this->loadModel('project')->getByID($projectID); $this->display(); } diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index 67099b3ebe..e99aeab382 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -208,7 +208,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : ''; $buttonTitle = $lang->execution->linkStoryByPlan; $dataToggle = 'data-toggle="modal"'; } - if(common::hasPriv('projectstory', 'linkStory')) + if(!empty($project->hasProduct) && common::hasPriv('projectstory', 'linkStory')) { $buttonLink = $this->createLink('projectstory', 'linkStory', "project=$projectID"); $buttonTitle = $lang->execution->linkStory;