diff --git a/config/filter.php b/config/filter.php index d449ea43be..7e012a7302 100644 --- a/config/filter.php +++ b/config/filter.php @@ -98,6 +98,7 @@ $filter->webhook->bind = new stdclass(); $filter->bug->batchcreate->cookie['preBranch'] = 'int'; $filter->bug->browse->cookie['bugModule'] = 'int'; +$filter->bug->browse->cookie['bugBranch'] = 'int'; $filter->bug->browse->cookie['preBranch'] = 'int'; $filter->bug->browse->cookie['qaBugOrder'] = 'reg::orderBy'; $filter->bug->browse->cookie['windowWidth'] = 'int'; @@ -125,6 +126,7 @@ $filter->product->browse->cookie['preBranch'] = 'int'; $filter->product->browse->cookie['preProductID'] = 'int'; $filter->product->browse->cookie['productStoryOrder'] = 'reg::orderBy'; $filter->product->browse->cookie['storyModule'] = 'int'; +$filter->product->browse->cookie['storyBranch'] = 'int'; $filter->product->default->cookie['lastProduct'] = 'int'; $filter->product->default->cookie['preProductID'] = 'int'; $filter->product->index->cookie['preBranch'] = 'int'; diff --git a/module/block/view/flowchart.html.php b/module/block/view/flowchart.html.php index fb32e6c06f..21a03de567 100644 --- a/module/block/view/flowchart.html.php +++ b/module/block/view/flowchart.html.php @@ -1,5 +1,8 @@
block->flowchart as $rowIndex => $flow):?> +config->global->flow == 'onlyStory' and in_array($rowIndex, ['project', 'dev', 'tester'])) continue; ?> +config->global->flow == 'onlyTask' and in_array($rowIndex, ['product', 'dev', 'tester'])) continue; ?> +config->global->flow == 'onlyTest' and in_array($rowIndex, ['project', 'product'])) continue; ?>
@@ -44,4 +47,4 @@ .block-sm .flow-item > div:before, .block-sm .flow-item > div:after {border-width: 15px 0 15px 6px;} .block-sm .row-3 .flow-item-1, .block-sm .row-3 .flow-item-3 {width: 25%} .block-sm .flow-item > div:after {right: -6px;} - \ No newline at end of file + diff --git a/module/block/view/projectstatisticblock.html.php b/module/block/view/projectstatisticblock.html.php index 84eb3dedfd..470b89462b 100644 --- a/module/block/view/projectstatisticblock.html.php +++ b/module/block/view/projectstatisticblock.html.php @@ -154,6 +154,7 @@ $(function()
+ config->global->flow != 'onlyTask'): ?>
story->released;?> releasedStories;?>
@@ -195,6 +196,7 @@ $(function()
+ diff --git a/module/block/view/welcome.html.php b/module/block/view/welcome.html.php index c0ed224a4b..35f3309e46 100644 --- a/module/block/view/welcome.html.php +++ b/module/block/view/welcome.html.php @@ -46,6 +46,7 @@

block->leftToday?>

+ config->global->flow != 'onlyTest' and $this->config->global->flow != 'onlyStory'):?>
block->myTask?>
createLink('my', 'task', 'type=assignedTo'), (int)$tasks);?>
@@ -55,6 +56,8 @@
+ + config->global->flow != 'onlyTask' and $this->config->global->flow != 'onlyStory'):?>
block->myBug?>
createLink('my', 'bug', 'type=assignedTo'), (int)$bugs);?>
@@ -64,10 +67,14 @@
+ + config->global->flow != 'onlyTask' and $this->config->global->flow != 'onlyTest'):?>
block->myStory?>
createLink('my', 'story', 'type=assignedTo'), (int)$stories);?>
+ + config->global->flow != 'onlyStory' and $this->config->global->flow != 'onlyTest'):?>
block->myProject?>
createLink('project', 'all', 'type=undone'), (int)$projects);?>
@@ -77,10 +84,13 @@
+ + config->global->flow != 'onlyTask' and $this->config->global->flow != 'onlyTest'):?>
block->myProduct?>
createLink('product', 'all', 'product=0&line=0&status=noclosed'), (int)$products);?>
+ diff --git a/module/bug/control.php b/module/bug/control.php index 1b6a95e3a6..72374d7456 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -67,7 +67,7 @@ class bug extends control * @access public * @return void */ - public function browse($productID = 0, $branch = '', $browseType = 'unclosed', $param = 0, $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1) + public function browse($productID = 0, $branch = '', $browseType = '', $param = 0, $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1) { $this->loadModel('datatable'); @@ -77,18 +77,26 @@ class bug extends control /* Set productID, moduleID, queryID and branch. */ $productID = $this->product->saveState($productID, $this->products); $branch = ($branch == '') ? (int)$this->cookie->preBranch : (int)$branch; + $branchID = $browseType == '' ? $branch : ($browseType == 'bybranch' ? (int)$param : ($this->cookie->bugBranch ? $this->cookie->bugBranch : $branch)); setcookie('preProductID', $productID, $this->config->cookieLife, $this->config->webRoot, '', false, true); setcookie('preBranch', (int)$branch, $this->config->cookieLife, $this->config->webRoot, '', false, true); - if($this->cookie->preProductID != $productID or $this->cookie->preBranch != $branch) + if($this->cookie->preProductID != $productID or $this->cookie->preBranch != $branch or $browseType == 'bybranch') { $_COOKIE['bugModule'] = 0; setcookie('bugModule', 0, 0, $this->config->webRoot, '', false, false); } - if($browseType == 'bymodule') setcookie('bugModule', (int)$param, 0, $this->config->webRoot, '', false, false); - if($browseType != 'bymodule') $this->session->set('bugBrowseType', $browseType); + if($browseType == 'bymodule' or $browseType == '') + { + setcookie('bugModule', (int)$param, 0, $this->config->webRoot, '', false, false); + $_COOKIE['bugBranch'] = 0; + setcookie('bugBranch', 0, 0, $this->config->webRoot, '', false, false); + if($browseType == '') $browseType = 'unclosed'; + } + if($browseType == 'bybranch') setcookie('bugBranch', (int)$param, 0, $this->config->webRoot, '', false, false); + if($browseType != 'bymodule' and $browseType != 'bybranch') $this->session->set('bugBrowseType', $browseType); - $moduleID = ($browseType == 'bymodule') ? (int)$param : ($browseType == 'bysearch' ? 0 : ($this->cookie->bugModule ? $this->cookie->bugModule : 0)); + $moduleID = ($browseType == 'bymodule') ? (int)$param : (($browseType == 'bysearch' or $browseType == 'bybranch') ? 0 : ($this->cookie->bugModule ? $this->cookie->bugModule : 0)); $queryID = ($browseType == 'bysearch') ? (int)$param : 0; /* Set menu and save session. */ @@ -111,7 +119,7 @@ class bug extends control $projects = $this->loadModel('project')->getPairs('empty|withdelete'); /* Get bugs. */ - $bugs = $this->bug->getBugs($productID, $projects, $branch, $browseType, $moduleID, $queryID, $sort, $pager); + $bugs = $this->bug->getBugs($productID, $projects, $branchID, $browseType, $moduleID, $queryID, $sort, $pager); /* Process the sql, get the conditon partion, save it to session. */ $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'bug', $browseType == 'needconfirm' ? false : true); diff --git a/module/bug/model.php b/module/bug/model.php index 008ae707c6..b107894db5 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -354,6 +354,7 @@ class bugModel extends model /* Set modules and browse type. */ $modules = $moduleID ? $this->loadModel('tree')->getAllChildId($moduleID) : '0'; $browseType = ($browseType == 'bymodule' and $this->session->bugBrowseType and $this->session->bugBrowseType != 'bysearch') ? $this->session->bugBrowseType : $browseType; + $browseType = $browseType == 'bybranch' ? 'bymodule' : $browseType; /* Get bugs by browse type. */ $bugs = array(); diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php index a031ae8fe9..e6f3616fb1 100644 --- a/module/bug/view/browse.html.php +++ b/module/bug/view/browse.html.php @@ -52,7 +52,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow $menuBrowseType = strpos($menuItem->name, 'QUERY') === 0 ? 'bySearch' : $menuItem->name; $label = "{$menuItem->text}"; if($this->session->bugBrowseType == 'bysearch') $browseType = 'all'; - if($this->session->bugBrowseType != 'bysearch' && $browseType == 'bymodule') $browseType = $this->session->bugBrowseType; + if($this->session->bugBrowseType != 'bysearch' && ($browseType == 'bymodule' or $browseType == 'bybranch')) $browseType = $this->session->bugBrowseType; $label .= $menuBrowseType == $browseType ? " {$pager->recTotal}" : ''; $active = $menuBrowseType == $browseType ? 'btn-active-text' : ''; @@ -401,6 +401,8 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow