diff --git a/module/action/model.php b/module/action/model.php index 8cfaa756fe..be95cededf 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -481,10 +481,10 @@ class actionModel extends model $name = $this->dao->select('name')->from(TABLE_TESTTASK)->where('id')->eq($action->extra)->fetch('name'); if($name) $action->extra = common::hasPriv('testtask', 'view') ? html::a(helper::createLink('testtask', 'view', "taskID=$action->extra"), $name) : $name; } - elseif($action->objectType != 'feedback' and $actionName == 'tostory') + elseif(strpos('feedback,ticket', $action->objectType) === false and $actionName == 'tostory') { - $story = $this->dao->select('title,vision')->from(TABLE_STORY)->where('id')->eq($action->extra)->fetch(); - if($story) $action->extra = (common::hasPriv('story', 'view') and $story->vision == $this->config->vision) ? html::a(helper::createLink('story', 'view', "storyID=$action->extra"), "#$action->extra " . $story->title) : "#$action->extra " . $story->title; + $title = $this->dao->select('title')->from(TABLE_STORY)->where('id')->eq($action->extra)->fetch('title'); + if($title) $action->extra = common::hasPriv('story', 'view') ? html::a(helper::createLink('story', 'view', "storyID=$action->extra"), "#$action->extra " . $title) : "#$action->extra " . $title; } elseif($actionName == 'importedcard') {