From 87419d45525b40f9b47909a06ec30339e57ff9b5 Mon Sep 17 00:00:00 2001 From: hufangzhou <746775970@qq.com> Date: Mon, 26 Apr 2021 10:38:11 +0800 Subject: [PATCH 1/5] * Fix an error for project cases of all products when product can not modify. --- module/testcase/view/browse.html.php | 2 +- module/testcase/view/caseheader.html.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/module/testcase/view/browse.html.php b/module/testcase/view/browse.html.php index 103b6bf853..c9678db455 100644 --- a/module/testcase/view/browse.html.php +++ b/module/testcase/view/browse.html.php @@ -54,7 +54,7 @@ js::set('suiteID', $suiteID);

testcase->noCase;?> - + createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule"), " " . $lang->testcase->create, '', "class='btn btn-info' data-app='{$this->app->openApp}'");?> diff --git a/module/testcase/view/caseheader.html.php b/module/testcase/view/caseheader.html.php index dd5e3a95ed..129f5c3d94 100644 --- a/module/testcase/view/caseheader.html.php +++ b/module/testcase/view/caseheader.html.php @@ -61,7 +61,7 @@ echo "

"; echo html::a('javascript:;', "{$currentLable}" . " ", '', "class='btn btn-link' data-toggle='dropdown'"); - if(common::canModify('product', $product)) + if(empty($productID) or common::canModify('product', $product)) { echo "
- +
@@ -180,7 +180,7 @@
- app->rawMethod == 'browseunits' and common::canModify('product', $product)):?> + app->rawMethod == 'browseunits' and (empty($productID) or common::canModify('product', $product))):?> " . $lang->testtask->importUnitResult, '', "class='btn btn-primary' data-app='{$this->app->openApp}'");?> From 4112706f32c62d104c52843f45dec64cf8686c4a Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Mon, 26 Apr 2021 10:44:48 +0800 Subject: [PATCH 2/5] * Fix bug#12367. --- module/bug/js/common.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/bug/js/common.js b/module/bug/js/common.js index d5dbd1b402..d35318470a 100644 --- a/module/bug/js/common.js +++ b/module/bug/js/common.js @@ -556,7 +556,9 @@ function notice() else { executionID = $('#execution').val(); - link = createLink('build', 'create','executionID=' + executionID + '&productID=' + $('#product').val()); + productID = $('#product').val(); + projectID = $('#project').val(); + link = createLink('build', 'create','executionID=' + executionID + '&productID=' + productID + '&projectID=' + projectID); link += config.requestType == 'GET' ? '&onlybody=yes' : '?onlybody=yes'; html += '' + createBuild + ' '; html += '' + refresh + ''; From 2ec2a2fb859b2447dbe983a767640fb4e9486b4d Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Mon, 26 Apr 2021 10:51:07 +0800 Subject: [PATCH 3/5] * Fix bug. --- module/product/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/product/model.php b/module/product/model.php index 43fe6c4e1f..7608cf6684 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -74,7 +74,7 @@ class productModel extends model */ public function select($products, $productID, $currentModule, $currentMethod, $extra = '', $branch = 0, $module = 0, $moduleType = '', $withBranch = true) { - $isBrowseBug = (strpos(',project,execution,', ",{$this->app->openApp},") !== false and strpos(',bug,testcase,testtask,', ",{$this->app->rawMethod},") !== false and isset($products[0])) ? true : false; + $isBrowseBug = (strpos(',project,execution,', ",{$this->app->openApp},") !== false and strpos(',bug,testcase,testtask,ajaxselectstory,', ",{$this->app->rawMethod},") !== false and isset($products[0])) ? true : false; $this->app->loadLang('product'); if(!$isBrowseBug and !$productID) From b5080499fde062856044a8c5dd0f73ef8f103910 Mon Sep 17 00:00:00 2001 From: hufangzhou <746775970@qq.com> Date: Mon, 26 Apr 2021 10:56:59 +0800 Subject: [PATCH 4/5] * Fix bug #12343. --- module/my/view/requirement.html.php | 3 +-- module/story/model.php | 6 +++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/module/my/view/requirement.html.php b/module/my/view/requirement.html.php index 3e41ae4c8f..08ca7ba16c 100644 --- a/module/my/view/requirement.html.php +++ b/module/my/view/requirement.html.php @@ -60,7 +60,7 @@ story->estimateAB);?> statusAB);?> story->stageAB);?> - actions;?> + actions;?> @@ -98,7 +98,6 @@ common::printIcon('story', 'review', $vars, $story, 'list', 'search', '', 'iframe', true); common::printIcon('story', 'close', $vars, $story, 'list', '', '', 'iframe', true); common::printIcon('story', 'edit', $vars, $story, 'list', '', '', 'iframe', true, "data-width='95%'"); - common::printIcon('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$vars", $story, 'list', 'sitemap'); } ?> diff --git a/module/story/model.php b/module/story/model.php index 413fc6c928..e057aafc49 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -3337,6 +3337,10 @@ class storyModel extends model } } } + else if($id == 'actions') + { + $class .= ' text-center'; + } echo ""; if(isset($this->config->bizVersion)) $this->loadModel('flow')->printFlowCell('story', $story, $id); @@ -3484,7 +3488,7 @@ class storyModel extends model common::printIcon('story', 'review', $vars . "&from=$story->from", $story, 'list', 'search', '', '', false, "data-group=$story->from"); common::printIcon('story', 'close', $vars, $story, 'list', '', '', 'iframe', true); common::printIcon('story', 'edit', $vars . "&from=$story->from", $story, 'list', '', '', '', false, "data-group=$story->from"); - common::printIcon('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$vars", $story, 'list', 'sitemap', '', '', false, "data-app='qa'"); + if($story->type != 'requirement') common::printIcon('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$vars", $story, 'list', 'sitemap', '', '', false, "data-app='qa'"); common::printIcon('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=$story->module&storyID=$story->id", $story, 'list', 'split', '', '', '', '', $this->lang->story->subdivide); if($this->app->rawModule == 'projectstory') common::printIcon('projectstory', 'unlinkStory', "projectID={$this->session->project}&storyID=$story->id", '', 'list', 'unlink', 'hiddenwin'); } From 6b962a12c43378c8c6e9e5e2beb27da7e8988795 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Mon, 26 Apr 2021 11:12:10 +0800 Subject: [PATCH 5/5] * Add testtask switcher link. --- module/product/model.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/module/product/model.php b/module/product/model.php index 7608cf6684..d5d1d6aecf 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -1575,6 +1575,10 @@ class productModel extends model { $link = helper::createLink($module, 'report', "productID=%s" . ($branch ? "&branch=%s" : '&branch=0') . "&extra=$extra"); } + elseif($module == 'testtask') + { + $link = helper::createLink($module, 'browse', "productID=%s" . ($branch ? "&branch=%s" : '&branch=0') . "&extra=$extra"); + } elseif($module == 'bug' && $method == 'view') { $link = helper::createLink('bug', 'browse', "productID=%s" . ($branch ? "&branch=%s" : '&branch=0') . "&extra=$extra");