From 599c7986504df484331a51be4dbf2b5cd7cff93c Mon Sep 17 00:00:00 2001 From: liuruogu Date: Sun, 9 Oct 2022 02:54:54 +0000 Subject: [PATCH 1/8] * Fix light for product. --- module/story/js/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/story/js/common.js b/module/story/js/common.js index 6bfdaee1f2..8ea4e3d455 100644 --- a/module/story/js/common.js +++ b/module/story/js/common.js @@ -7,7 +7,7 @@ $(function() if(typeof(execution) != 'undefined') rawModule = 'projectstory'; if(['project', 'projectstory'].indexOf(rawModule) === -1 && app != 'qa') { - if(app != 'my') $('#navbar .nav li[data-id!=story]').removeClass('active'); + if(app != 'my') $('#navbar .nav li[data-id!=' + storyType + ']').removeClass('active'); $("#navbar .nav li[data-id=" + storyType + ']').addClass('active'); $('#subNavbar li[data-id="' + storyType + '"]').addClass('active'); if($('#navbar .nav>li[data-id=story] .dropdown-menu').length) $('#navbar .nav>li[data-id=story]>a').html($('.active [data-id=' + storyType + ']').text() + ''); From 40634e6d14b8c6e57c62bd148b23f16733f46fb0 Mon Sep 17 00:00:00 2001 From: wangyuting2 <851424971@qq.com> Date: Sun, 9 Oct 2022 03:04:41 +0000 Subject: [PATCH 2/8] * Finish task #71654. --- module/block/control.php | 39 ++++++++++++++++++++++++++++----------- module/block/model.php | 32 +++++++++++++++++++++++--------- 2 files changed, 51 insertions(+), 20 deletions(-) diff --git a/module/block/control.php b/module/block/control.php index 6dc5b008e6..b80dba9cb5 100755 --- a/module/block/control.php +++ b/module/block/control.php @@ -1752,16 +1752,21 @@ class block extends control */ public function printAssignToMeBlock($longBlock = true) { + $hasWaterfall = strpos(",{$this->config->disabledFeatures},", ',waterfall,') === false; + $hasIssue = strpos(",{$this->config->disabledFeatures},", ',scrumIssue,') === false or $hasWaterfall; + $hasRisk = strpos(",{$this->config->disabledFeatures},", ',scrumRisk,') === false or $hasWaterfall; + $hasMeeting = strpos(",{$this->config->disabledFeatures},", ',scrumMeeting,') === false or $hasWaterfall; + $hasViewPriv = array(); - if(common::hasPriv('todo', 'view')) $hasViewPriv['todo'] = true; - if(common::hasPriv('task', 'view')) $hasViewPriv['task'] = true; - if(common::hasPriv('bug', 'view') and $this->config->vision != 'lite') $hasViewPriv['bug'] = true; - if($this->config->URAndSR and common::hasPriv('story', 'view') and $this->config->vision != 'lite') $hasViewPriv['requirement'] = true; - if(common::hasPriv('story', 'view') and $this->config->vision != 'lite') $hasViewPriv['story'] = true; - if(common::hasPriv('risk', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite') $hasViewPriv['risk'] = true; - if(common::hasPriv('issue', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite') $hasViewPriv['issue'] = true; - if(common::hasPriv('meeting', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite') $hasViewPriv['meeting'] = true; - if(common::hasPriv('feedback', 'view') and in_array($this->config->edition, array('max', 'biz'))) $hasViewPriv['feedback'] = true; + if(common::hasPriv('todo', 'view')) $hasViewPriv['todo'] = true; + if(common::hasPriv('task', 'view')) $hasViewPriv['task'] = true; + if(common::hasPriv('bug', 'view') and $this->config->vision != 'lite') $hasViewPriv['bug'] = true; + if($this->config->URAndSR and common::hasPriv('story', 'view') and $this->config->vision != 'lite') $hasViewPriv['requirement'] = true; + if(common::hasPriv('story', 'view') and $this->config->vision != 'lite') $hasViewPriv['story'] = true; + if(common::hasPriv('risk', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite' && $hasRisk) $hasViewPriv['risk'] = true; + if(common::hasPriv('issue', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite' && $hasIssue) $hasViewPriv['issue'] = true; + if(common::hasPriv('meeting', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite' && $hasMeeting) $hasViewPriv['meeting'] = true; + if(common::hasPriv('feedback', 'view') and in_array($this->config->edition, array('max', 'biz'))) $hasViewPriv['feedback'] = true; $params = $this->get->param; $params = json_decode(base64_decode($params)); @@ -1770,8 +1775,20 @@ class block extends control $objectCountList = array('todo' => 'todoCount', 'task' => 'taskCount', 'bug' => 'bugCount', 'story' => 'storyCount', 'requirement' => 'requirementCount'); if($this->config->edition == 'max') { - $objectList += array('risk' => 'risks', 'issue' => 'issues', 'feedback' => 'feedbacks'); - $objectCountList += array('risk' => 'riskCount', 'issue' => 'issueCount', 'feedback' => 'feedbackCount'); + if($hasRisk) + { + $objectList += array('risk' => 'risks'); + $objectCountList += array('risk' => 'riskCount'); + } + + if($hasIssue) + { + $objectList += array('issue' => 'issues'); + $objectCountList += array('issue' => 'issueCount'); + } + + $objectList += array('feedback' => 'feedbacks'); + $objectCountList += array('feedback' => 'feedbackCount'); } if($this->config->edition == 'biz') diff --git a/module/block/model.php b/module/block/model.php index 347ed7c0ea..01a5ed0633 100644 --- a/module/block/model.php +++ b/module/block/model.php @@ -774,6 +774,11 @@ class blockModel extends model */ public function getAssignToMeParams() { + $hasWaterfall = strpos(",{$this->config->disabledFeatures},", ',waterfall,') === false; + $hasIssue = strpos(",{$this->config->disabledFeatures},", ',scrumIssue,') === false or $hasWaterfall; + $hasRisk = strpos(",{$this->config->disabledFeatures},", ',scrumRisk,') === false or $hasWaterfall; + $hasMeeting = strpos(",{$this->config->disabledFeatures},", ',scrumMeeting,') === false or $hasWaterfall; + $params = new stdclass(); $params->todoCount['name'] = $this->lang->block->todoCount; $params->todoCount['default'] = 20; @@ -789,17 +794,26 @@ class blockModel extends model if($this->config->edition == 'max') { - $params->riskCount['name'] = $this->lang->block->riskCount; - $params->riskCount['default'] = 20; - $params->riskCount['control'] = 'input'; + if($hasRisk) + { + $params->riskCount['name'] = $this->lang->block->riskCount; + $params->riskCount['default'] = 20; + $params->riskCount['control'] = 'input'; + } - $params->issueCount['name'] = $this->lang->block->issueCount; - $params->issueCount['default'] = 20; - $params->issueCount['control'] = 'input'; + if($hasIssue) + { + $params->issueCount['name'] = $this->lang->block->issueCount; + $params->issueCount['default'] = 20; + $params->issueCount['control'] = 'input'; + } - $params->meetingCount['name'] = $this->lang->block->meetingCount; - $params->meetingCount['default'] = 20; - $params->meetingCount['control'] = 'input'; + if($hasMeeting) + { + $params->meetingCount['name'] = $this->lang->block->meetingCount; + $params->meetingCount['default'] = 20; + $params->meetingCount['control'] = 'input'; + } $params->feedbackCount['name'] = $this->lang->block->feedbackCount; $params->feedbackCount['default'] = 20; From 86409982fdc3c3fa03ed0e27d23081c2aad2d63d Mon Sep 17 00:00:00 2001 From: sunguangming Date: Sun, 9 Oct 2022 13:17:40 +0800 Subject: [PATCH 3/8] * Fix bug #28292. --- module/story/control.php | 2 +- module/story/model.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/story/control.php b/module/story/control.php index dd6bec11fc..2aafdd89aa 100755 --- a/module/story/control.php +++ b/module/story/control.php @@ -554,7 +554,7 @@ class story extends control } /* Project or execution linked stories. */ - if($executionID and $storyType == 'story') + if($executionID) { $products = array(); foreach($mails as $story) $products[$story->storyID] = $productID; diff --git a/module/story/model.php b/module/story/model.php index 9873f8f8f0..447eefbaa4 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -300,7 +300,7 @@ class storyModel extends model } /* Project or execution linked story. */ - if($executionID != 0 and $story->type == 'story') + if($executionID != 0) { $this->linkStory($executionID, $this->post->product, $storyID); if($this->config->systemMode == 'new' and $executionID != $this->session->project) $this->linkStory($this->session->project, $this->post->product, $storyID); From 5422864456e2fde2904e5c14c960e240d777bf99 Mon Sep 17 00:00:00 2001 From: liugang Date: Sun, 9 Oct 2022 13:19:22 +0800 Subject: [PATCH 4/8] * Fix bug #28283. --- module/story/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/story/model.php b/module/story/model.php index 447eefbaa4..3e4fdff043 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -4932,7 +4932,7 @@ class storyModel extends model echo $story->version; break; case 'actions': - if($tab == 'execution' || !$this->session->multiple) + if($tab == 'execution' || (isset($_SESSION['multiple']) && empty($_SESSION['multiple']))) { $menuType = 'execution'; } From a3e619f8e5c41a87cb04053824ed4098a55557bd Mon Sep 17 00:00:00 2001 From: sunguangming Date: Sun, 9 Oct 2022 13:21:07 +0800 Subject: [PATCH 5/8] * Fix bug #28290. --- module/kanban/control.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/kanban/control.php b/module/kanban/control.php index cf76c40c7a..b681a92b22 100644 --- a/module/kanban/control.php +++ b/module/kanban/control.php @@ -1199,16 +1199,16 @@ class kanban extends control $selectedProductID = empty($selectedProductID) ? key($productPairs) : $selectedProductID; /* Waterfall project has no plan. */ - $waterfallProducts = $this->dao->select('t1.product')->from(TABLE_PROJECTPRODUCT)->alias('t1') + $excludeProducts = $this->dao->select('t1.product')->from(TABLE_PROJECTPRODUCT)->alias('t1') ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id') ->where('t2.type')->eq('project') - ->andWhere('t2.model')->eq('waterfall') + ->andWhere('t2.model')->ne('scrum') ->andWhere('t2.hasProduct')->eq('0') ->fetchPairs(); foreach($productPairs as $id => $name) { - if(isset($waterfallProducts[$id])) unset($productPairs[$id]); + if(isset($excludeProducts[$id])) unset($productPairs[$id]); } $this->view->products = $productPairs; From 04a68c0ce63508b67ed41399132b6385f9c31715 Mon Sep 17 00:00:00 2001 From: sunguangming Date: Sun, 9 Oct 2022 13:23:42 +0800 Subject: [PATCH 6/8] * Fix bug #28287. --- module/testcase/view/view.html.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/testcase/view/view.html.php b/module/testcase/view/view.html.php index dd93ac2765..f48321595a 100644 --- a/module/testcase/view/view.html.php +++ b/module/testcase/view/view.html.php @@ -146,7 +146,7 @@ createLink('caselib', 'browse', "libID=$case->lib"), $libName) : $libName;?> - '> + '> testcase->product;?> createLink('product', 'browse', "productID=$case->product"), $productName) : $productName;?> @@ -158,7 +158,7 @@ - testcase->module;?> + testcase->module;?> Date: Sun, 9 Oct 2022 14:13:49 +0800 Subject: [PATCH 7/8] * Change character to upper case. --- module/project/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/project/model.php b/module/project/model.php index 8d701bdf42..abbe19cd16 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -2636,7 +2636,7 @@ class projectModel extends model common::setMenuVars('project', $objectID); - $this->setNomultipleMenu($objectID); + $this->setNoMultipleMenu($objectID); return $objectID; } From 4e07ba29dd1bde1480e3e15eb473b59e51ea8490 Mon Sep 17 00:00:00 2001 From: liugang Date: Sun, 9 Oct 2022 14:25:09 +0800 Subject: [PATCH 8/8] * Fix bug #28168. --- module/story/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/story/model.php b/module/story/model.php index 3e4fdff043..cf9430fa11 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -4932,7 +4932,7 @@ class storyModel extends model echo $story->version; break; case 'actions': - if($tab == 'execution' || (isset($_SESSION['multiple']) && empty($_SESSION['multiple']))) + if($tab == 'execution' || ($tab == 'project' && isset($_SESSION['multiple']) && empty($_SESSION['multiple']))) { $menuType = 'execution'; }