From 541b1004712a678ec736b46b46941a9d4a80e472 Mon Sep 17 00:00:00 2001 From: sunguangming Date: Mon, 10 Oct 2022 13:21:09 +0800 Subject: [PATCH] * Fix bug #28339,#28326. --- module/story/control.php | 9 ++++++++- module/testtask/control.php | 10 +++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/module/story/control.php b/module/story/control.php index d4dcb361f0..6299d4c16a 100755 --- a/module/story/control.php +++ b/module/story/control.php @@ -605,7 +605,14 @@ class story extends control if($storyID) { - return print(js::locate(inlink('view', "storyID=$storyID&version=0¶m=0&storyType=$storyType"), 'parent')); + if($this->app->tab == 'product') + { + return print(js::locate(inlink('view', "storyID=$storyID&version=0¶m=0&storyType=$storyType"), 'parent')); + } + else + { + return print(js::locate($this->createLink('projectstory', 'view', "storyID=$storyID"), 'parent')); + } } elseif($executionID) { diff --git a/module/testtask/control.php b/module/testtask/control.php index a7e399a1ab..e456d808f5 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -1064,11 +1064,9 @@ class testtask extends control /* Get task and product id. */ $task = $this->testtask->getById($taskID); $productID = $this->product->saveState($task->product, $this->products); - if(!isset($this->products[$productID])) - { - $product = $this->product->getByID($productID); - $this->products[$productID] = $product->name; - } + $product = $this->product->getByID($productID); + + if(!isset($this->products[$productID])) $this->products[$productID] = $product->name; /* Save session. */ if($this->app->tab == 'project') @@ -1096,6 +1094,8 @@ class testtask extends control $this->config->testcase->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($productID, 'case', 0, $task->branch); $this->config->testcase->search['actionURL'] = inlink('linkcase', "taskID=$taskID&type=$type¶m=$param"); $this->config->testcase->search['style'] = 'simple'; + + if($product->shadow) unset($this->config->testcase->search['fields']['product']); if($task->productType == 'normal') { unset($this->config->testcase->search['fields']['branch']);