From 501e80ddf295b673a35e534a995381b53debd82d Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Wed, 24 Nov 2021 10:02:58 +0800 Subject: [PATCH 1/5] * Fix bug#16606. --- module/product/model.php | 4 ++++ module/story/control.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/module/product/model.php b/module/product/model.php index 78ce9e5b2b..5b4b11f951 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -1934,6 +1934,10 @@ class productModel extends model { $link = helper::createLink('testsuite', 'browse', "productID=%s"); } + elseif(($module == 'testcase' and $method == 'groupCase') or ($module == 'story' and $method == 'zeroCase') and $this->app->tab == 'project') + { + $link = helper::createLink($module, $method, "productID=%s" . ($branch ? "&branch=%s" : '')) . "#app=project"; + } else { $link = helper::createLink($module, $method, "productID=%s" . ($branch ? "&branch=%s" : '')); diff --git a/module/story/control.php b/module/story/control.php index 49c659ae06..8dcb6a6276 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -1700,7 +1700,7 @@ class story extends control $this->lang->project->menu->qa['subMenu']->testcase['subModule'] = 'story'; $products = $this->product->getProducts($this->session->project, 'all', '', false); $productID = $this->product->saveState($productID, $products); - $this->lang->modulePageNav = $this->product->select($products, $productID, 'story', 'zeroCase'); + $this->lang->modulePageNav = $this->product->select($products, $productID, 'story', 'zeroCase', '', $branchID); } else { From f15477ae017c7a543e2763081ef4a768b35eb7a5 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Wed, 24 Nov 2021 10:04:52 +0800 Subject: [PATCH 2/5] * Fix an error of modules in product module for batch edit story. --- module/story/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/story/control.php b/module/story/control.php index 49c659ae06..15d96fd778 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -748,7 +748,7 @@ class story extends control $branches = $this->branch->getPairs($productID); $product = $this->product->getByID($productID); $branchProduct = $product->type == 'normal' ? false : true; - $modules = $this->tree->getOptionMenu($productID, 'story', 0, array_keys($branches)); + $modules = array($productID => $this->tree->getOptionMenu($productID, 'story', 0, array_keys($branches))); $plans = array($productID => $this->productplan->getBranchPlanPairs($productID)); $products = array($productID => $product); $branches = array($productID => $branches); From ccb9327c5a562d39ac53b0a8404eced8ca34115c Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Wed, 24 Nov 2021 10:11:34 +0800 Subject: [PATCH 3/5] * Fix bug#16565. --- module/my/view/story.html.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/my/view/story.html.php b/module/my/view/story.html.php index 15b028fb24..029b2dfe62 100644 --- a/module/my/view/story.html.php +++ b/module/my/view/story.html.php @@ -143,10 +143,10 @@ { $vars = "story={$child->id}"; common::printIcon('story', 'change', $vars, $child, 'list', 'alter', '', 'iframe', true); - common::printIcon('story', 'review', $vars, $child, 'list', 'search'); + common::printIcon('story', 'review', $vars, $child, 'list', 'search', '', 'iframe', true); common::printIcon('story', 'close', $vars, $child, 'list', '', '', 'iframe', true); common::printIcon('story', 'edit', $vars, $child, 'list', '', '', 'iframe', true, "data-width='95%'"); - common::printIcon('story', 'createCase', "productID=$child->product&branch=$child->branch&module=0&from=¶m=0&$vars", $child, 'list', 'sitemap'); + common::printIcon('story', 'createCase', "productID=$child->product&branch=$child->branch&module=0&from=¶m=0&$vars", $child, 'list', 'sitemap', '', 'iframe', true, "data-width='95%'"); } ?> From 0c633c71d6a1dd08a4d33412e14f4151791b4fb8 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Wed, 24 Nov 2021 10:22:12 +0800 Subject: [PATCH 4/5] * Fix a bug:There is an error on the suite use case page. --- module/testsuite/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/testsuite/control.php b/module/testsuite/control.php index 2fd00bc077..390877abcd 100644 --- a/module/testsuite/control.php +++ b/module/testsuite/control.php @@ -189,7 +189,7 @@ class testsuite extends control $this->view->cases = $this->testsuite->getLinkedCases($suiteID, $sort, $pager); $this->view->orderBy = $orderBy; $this->view->pager = $pager; - $this->view->modules = $this->loadModel('tree')->getOptionMenu($suite->product, 'case'); + $this->view->modules = $this->loadModel('tree')->getOptionMenu($suite->product, 'case', 0, 'all'); $this->view->branches = $this->loadModel('branch')->getPairs($suite->product, 'noempty'); $this->view->canBeChanged = common::canBeChanged('testsuite', $suite); From cb78fa20e1e64f008b3796082f52ad3aed62ce04 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Wed, 24 Nov 2021 10:51:54 +0800 Subject: [PATCH 5/5] * Modify the nav in edit story. --- module/story/control.php | 4 ++-- module/story/view/batchedit.html.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/story/control.php b/module/story/control.php index 0d812b3b76..12fc0692e8 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -647,7 +647,7 @@ class story extends control $reviewedReviewer = array(); foreach($reviewedBy as $reviewer) $reviewedReviewer[] = zget($users, $reviewer); - if($this->app->tab = 'project' or $this->app->tab = 'execution') + if($this->app->tab == 'project' or $this->app->tab == 'execution') { $objectID = $this->app->tab == 'project' ? $this->session->project : $this->session->execution; $productBranches = $product->type != 'normal' ? $this->loadModel('execution')->getBranchByProduct($story->product, $objectID) : array(); @@ -840,7 +840,7 @@ class story extends control $this->view->branchProduct = $branchProduct; $this->view->storyIdList = $storyIdList; $this->view->branch = $branch; - $this->view->plans = $plans; + $this->view->plans = array('' => '') + $plans; $this->view->storyType = $storyType; $this->view->stories = $stories; $this->view->executionID = $executionID; diff --git a/module/story/view/batchedit.html.php b/module/story/view/batchedit.html.php index 2b88a87354..7a3eab3f8c 100644 --- a/module/story/view/batchedit.html.php +++ b/module/story/view/batchedit.html.php @@ -95,7 +95,7 @@ foreach(explode(',', $showFields) as $field) } ?> session->currentProductType == 'normal') $productPlans = array('' => '', 'ditto' => $this->lang->story->ditto) + $productPlans;?> - product][$story->branch]) ? $plans[$story->product][$story->branch] : '', $story->plan, "class='form-control chosen'");?> + product][$story->branch]) ? array('' => '') + $plans[$story->product][$story->branch] : '', $story->plan, "class='form-control chosen'");?>