From aea80f78f3cdf74cbb98c11c78d0e681f99137a4 Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Thu, 25 Mar 2021 13:40:36 +0800 Subject: [PATCH 01/34] * Fix error. --- module/common/model.php | 10 +++++++--- module/project/model.php | 12 ++++++------ 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/module/common/model.php b/module/common/model.php index 715cc27603..b83bb4581b 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -539,7 +539,7 @@ class commonModel extends model if(!$openApp) return; $icon = zget($lang->navIcons, $openApp, ''); - + if(!in_array($openApp, array('program', 'product', 'project'))) { $nav = $lang->mainNav->$openApp; @@ -1300,13 +1300,16 @@ EOD; global $lang, $app; if(isonlybody()) return false; + $moduleName = ($app->getModuleName() == 'story' and $app->openApp == 'project') ? 'projectstory' : $app->getModuleName(); echo "'; diff --git a/module/project/model.php b/module/project/model.php index 424efc8225..12ad0641a4 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1608,19 +1608,19 @@ class projectModel extends model $projectSubMenu = $this->lang->project->menu->{$key}['dropMenu']; $dropMenu = common::createDropMenu($this->lang->project->menu->{$key}['dropMenu'], $objectID); if(!empty($dropMenu)) - { + { foreach($dropMenu as $menuKey => $menu) - { - $itemMenu = zget($projectSubMenu, $menuKey, ''); + { + $itemMenu = zget($projectSubMenu, $menuKey, ''); $isActive['method'] = ($moduleName == strtolower($menu->link['module']) and $methodName == strtolower($menu->link['method'])); $isActive['alias'] = ($moduleName == strtolower($menu->link['module']) and (is_array($itemMenu) and isset($itemMenu['alias']) and strpos($itemMenu['alias'], $methodName) !== false)); $isActive['subModule'] = (is_array($itemMenu) and isset($itemMenu['subModule']) and strpos($itemMenu['subModule'], $moduleName) !== false); if($isActive['method'] or $isActive['alias'] or $isActive['subModule']) - { + { $this->lang->project->menu->{$key}['link'] = $menu->text . "|" . join('|', $menu->link); break; - } - } + } + } $this->lang->project->menu->{$key}['dropMenu'] = $dropMenu; } } From f5af9020c8513070b3e65dcad8c9e175e44480d4 Mon Sep 17 00:00:00 2001 From: leiyong <1549684884@qq.com> Date: Thu, 25 Mar 2021 13:41:25 +0800 Subject: [PATCH 02/34] * Finish task#36884. --- module/index/control.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/index/control.php b/module/index/control.php index 9d8983d7c1..8d9fbd1d5f 100644 --- a/module/index/control.php +++ b/module/index/control.php @@ -80,7 +80,9 @@ class index extends control { $objectType = $this->post->objectType; $appGroup = zget($this->config->index->appGroup, $objectType, ''); - if($objectType == 'testcase') $objectType = 'case'; + if($objectType == 'testcase') $objectType = 'case'; + if($objectType == 'testreport') $objectType = 'report'; + if($objectType == 'productplan') $objectType = 'productPlan'; $this->session->set($objectType . 'List', '', $appGroup); } From be42a804ce568794f44d787d78dbf7646e5f3d83 Mon Sep 17 00:00:00 2001 From: hufangzhou <746775970@qq.com> Date: Thu, 25 Mar 2021 13:43:46 +0800 Subject: [PATCH 03/34] * Fix a bug. --- module/project/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/project/model.php b/module/project/model.php index 424efc8225..17acade02d 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -514,9 +514,9 @@ class projectModel extends model public function getProducts($projectID, $withBranch = true) { $query = $this->dao->select('t2.id, t2.name, t2.type, t1.branch, t1.plan')->from(TABLE_PROJECTPRODUCT)->alias('t1') - ->leftJoin(TABLE_PRODUCT)->alias('t2') - ->on('t1.product = t2.id') + ->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id') ->where('t1.project')->eq((int)$projectID) + ->beginIF(!$this->app->user->admin)->andWhere('t1.product')->in($this->app->user->view->products)->fi() ->andWhere('t2.deleted')->eq(0); if(!$withBranch) return $query->fetchPairs('id', 'name'); return $query->fetchAll('id'); From 505fc0a09fb7caf8946f258d573f0144f25a3e2c Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Thu, 25 Mar 2021 14:03:10 +0800 Subject: [PATCH 04/34] * Fix bug#11479. --- module/execution/view/grouptask.html.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/execution/view/grouptask.html.php b/module/execution/view/grouptask.html.php index 77843350d7..749cd277b0 100644 --- a/module/execution/view/grouptask.html.php +++ b/module/execution/view/grouptask.html.php @@ -74,7 +74,7 @@ execution = $executionID; - $link = $this->createLink('task', 'create', "execution=$executionID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : '')); + $link = $this->createLink('task', 'create', "execution=$executionID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : '')); if(common::hasPriv('task', 'create', $checkObject)) echo html::a($link, " {$lang->task->create}", '', "class='btn btn-primary'"); ?> @@ -85,7 +85,7 @@

task->noTask;?> - createLink('task', 'create', "execution=$executionID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : '')), " " . $lang->task->create, '', "class='btn btn-info'");?> + createLink('task', 'create', "execution=$executionID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : '')), " " . $lang->task->create, '', "class='btn btn-info'");?>

From f7703f2506db7011516646766bf15f656084f396 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Thu, 25 Mar 2021 14:10:22 +0800 Subject: [PATCH 05/34] * Fix common menu. --- module/common/lang/menu.php | 3 +-- module/project/control.php | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php index 2ef8dc081e..e6fe0ff820 100644 --- a/module/common/lang/menu.php +++ b/module/common/lang/menu.php @@ -222,7 +222,7 @@ $lang->waterfall->menu->story = array('link' => "$lang->SRCommon|projectst $lang->waterfall->menu->design = array('link' => "$lang->design|design|browse|product=%s"); $lang->waterfall->menu->repo = array('link' => "{$lang->repo->common}|repo|browse|repoID=0&objectID=%s", 'subModule' => 'repo'); $lang->waterfall->menu->qa = array('link' => "{$lang->qa->common}|project|qa|projectID=%s", 'subModule' => 'testcase,testtask,bug', 'alias' => 'bug,testtask,testcase'); -$lang->waterfall->menu->release = array('link' => "{$lang->release->common}|projectrelease|browse", 'subModule' => 'projectrelease'); +$lang->waterfall->menu->release = array('link' => "{$lang->release->common}|projectrelease|browse|project=%s", 'subModule' => 'projectrelease'); $lang->waterfall->menu->build = array('link' => "{$lang->build->common}|project|build|project=%s"); $lang->waterfall->menu->dynamic = array('link' => "$lang->dynamic|project|dynamic|project=%s"); $lang->waterfall->menu->other = array('link' => "$lang->other|workestimation|index|project=%s", 'class' => 'dropdown dropdown-hover'); @@ -256,7 +256,6 @@ $lang->waterfall->menu->other['dropMenu'] = new stdclass(); $lang->waterfall->menu->other['dropMenu']->estimation = array('link' => "$lang->estimation|workestimation|index|projectID=%s", 'subModule' => 'workestimation,durationestimation,budget'); $lang->waterfall->menu->other['dropMenu']->issue = array('link' => "$lang->issue|issue|browse|projectID=%s", 'subModule' => 'issue'); $lang->waterfall->menu->other['dropMenu']->risk = array('link' => "$lang->risk|risk|browse|projectID=%s", 'subModule' => 'risk'); -$lang->waterfall->menu->other['dropMenu']->stakeholder = array('link' => "{$lang->stakeholder->common}|stakeholder|browse|projectID=%s", 'subModule' => 'stakeholder'); $lang->waterfall->menu->settings = $lang->scrum->menu->settings; diff --git a/module/project/control.php b/module/project/control.php index c3c3c6524c..73e3e3bf70 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1356,8 +1356,6 @@ class project extends control */ public function whitelist($projectID = 0, $module = 'project', $from = 'project', $objectType = 'project', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) { - if($from == 'project') $this->project->setMenu($projectID); - echo $this->fetch('personnel', 'whitelist', "objectID=$projectID&module=$module&browseType=$objectType&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID&projectID=$projectID&from=$from"); } From 61269830344ef851125023f10eb038d136a5506c Mon Sep 17 00:00:00 2001 From: hufangzhou <746775970@qq.com> Date: Thu, 25 Mar 2021 14:12:17 +0800 Subject: [PATCH 06/34] * Fix bug #11486. --- module/testcase/model.php | 2 +- module/testcase/view/browse.html.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/module/testcase/model.php b/module/testcase/model.php index 068e03a3fa..0fe2b03860 100644 --- a/module/testcase/model.php +++ b/module/testcase/model.php @@ -509,7 +509,7 @@ class testcaseModel extends model ->where($caseQuery) ->beginIF($this->app->openApp == 'project')->andWhere('t2.project')->eq($this->session->project)->fi() ->beginIF(!empty($productID) and $queryProductID != 'all') - ->beginIF($this->app->openApp == 'project')->andWhere('t2.product')->eq($productID)->fi() + ->beginIF($this->app->openApp == 'project' and !empty($productID))->andWhere('t2.product')->eq($productID)->fi() ->beginIF($this->app->openApp != 'project')->andWhere('product')->eq($productID)->fi() ->fi() ->beginIF($auto != 'unit')->andWhere('auto')->ne('unit')->fi() diff --git a/module/testcase/view/browse.html.php b/module/testcase/view/browse.html.php index ba3d57b110..bc15838cb8 100644 --- a/module/testcase/view/browse.html.php +++ b/module/testcase/view/browse.html.php @@ -26,7 +26,8 @@ js::set('suiteID', $suiteID); ?> app->openApp == 'project'): ?>
From e46464f0e59156ae706a7eb5d5c205d290436ba3 Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Thu, 25 Mar 2021 14:37:32 +0800 Subject: [PATCH 07/34] * Fix bug. --- module/product/view/browse.html.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index 901ed294f4..ed3329bfa1 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -142,7 +142,8 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : ''; + +
+ From 78940a54985ffdc830172616a2a74e48b7535e42 Mon Sep 17 00:00:00 2001 From: leiyong <1549684884@qq.com> Date: Thu, 25 Mar 2021 14:58:11 +0800 Subject: [PATCH 12/34] * Fix bug. --- module/common/lang/menu.php | 4 ++-- module/common/model.php | 11 ++++++----- module/execution/control.php | 6 ++---- module/execution/view/bug.html.php | 5 +++-- module/product/control.php | 6 +++++- module/project/view/bug.html.php | 5 +++-- module/projectstory/control.php | 2 -- 7 files changed, 21 insertions(+), 18 deletions(-) diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php index e6fe0ff820..df1c0b0ecb 100644 --- a/module/common/lang/menu.php +++ b/module/common/lang/menu.php @@ -343,8 +343,8 @@ $lang->qa->menu->testtask['subMenu'] = new stdclass(); $lang->qa->menu->testtask['subMenu']->testtask = array('link' => "{$lang->testtask->common}|testtask|browse|productID=%s", 'subModule' => 'testtask', 'alias' => 'linkcase,cases,start,close,batchrun,groupcase,report,importunitresult'); $lang->qa->menu->testtask['subMenu']->report = array('link' => "{$lang->testreport->common}|testreport|browse|productID=%s", 'subModule' => 'testreport'); -$lang->qa->menu->automation['subMenu'] = new stdclass(); -$lang->qa->menu->automation['subMenu']->browse = array('link' => "{$lang->intro}|automation|browse|productID=%s", 'alias' => ''); +// $lang->qa->menu->automation['subMenu'] = new stdclass(); +// $lang->qa->menu->automation['subMenu']->browse = array('link' => "{$lang->intro}|automation|browse|productID=%s", 'alias' => ''); // $lang->qa->menu->automation['subMenu']->framework = array('link' => '框架|automation|framework|productID=%s', 'alias' => ''); // $lang->qa->menu->automation['subMenu']->data = array('link' => '数据|automation|date|productID=%s', 'alias' => ''); // $lang->qa->menu->automation['subMenu']->interface = array('link' => '接口|automation|interface|productID=%s', 'alias' => ''); diff --git a/module/common/model.php b/module/common/model.php index b83bb4581b..a66c61bdf3 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -1490,7 +1490,8 @@ EOD; $id = $object->$key; $objectList[$id] = $object; } - $this->session->set($objectIdListKey, array('sql' => $sql, 'objectList' => $objectList)); + + $this->session->set($objectIdListKey, array('sql' => $sql, 'objectList' => $objectList), $this->app->openApp); $existsObjectList = $this->session->$objectIdListKey; } @@ -1549,8 +1550,8 @@ EOD; $queryCondition = trim($queryCondition); if(empty($queryCondition)) $queryCondition = "1=1"; - $this->session->set($objectType . 'QueryCondition', $queryCondition); - $this->session->set($objectType . 'OnlyCondition', $onlyCondition); + $this->session->set($objectType . 'QueryCondition', $queryCondition, $this->app->openApp); + $this->session->set($objectType . 'OnlyCondition', $onlyCondition, $this->app->openApp); /* Set the query condition session. */ $orderBy = explode(' ORDER BY ', $sql); @@ -1561,8 +1562,8 @@ EOD; $orderBy = $orderBy[0]; if($onlyCondition) $orderBy = str_replace('t1.', '', $orderBy); } - $this->session->set($objectType . 'OrderBy', $orderBy); - $this->session->set($objectType . 'BrowseList', array()); + $this->session->set($objectType . 'OrderBy', $orderBy, $this->app->openApp); + $this->session->set($objectType . 'BrowseList', array(), $this->app->openApp); } /** diff --git a/module/execution/control.php b/module/execution/control.php index 3a06f25f7c..361d04de31 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -186,9 +186,7 @@ class execution extends control /* Save to session. */ $uri = $this->app->getURI(true); - $this->app->session->set('taskList', $uri, 'execution'); - $this->app->session->set('storyList', $uri, 'product'); - $this->app->session->set('executionList', $uri, 'execution'); + $this->app->session->set('taskList', $uri, 'execution'); /* Process the order by field. */ if(!$orderBy) $orderBy = $this->cookie->executionTaskOrder ? $this->cookie->executionTaskOrder : 'status,id_desc'; @@ -720,7 +718,7 @@ class execution extends control } /* Save session. */ - $this->app->session->set('storyList', $this->app->getURI(true), 'product'); + $this->app->session->set('storyList', $this->app->getURI(true), 'execution'); /* Process the order by field. */ if(!$orderBy) $orderBy = $this->cookie->executionStoryOrder ? $this->cookie->executionStoryOrder : 'pri'; diff --git a/module/execution/view/bug.html.php b/module/execution/view/bug.html.php index e1970283e3..237622c1bb 100644 --- a/module/execution/view/bug.html.php +++ b/module/execution/view/bug.html.php @@ -77,11 +77,12 @@ id"); ?> - id => ''), '', $arrtibute) . html::a(helper::createLink('bug', 'view', "bugID=$bug->id"), sprintf('%03d', $bug->id));?> + id => ''), '', $arrtibute) . html::a($viewLink, sprintf('%03d', $bug->id), '', "data-app={$this->app->openApp}");?> id);?> @@ -94,7 +95,7 @@ pri?>' title='bug->priList, $bug->pri, $bug->pri)?>'>bug->priList, $bug->pri, $bug->pri)?> - createLink('bug', 'view', "bugID=$bug->id"), $bug->title, null, "style='color: $bug->color'");?> + title, null, "style='color: $bug->color' data-app={$this->app->openApp}");?> openedBy, $bug->openedBy);?> bug->printAssignedHtml($bug, $users);?> resolvedBy, $bug->resolvedBy);?> diff --git a/module/product/control.php b/module/product/control.php index 1bf88f2bd9..7d4b90017a 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -122,7 +122,11 @@ class product extends control $productID = $this->app->openApp != 'project' ? $this->product->saveState($productID, $this->products) : $productID; if($this->app->openApp == 'product') $this->product->setMenu($productID, $branch); - if($this->app->openApp == 'project') $this->loadModel('project')->setMenu($projectID); + if($this->app->openApp == 'project') + { + $this->session->set('storyList', $this->app->getURI(true), 'project'); + $this->loadModel('project')->setMenu($projectID); + } /* Lower browse type. */ $browseType = strtolower($browseType); diff --git a/module/project/view/bug.html.php b/module/project/view/bug.html.php index f8ce2915f3..1402c0ba92 100644 --- a/module/project/view/bug.html.php +++ b/module/project/view/bug.html.php @@ -77,11 +77,12 @@ id"); ?> - id => ''), '', $arrtibute) . html::a(helper::createLink('bug', 'view', "bugID=$bug->id"), sprintf('%03d', $bug->id));?> + id => ''), '', $arrtibute) . html::a($viewLink, sprintf('%03d', $bug->id), '', "data-app={$this->app->openApp}");?> id);?> @@ -94,7 +95,7 @@ pri?>' title='bug->priList, $bug->pri, $bug->pri)?>'>bug->priList, $bug->pri, $bug->pri)?> - createLink('bug', 'view', "bugID=$bug->id"), $bug->title, null, "style='color: $bug->color'");?> + title, null, "style='color: $bug->color' data-app={$this->app->openApp}");?> openedBy, $bug->openedBy);?> bug->printAssignedHtml($bug, $users);?> resolvedBy, $bug->resolvedBy);?> diff --git a/module/projectstory/control.php b/module/projectstory/control.php index 802b862b41..d075e37228 100644 --- a/module/projectstory/control.php +++ b/module/projectstory/control.php @@ -45,8 +45,6 @@ class projectStory extends control */ public function story($projectID = 0, $productID = 0, $branch = 0, $browseType = '', $param = 0, $storyType = 'story', $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1) { - $this->session->set('storyList', $this->app->getURI(true), 'project'); - echo $this->fetch('product', 'browse', "productID=$productID&branch=$branch&browseType=$browseType¶m=$param&storyType=$storyType&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID&projectID=$projectID"); } From 1cc238f01029d0af575e8af450f829ee5e037ec7 Mon Sep 17 00:00:00 2001 From: Catouse Date: Thu, 25 Mar 2021 15:20:08 +0800 Subject: [PATCH 13/34] * refactor: format. --- module/index/js/index.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/module/index/js/index.js b/module/index/js/index.js index 4d27677838..406cc8401d 100644 --- a/module/index/js/index.js +++ b/module/index/js/index.js @@ -422,20 +422,20 @@ */ function refreshMoreMenu() { - var $mainNav = $('#menuMainNav'); - var $list = $('#menuMoreList'); - var $menuNav = $('#menuNav'); - var $menuItems = $mainNav.children('li'); - var maxHeight = $menuNav.height(); - var showMoreMenu = false; - var currentHeight = 40; + var $mainNav = $('#menuMainNav'); + var $list = $('#menuMoreList'); + var $menuNav = $('#menuNav'); + var $menuItems = $mainNav.children('li'); + var maxHeight = $menuNav.height(); + var showMoreMenu = false; + var currentHeight = 40; var moreMenuHeight = 13; $menuItems.each(function() { - var $item = $(this); + var $item = $(this); var isDivider = $item.hasClass('divider'); - var height = isDivider ? 17 : 40; + var height = isDivider ? 17 : 40; currentHeight += height; if(currentHeight > maxHeight) { @@ -443,10 +443,11 @@ if(!showMoreMenu) { showMoreMenu = true; + $list.empty(); + var $prevItem = $item.prev(); if($prevItem.hasClass('divider')) $prevItem.addClass('hidden'); - $list.empty(); if(isDivider) return; } moreMenuHeight += isDivider ? 13 : 31; @@ -457,7 +458,6 @@ $item.removeClass('hidden'); } }); - console.log('moreMenuHeight', moreMenuHeight); $list.css('top', moreMenuHeight > 111 ? 111 - moreMenuHeight : ''); $menuNav.toggleClass('show-more-nav', showMoreMenu); } From f7c077e364f4dcd6614e8a5df122252905c5631d Mon Sep 17 00:00:00 2001 From: Catouse Date: Thu, 25 Mar 2021 15:25:29 +0800 Subject: [PATCH 14/34] * task #36890, improve UI of nested table. --- module/program/view/browsebylist.html.php | 9 +++------ www/js/zui/min.js | 6 +++--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/module/program/view/browsebylist.html.php b/module/program/view/browsebylist.html.php index 9f44259d88..eefcbd2f4f 100644 --- a/module/program/view/browsebylist.html.php +++ b/module/program/view/browsebylist.html.php @@ -1,5 +1,5 @@ -
+ @@ -121,8 +121,8 @@ #programTableList.sortable-sorting > tr.drag-row {opacity: 1;} #programTableList > tr.drop-not-allowed {opacity: 0.1!important} #programList .c-actions {overflow: visible;} -#programList > thead > tr > th .table-nest-toggle-global {top:5px} -#programList > thead > tr > th .table-nest-toggle-global:before {color: #abafbc;} +#programList > thead > tr > th .table-nest-toggle-global {top: 6px} +#programList > thead > tr > th .table-nest-toggle-global:before {color: #a6aab8;} #programTableList > tr:last-child .c-actions .dropdown-menu {top: auto; bottom: 100%; margin-bottom: -5px;} #programTableList .icon-project:before {content: '\e99c'; width: 22px; height: 22px; background: none; color: #16a8f8; top: 0; line-height: 22px; margin-right: 2px; font-size: 14px} @@ -130,9 +130,6 @@