From 9f120d2823a0cde50c80d3c1d7b7b9cf878b706e Mon Sep 17 00:00:00 2001 From: Zongjun Lan Date: Wed, 19 Apr 2023 15:50:12 +0800 Subject: [PATCH] + Add story action. --- module/action/model.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/module/action/model.php b/module/action/model.php index 51fdf82151..16b1ba35d6 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -412,6 +412,11 @@ class actionModel extends model $title = $this->dao->select('title')->from(TABLE_PRODUCTPLAN)->where('id')->eq($action->extra)->fetch('title'); if($title) $action->extra = common::hasPriv('productplan', 'view') ? html::a(helper::createLink('productplan', 'view', "planID=$action->extra"), $title) : $title; } + elseif($actionName == 'linked2roadmap' and $action->objectType == 'story') + { + $name = $this->dao->select('name')->from(TABLE_ROADMAP)->where('id')->eq($action->extra)->fetch('name'); + if($name) $action->extra = common::hasPriv('roadmap', 'view') ? html::a(helper::createLink('roadmap', 'view', "roadmapID=$action->extra"), $name) : $name; + } elseif($actionName == 'linked2build') { $name = $this->dao->select('name')->from(TABLE_BUILD)->where('id')->eq($action->extra)->fetch('name'); @@ -476,6 +481,11 @@ class actionModel extends model $title = $this->dao->select('title')->from(TABLE_PRODUCTPLAN)->where('id')->eq($action->extra)->fetch('title'); if($title) $action->extra = common::hasPriv('productplan', 'view') ? html::a(helper::createLink('productplan', 'view', "planID=$action->extra"), "#$action->extra " . $title) : "#$action->extra " . $title; } + elseif($actionName == 'unlinkedfromroadmap' and $action->objectType == 'story') + { + $name = $this->dao->select('name')->from(TABLE_ROADMAP)->where('id')->eq($action->extra)->fetch('name'); + if($name) $action->extra = common::hasPriv('roadmap', 'view') ? html::a(helper::createLink('roadmap', 'view', "roadmapID=$action->extra"), "#$action->extra " . $name) : "#$action->extra " . $name; + } elseif($actionName == 'unlinkedfromtesttask') { $name = $this->dao->select('name')->from(TABLE_TESTTASK)->where('id')->eq($action->extra)->fetch('name');