From 150a1395e12c2ae14455dfbabf334db2e08ce99b Mon Sep 17 00:00:00 2001 From: mayue Date: Thu, 4 Nov 2021 17:30:11 +0800 Subject: [PATCH] * Fix bug #15690. --- module/testcase/control.php | 1 + module/testcase/js/common.js | 10 +++++++++- module/testcase/view/create.html.php | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/module/testcase/control.php b/module/testcase/control.php index aed4fff98d..8798487569 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -453,6 +453,7 @@ class testcase extends control $this->view->title = $title; $this->view->position = $position; + $this->view->projectID = $projectID; $this->view->productID = $productID; $this->view->productName = $this->products[$productID]; $this->view->moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'case', $startModuleID = 0, $branch); diff --git a/module/testcase/js/common.js b/module/testcase/js/common.js index f34b7293e9..2e1d6ba6c8 100644 --- a/module/testcase/js/common.js +++ b/module/testcase/js/common.js @@ -124,7 +124,15 @@ function setStories() productID = $('#product').val(); branch = $('#branch').val(); if(typeof(branch) == 'undefined') branch = 0; - link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + moduleID + '&storyID=0&onlyOption=false&status=noclosed&limit=50'); + if(tab == 'execution') + { + link = createLink('story', 'ajaxGetExecutionStories', 'executionID=' + executionID + '&productID=' + productID + '&branch= ' + branch + '&moduleID=' + moduleID + '&storyID=0'); + } + else + { + link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + moduleID + '&storyID=0&onlyOption=false&status=noclosed&limit=50'); + } + $.get(link, function(stories) { var value = $('#story').val(); diff --git a/module/testcase/view/create.html.php b/module/testcase/view/create.html.php index 4cdb2919a6..a8827b6a28 100644 --- a/module/testcase/view/create.html.php +++ b/module/testcase/view/create.html.php @@ -16,6 +16,8 @@ testcase->insertBefore);?> testcase->insertAfter);?> + +app->tab);?>