From 8daec0e8f5dc57c87e7bbf67351f69ee77b59a2f Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Thu, 1 Apr 2021 10:47:51 +0800 Subject: [PATCH 01/13] * Finish task #37003. --- module/block/view/recentprojectblock.html.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/module/block/view/recentprojectblock.html.php b/module/block/view/recentprojectblock.html.php index db50e4619e..364c579ff1 100644 --- a/module/block/view/recentprojectblock.html.php +++ b/module/block/view/recentprojectblock.html.php @@ -21,6 +21,7 @@ #cards .project-detail > p {margin-bottom: 8px;} #cards .project-detail .progress {height: 4px;} #cards .project-detail .progress-text-left .progress-text {width: 50px; left: -50px;} +#cards .project-detail .col-xs-5 {top: 4px;} #cards .panel-heading {cursor: pointer;} #cards .project-stages-container {margin: 0 -16px -16px -16px; padding: 0 4px; height: 46px; overflow-x: auto; position: relative;} #cards .project-stages:after {content: ' '; width: 30px; display: block; right: -16px; top: 16px; bottom: -6px; z-index: 1; background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%); position: absolute;} @@ -102,12 +103,10 @@
name;?>
-
-
- hours->progress;?>% +
+
hours->progress;?>
-
From 74a1d60d910b3f86996febdc3342ec19d06b5a37 Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Thu, 1 Apr 2021 10:55:35 +0800 Subject: [PATCH 02/13] * Finish task#37011. --- module/block/view/projectblock.html.php | 2 +- module/my/view/project.html.php | 2 +- module/product/view/project.html.php | 2 +- module/program/view/browsebylist.html.php | 2 +- module/project/model.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/module/block/view/projectblock.html.php b/module/block/view/projectblock.html.php index 8d5cd06af9..6f79a93be2 100644 --- a/module/block/view/projectblock.html.php +++ b/module/block/view/projectblock.html.php @@ -34,7 +34,7 @@ teamCount;?> consumed . $lang->execution->workHourUnit;?> - app->getClientLang(), ['zh-cn','zh-tw']) ? number_format((float)$project->budget / 10000, 2) . $this->lang->project->tenThousand : number_format((float)$project->budget, 2);?> + app->getClientLang(), ['zh-cn','zh-tw']) ? round((float)$project->budget / 10000, 2) . $this->lang->project->tenThousand : round((float)$project->budget, 2);?> budget != 0 ? zget($lang->project->currencySymbol, $project->budgetUnit) . ' ' . $programBudget : $lang->project->future;?> leftStories;?> leftTasks;?> diff --git a/module/my/view/project.html.php b/module/my/view/project.html.php index 19adc5e855..3d42736020 100644 --- a/module/my/view/project.html.php +++ b/module/my/view/project.html.php @@ -64,7 +64,7 @@ begin;?> end == LONG_TIME ? $this->lang->project->longTime : $project->end;?> - app->getClientLang(), ['zh-cn','zh-tw']) ? number_format((float)$project->budget / 10000, 2) . $this->lang->project->tenThousand : number_format((float)$project->budget, 2);?> + app->getClientLang(), ['zh-cn','zh-tw']) ? round((float)$project->budget / 10000, 2) . $this->lang->project->tenThousand : round((float)$project->budget, 2);?> budget != 0 ? zget($lang->project->currencySymbol, $project->budgetUnit) . ' ' . $projectBudget : $lang->project->future;?> PM]) ? $PMList[$project->PM]->id : ''?> diff --git a/module/product/view/project.html.php b/module/product/view/project.html.php index 64167eea91..fce5ba8ed7 100644 --- a/module/product/view/project.html.php +++ b/module/product/view/project.html.php @@ -76,7 +76,7 @@ - app->getClientLang(), ['zh-cn','zh-tw']) ? number_format((float)$project->budget / 10000, 2) . $this->lang->project->tenThousand : number_format((float)$project->budget, 2);?> + app->getClientLang(), ['zh-cn','zh-tw']) ? round((float)$project->budget / 10000, 2) . $this->lang->project->tenThousand : round((float)$project->budget, 2);?> budget != 0 ? zget($this->lang->project->currencySymbol, $project->budgetUnit) . ' ' . $projectBudget : $this->lang->project->future;?> hours->totalEstimate . $lang->execution->workHourUnit;?> diff --git a/module/program/view/browsebylist.html.php b/module/program/view/browsebylist.html.php index dde9b8cd81..5e91d301cc 100644 --- a/module/program/view/browsebylist.html.php +++ b/module/program/view/browsebylist.html.php @@ -57,7 +57,7 @@ PM]) ? $PMList[$program->PM]->id : ''?> PM)) echo html::a($this->createLink('user', 'profile', "userID=$userID", '', true), zget($users, $program->PM), '', "data-toggle='modal' data-type='iframe' data-width='600'");?> - app->getClientLang(), ['zh-cn','zh-tw']) ? number_format((float)$program->budget / 10000, 2) . $lang->project->tenThousand : number_format((float)$program->budget, 2);?> + app->getClientLang(), ['zh-cn','zh-tw']) ? round((float)$program->budget / 10000, 2) . $lang->project->tenThousand : round((float)$program->budget, 2);?> budget != 0 ? zget($lang->project->currencySymbol, $program->budgetUnit) . ' ' . $programBudget : $lang->project->future;?> project->statusList, $program->status, '');?> begin;?> diff --git a/module/project/model.php b/module/project/model.php index 76f51dab37..be2dcfaf30 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1260,7 +1260,7 @@ class projectModel extends model if($id == 'budget') { - $projectBudget = in_array($this->app->getClientLang(), ['zh-cn','zh-tw']) ? number_format((float)$project->budget / 10000, 2) . $this->lang->project->tenThousand : number_format((float)$project->budget, 2); + $projectBudget = in_array($this->app->getClientLang(), ['zh-cn','zh-tw']) ? round((float)$project->budget / 10000, 2) . $this->lang->project->tenThousand : round((float)$project->budget, 2); $budgetTitle = $project->budget != 0 ? zget($this->lang->project->currencySymbol, $project->budgetUnit) . ' ' . $projectBudget : $this->lang->project->future; $title = "title='$budgetTitle'"; From 44963152121cd442c77fc6382c1b43df8d8f2b21 Mon Sep 17 00:00:00 2001 From: leiyong <1549684884@qq.com> Date: Thu, 1 Apr 2021 05:57:20 +0300 Subject: [PATCH 03/13] * Fix bug#11462. --- module/bug/control.php | 11 ++++++----- module/execution/view/bug.html.php | 2 +- module/product/control.php | 12 ++++++++---- module/testcase/control.php | 11 ++++++----- module/testreport/control.php | 11 ++++++----- module/testtask/control.php | 11 ++++++----- 6 files changed, 33 insertions(+), 25 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 138a47f04d..78628b6422 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -48,15 +48,16 @@ class bug extends control $this->loadModel('qa'); /* Get product data. */ - $projectID = 0; + $objectID = 0; if($this->app->openApp == 'project') { - $projectID = $this->session->project; - $products = $this->loadModel('project')->getProducts($projectID, false); + $objectID = $this->session->project; + $products = $this->loadModel('project')->getProducts($objectID, false); } elseif($this->app->openApp == 'execution') { - $products = $this->loadModel('execution')->getProducts($this->session->execution, false); + $objectID = $this->session->execution; + $products = $this->loadModel('execution')->getProducts($objectID, false); } else { @@ -65,7 +66,7 @@ class bug extends control $this->view->products = $this->products = $products; $openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa'; - if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=bug&projectID=$projectID"))); + if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=bug&objectID=$objectID"))); } /** diff --git a/module/execution/view/bug.html.php b/module/execution/view/bug.html.php index 59eac32b7a..1b949f4e1a 100644 --- a/module/execution/view/bug.html.php +++ b/module/execution/view/bug.html.php @@ -32,7 +32,7 @@

bug->noBug;?> - createLink('bug', 'create', "productID=$productID&branch=$branchID&extra=executionID=$execution->id"), " " . $lang->bug->create, '', "class='btn btn-info'");?> + createLink('bug', 'create', "productID=$productID&branch=$branchID&extra=executionID=$execution->id"), " " . $lang->bug->create, '', "class='btn btn-info' data-app='execution'");?>

diff --git a/module/product/control.php b/module/product/control.php index dcf20ca7ed..876c58c709 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -989,9 +989,10 @@ class product extends control $this->lang->project->menuOrder = $this->lang->{$project->model}->menuOrder; $this->app->rawModule = $activeMenu; - if($activeMenu == 'testcase') $this->lang->{$project->model}->menu->qa['subMenu']->testcase['subModule'] = 'product'; - if($activeMenu == 'bug') $this->lang->{$project->model}->menu->qa['subMenu']->bug['subModule'] = 'product'; - if($activeMenu == 'testtask') $this->lang->{$project->model}->menu->qa['subMenu']->testtask['subModule'] = 'product'; + if($activeMenu == 'bug') $this->lang->{$project->model}->menu->qa['subMenu']->bug['subModule'] = 'product'; + if($activeMenu == 'testcase') $this->lang->{$project->model}->menu->qa['subMenu']->testcase['subModule'] = 'product'; + if($activeMenu == 'testtask') $this->lang->{$project->model}->menu->qa['subMenu']->testtask['subModule'] = 'product'; + if($activeMenu == 'testreport') $this->lang->{$project->model}->menu->qa['subMenu']->testreport['subModule'] = 'product'; } elseif($moduleName == 'qa') { @@ -1007,7 +1008,10 @@ class product extends control { $this->loadModel('execution')->setMenu($objectID); $this->app->rawModule = $activeMenu; - if($activeMenu == 'testreport') $this->lang->execution->menu->qa['subMenu']->testtask['subMenu']->testtask['subModule'] = 'product'; + if($activeMenu == 'bug') $this->lang->execution->menu->qa['subMenu']->bug['subModule'] = 'product'; + if($activeMenu == 'testcase') $this->lang->execution->menu->qa['subMenu']->testcase['subModule'] = 'product'; + if($activeMenu == 'testtask') $this->lang->execution->menu->qa['subMenu']->testtask['subModule'] = 'product'; + if($activeMenu == 'testreport') $this->lang->execution->menu->qa['subMenu']->testreport['subModule'] = 'product'; } $this->view->title = $this->lang->$moduleName->common; diff --git a/module/testcase/control.php b/module/testcase/control.php index 86289ca199..a5024aac36 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -42,15 +42,16 @@ class testcase extends control $this->loadModel('qa'); /* Get product data. */ - $projectID = 0; + $objectID = 0; if($this->app->openApp == 'project') { - $projectID = $this->session->project; - $products = $this->loadModel('project')->getProducts($projectID, false); + $objectID = $this->session->project; + $products = $this->loadModel('project')->getProducts($objectID, false); } elseif($this->app->openApp == 'execution') { - $products = $this->loadModel('execution')->getProducts($this->session->execution, false); + $objectID = $this->session->execution; + $products = $this->loadModel('execution')->getProducts($objectID, false); } else { @@ -59,7 +60,7 @@ class testcase extends control $this->view->products = $this->products = $products; $openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa'; - if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testcase&projectID=$projectID"))); + if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testcase&objectID=$objectID"))); } /** diff --git a/module/testreport/control.php b/module/testreport/control.php index 24077c8665..cfcaf7db2f 100644 --- a/module/testreport/control.php +++ b/module/testreport/control.php @@ -45,15 +45,16 @@ class testreport extends control $this->app->loadLang('report'); /* Get product data. */ - $projectID = 0; + $objectID = 0; if($this->app->openApp == 'project') { - $projectID = $this->session->project; - $products = $this->loadModel('project')->getProducts($projectID, false); + $objectID = $this->session->project; + $products = $this->loadModel('project')->getProducts($objectID, false); } elseif($this->app->openApp == 'execution') { - $products = $this->loadModel('execution')->getProducts($this->session->execution, false); + $objectID = $this->session->execution; + $products = $this->loadModel('execution')->getProducts($objectID, false); } else { @@ -62,7 +63,7 @@ class testreport extends control $this->view->products = $this->products = $products; $openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa'; - if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testreport&projectID=$projectID"))); + if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testreport&objectID=$objectID"))); } /** diff --git a/module/testtask/control.php b/module/testtask/control.php index b5fd585ce2..6a0b7dcc67 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -40,15 +40,16 @@ class testtask extends control $this->loadModel('product'); /* Get product data. */ - $projectID = 0; + $objectID = 0; if($this->app->openApp == 'project') { - $projectID = $this->session->project; - $products = $this->loadModel('project')->getProducts($projectID, false); + $objectID = $this->session->project; + $products = $this->loadModel('project')->getProducts($objectID, false); } elseif($this->app->openApp == 'execution') { - $products = $this->loadModel('execution')->getProducts($this->session->execution, false); + $objectID = $this->session->execution; + $products = $this->loadModel('execution')->getProducts($objectID, false); } else { @@ -57,7 +58,7 @@ class testtask extends control $this->view->products = $this->products = $products; $openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa'; - if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testtask&projectID=$projectID"))); + if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testtask&objectID=$objectID"))); } /** From c80f7b2197128ee71accd930368efffe22697c1a Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Thu, 1 Apr 2021 10:57:29 +0800 Subject: [PATCH 04/13] * Fix bug #11051. --- module/user/control.php | 44 ++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/module/user/control.php b/module/user/control.php index 8085bb333f..6ecd7783db 100644 --- a/module/user/control.php +++ b/module/user/control.php @@ -77,10 +77,10 @@ class user extends control $account = $user->account; $todos = $this->todo->getList($type, $account, $status, 0, $pager, $sort); $date = (int)$type == 0 ? helper::today() : $type; - $users = $this->loadModel('user')->getPairs('useid|noletter|noclosed'); + $users = $this->loadModel('dept')->getDeptUserPairs($this->app->user->dept, 'useid'); /* set menus. */ - $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid|noletter'), $userID); + $this->view->userList = $this->user->setUserList($users, $userID); $this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->todo; $this->view->position[] = $this->lang->user->todo; @@ -119,7 +119,7 @@ class user extends control $user = $this->user->getById($userID, 'id'); $account = $user->account; - $users = $this->loadModel('dept')->getDeptUserPairs($user->dept, 'useid'); + $users = $this->loadModel('dept')->getDeptUserPairs($this->app->user->dept, 'useid'); /* Modify story title. */ $this->loadModel('story'); @@ -135,7 +135,7 @@ class user extends control $this->view->type = $type; $this->view->user = $user; $this->view->pager = $pager; - $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid|noletter'), $userID); + $this->view->userList = $this->user->setUserList($users, $userID); $this->display(); } @@ -162,10 +162,10 @@ class user extends control $user = $this->user->getById($userID, 'id'); $account = $user->account; - $users = $this->loadModel('dept')->getDeptUserPairs($user->dept, 'useid'); + $users = $this->loadModel('dept')->getDeptUserPairs($this->app->user->dept, 'useid'); /* Set the menu. */ - $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid|noletter'), $userID); + $this->view->userList = $this->user->setUserList($users, $userID); /* Assign. */ $this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->task; @@ -203,10 +203,10 @@ class user extends control $user = $this->user->getById($userID, 'id'); $account = $user->account; - $users = $this->loadModel('dept')->getDeptUserPairs($user->dept, 'useid'); + $users = $this->loadModel('dept')->getDeptUserPairs($this->app->user->dept, 'useid'); /* Set menu. */ - $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid|noletter'), $userID); + $this->view->userList = $this->user->setUserList($users, $userID); /* Load the lang of bug module. */ $this->app->loadLang('bug'); @@ -243,10 +243,10 @@ class user extends control $user = $this->user->getById($userID, 'id'); $account = $user->account; - $users = $this->loadModel('dept')->getDeptUserPairs($user->dept, 'useid'); + $users = $this->loadModel('dept')->getDeptUserPairs($this->app->user->dept, 'useid'); /* Set menu. */ - $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid|noletter'), $userID); + $this->view->userList = $this->user->setUserList($users, $userID); /* Save session. */ $this->session->set('testtaskList', $this->app->getURI(true), 'qa'); @@ -294,7 +294,7 @@ class user extends control $user = $this->user->getById($userID, 'id'); $account = $user->account; - $users = $this->loadModel('dept')->getDeptUserPairs($user->dept, 'useid'); + $users = $this->loadModel('dept')->getDeptUserPairs($this->app->user->dept, 'useid'); /* Append id for secend sort. */ $sort = $this->loadModel('common')->appendOrder($orderBy); @@ -323,7 +323,7 @@ class user extends control $this->view->pageID = $pageID; $this->view->orderBy = $orderBy; $this->view->pager = $pager; - $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid|noletter'), $userID); + $this->view->userList = $this->user->setUserList($users, $userID); $this->display(); } @@ -345,7 +345,7 @@ class user extends control $user = $this->user->getById($userID, 'id'); $account = $user->account; - $users = $this->loadModel('dept')->getDeptUserPairs($user->dept, 'useid'); + $users = $this->loadModel('dept')->getDeptUserPairs($this->app->user->dept, 'useid'); /* Load pager. */ $this->app->loadClass('pager', $static = true); @@ -353,7 +353,7 @@ class user extends control /* Set the menus. */ $this->loadModel('project'); - $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid|noletter'), $userID); + $this->view->userList = $this->user->setUserList($users, $userID); $this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->execution; $this->view->position[] = $this->lang->user->execution; @@ -385,14 +385,14 @@ class user extends control $user = $this->user->getById($userID, 'id'); $account = $user->account; - $users = $this->loadModel('dept')->getDeptUserPairs($user->dept, 'useid'); + $users = $this->loadModel('dept')->getDeptUserPairs($this->app->user->dept, 'useid'); /* Load pager. */ $this->app->loadClass('pager', $static = true); $pager = pager::init($recTotal, $recPerPage, $pageID); /* Set the menus. */ - $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid|noletter'), $userID); + $this->view->userList = $this->user->setUserList($users, $userID); $this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->issue; $this->view->position[] = $this->lang->user->issue; @@ -425,14 +425,14 @@ class user extends control $user = $this->user->getById($userID, 'id'); $account = $user->account; - $users = $this->loadModel('dept')->getDeptUserPairs($user->dept, 'useid'); + $users = $this->loadModel('dept')->getDeptUserPairs($this->app->user->dept, 'useid'); /* Load pager. */ $this->app->loadClass('pager', $static = true); $pager = pager::init($recTotal, $recPerPage, $pageID); /* Set the menus. */ - $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid|noletter'), $userID); + $this->view->userList = $this->user->setUserList($users, $userID); $this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->risk; $this->view->position[] = $this->lang->user->risk; @@ -458,7 +458,7 @@ class user extends control $user = $this->user->getById($userID, 'id'); $account = $user->account; - $users = $this->loadModel('dept')->getDeptUserPairs($user->dept, 'useid'); + $users = $this->loadModel('dept')->getDeptUserPairs($this->app->user->dept, 'useid'); $this->view->title = "USER #$user->id $user->account/" . $this->lang->user->profile; $this->view->position[] = $this->lang->user->common; @@ -467,7 +467,7 @@ class user extends control $this->view->groups = $this->loadModel('group')->getByAccount($account); $this->view->deptPath = $this->dept->getParents($user->dept); $this->view->personalData = $this->user->getPersonalData($user->account); - $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid|noletter'), $userID); + $this->view->userList = $this->user->setUserList($users, $userID); $this->display(); } @@ -1055,10 +1055,10 @@ class user extends control { $user = $this->user->getById($userID, 'id'); $account = $user->account; - $users = $this->loadModel('dept')->getDeptUserPairs($user->dept, 'useid'); + $users = $this->loadModel('dept')->getDeptUserPairs($this->app->user->dept, 'useid'); /* set menus. */ - $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid|noletter'), $userID); + $this->view->userList = $this->user->setUserList($users, $userID); /* Save session. */ $uri = $this->app->getURI(true); From d026b0ba559dcb8249f76833c57058dc0589a226 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Thu, 1 Apr 2021 11:00:09 +0800 Subject: [PATCH 05/13] * Fix bug #11044. --- db/zentao.sql | 4 +++- module/my/view/execution.html.php | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/db/zentao.sql b/db/zentao.sql index db8e0bd5ff..8c642ac25c 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -4139,7 +4139,9 @@ INSERT INTO `zt_lang` (`lang`, `module`, `section`, `key`, `value`, `system`) VA ('zh-cn', 'custom', 'URSRList', '2', '{\"SRName\":\"\\u7814\\u53d1\\u9700\\u6c42\",\"URName\":\"\\u7528\\u6237\\u9700\\u6c42\"}', '1'), ('zh-cn', 'custom', 'URSRList', '3', '{\"SRName\":\"\\u8f6f\\u9700\",\"URName\":\"\\u7528\\u9700\"}', '1'), ('zh-cn', 'custom', 'URSRList', '4', '{\"SRName\":\"\\u6545\\u4e8b\",\"URName\":\"\\u53f2\\u8bd7\"}', '1'), -('zh-cn', 'custom', 'URSRList', '5', '{\"SRName\":\"\\u9700\\u6c42\",\"URName\":\"\\u7528\\u6237\\u9700\\u6c42\"}', '1'); +('zh-cn', 'custom', 'URSRList', '5', '{\"SRName\":\"\\u9700\\u6c42\",\"URName\":\"\\u7528\\u6237\\u9700\\u6c42\"}', '1'), +('en', 'custom', 'URSRList', '3', '{\"SRName\":\"Story\",\"URName\":\"Epic\"}', '0'), +('en', 'custom', 'URSRList', '2', '{\"SRName\":\"Story\",\"URName\":\"Requirement\"}', '0'); INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'custom', '', 'hourPoint', '1'); INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'common', '', 'CRProduct', '1'); diff --git a/module/my/view/execution.html.php b/module/my/view/execution.html.php index eab410cad5..a2fbe40dc8 100644 --- a/module/my/view/execution.html.php +++ b/module/my/view/execution.html.php @@ -53,7 +53,6 @@ id));?> - execution->typeList, $execution->type);?> name, '', "title='$execution->name'");?> systemMode == 'new'):?> From b12efb31ef30cbbafb5f39a90d1d5eb8949e313a Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Thu, 1 Apr 2021 11:07:11 +0800 Subject: [PATCH 06/13] * Finish task #37004. --- module/block/view/recentprojectblock.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/block/view/recentprojectblock.html.php b/module/block/view/recentprojectblock.html.php index 364c579ff1..a99543f388 100644 --- a/module/block/view/recentprojectblock.html.php +++ b/module/block/view/recentprojectblock.html.php @@ -101,7 +101,7 @@

project->lastIteration; ?>

-
name;?>
+
createLink('execution', 'task', "executionID={$project->id}"), $project->name);?>
hours->progress;?>
From 227c8642de73cbb48fc531fc80c1b7860ce191bc Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Thu, 1 Apr 2021 11:12:23 +0800 Subject: [PATCH 07/13] * Fix product custom whitelist upgrade issue. --- module/execution/control.php | 4 ++-- module/project/control.php | 6 +++++- module/upgrade/model.php | 42 ++++++++++++++++++++++++++++++++++-- 3 files changed, 47 insertions(+), 5 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index 497205d68b..ac3e11f87b 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2572,8 +2572,8 @@ class execution extends control $projects = $this->loadModel('program')->getProjectList(0, 'all', 0, 'order_asc'); $executionGroups = $this->dao->select('*')->from(TABLE_EXECUTION) - ->where('id')->in($this->app->user->view->sprints) - ->andWhere('deleted')->eq(0) + ->where('deleted')->eq(0) + ->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->sprints)->fi() ->beginIF($this->config->systemMode == 'new')->andWhere('project')->in(array_keys($projects))->fi() ->orderBy('id_desc') ->fetchGroup('project', 'id'); diff --git a/module/project/control.php b/module/project/control.php index e71bd75e0f..260f44e6f8 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -108,7 +108,11 @@ class project extends control public function ajaxGetDropMenu($projectID = 0, $module, $method) { $programs = $this->dao->select('id, name')->from(TABLE_PROGRAM)->where('type')->eq('program')->andWhere('deleted')->eq(0)->orderBy('order_asc')->fetchPairs(); - $projects = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->in($this->app->user->view->projects)->andWhere('deleted')->eq(0)->orderBy('order_asc')->fetchAll('id'); + $projects = $this->dao->select('*')->from(TABLE_PROJECT) + ->where('deleted')->eq(0) + ->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi() + ->orderBy('order_asc') + ->fetchAll('id'); /* Sort project by program. */ $this->loadModel('program'); diff --git a/module/upgrade/model.php b/module/upgrade/model.php index a37a2c9b77..d26020ce0c 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -636,6 +636,7 @@ class upgradeModel extends model $this->saveLogs('Execute 15_0'); $this->execSQL($this->getUpgradeFile('15.0')); $this->adjustWhitelistOfProject(); + $this->adjustWhitelistOfProduct(); $this->appendExec('15_0'); case '15_0_beta1': $this->saveLogs('Execute 15_0_beta1'); @@ -4403,6 +4404,10 @@ class upgradeModel extends model $groups = explode(',', $product->whitelist); $groupAccounts = $this->group->getGroupAccounts($groups); + + /* Get the whitelist data from the classic version mode upgrade. */ + $groupAccounts += $this->dao->select('account')->from(TABLE_ACL)->where('objectID')->eq($product->id)->andWhere('objectType')->eq('product')->andWhere('type')->eq('whitelist')->fetchPairs('account'); + $whiteList += $groupAccounts; $this->personnel->updateWhitelist($groupAccounts, 'product', $product->id, 'whitelist', 'upgrade'); } @@ -4413,10 +4418,12 @@ class upgradeModel extends model { if($sprint->acl != 'private') continue; - $groups = explode(',', $sprint->whitelist); - $groupAccounts = $this->group->getGroupAccounts($groups); + $groups = explode(',', $sprint->whitelist); + $groupAccounts = $this->group->getGroupAccounts($groups); + /* Get the whitelist data from the classic version mode upgrade. */ $groupAccounts += $this->dao->select('account')->from(TABLE_ACL)->where('objectID')->eq($sprint->id)->andWhere('objectType')->eq('sprint')->andWhere('type')->eq('whitelist')->fetchPairs('account'); + $this->personnel->updateWhitelist($groupAccounts, 'sprint', $sprint->id, 'whitelist', 'upgrade'); } } @@ -4723,4 +4730,35 @@ class upgradeModel extends model return true; } + + /** + * Adjust the whitelist of projects. + * + * @access public + * @return bool + */ + public function adjustWhitelistOfProduct() + { + $products = $this->dao->select('*')->from(TABLE_PRODUCT)->where('acl')->eq('custom')->fetchAll(); + foreach($products as $product) + { + $groups = explode(',', $product->whitelist); + $accounts = $this->dao->select('account')->from(TABLE_USERGROUP)->where('`group`')->in($groups)->fetchPairs('account'); + foreach($accounts as $account) + { + $acl = new stdclass(); + $acl->account = $account; + $acl->objectType = 'product'; + $acl->objectID = $product->id; + $acl->type = 'whitelist'; + $acl->source = 'upgrade'; + + $this->dao->insert(TABLE_ACL)->data($acl)->exec(); + } + + $this->dao->update(TABLE_PRODUCT)->set('acl')->eq('private')->where('id')->eq($product->id)->exec(); + } + + return true; + } } From 8f2b381f5ac4e36d4503a16b4ed30c2a70661996 Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Thu, 1 Apr 2021 11:13:32 +0800 Subject: [PATCH 08/13] * Hide program setting in project list. --- module/project/view/browse.html.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/module/project/view/browse.html.php b/module/project/view/browse.html.php index 73ccfbb441..b3c89be249 100644 --- a/module/project/view/browse.html.php +++ b/module/project/view/browse.html.php @@ -54,9 +54,6 @@ js::set('browseType', $browseType);
-
- project->moduleSetting, '', "class='btn btn-info btn-wide iframe'", true, true);?> -
From 437b79eeea12217b0806cc52ee129c3084c1ee48 Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Thu, 1 Apr 2021 11:13:47 +0800 Subject: [PATCH 09/13] * Fix bug. --- module/project/model.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/project/model.php b/module/project/model.php index be2dcfaf30..830ac2b291 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1618,7 +1618,8 @@ class projectModel extends model /* Replace waterfall lang. */ if($project->model == 'waterfall') { - $lang->scrum->menu->execution['link'] = str_replace($lang->executionCommon, $lang->project->stage, $lang->scrum->menu->execution['link']); + $this->loadModel('execution'); + $lang->scrum->menu->execution['link'] = str_replace($lang->executionCommon, $lang->project->stage, $lang->scrum->menu->execution['link']); $lang->execution->create = str_replace($lang->executionCommon, $lang->project->stage, $lang->execution->create); $lang->execution->name = str_replace($lang->executionCommon, $lang->project->stage, $lang->execution->name); $lang->execution->status = str_replace($lang->executionCommon, $lang->project->stage, $lang->execution->status); From b04ca379f23ab6de722da398c79d215fb7df529b Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Thu, 1 Apr 2021 11:25:29 +0800 Subject: [PATCH 10/13] * Finish task#37050. --- module/block/view/waterfallissueblock.html.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/block/view/waterfallissueblock.html.php b/module/block/view/waterfallissueblock.html.php index bc5f5ee000..21df7207e9 100644 --- a/module/block/view/waterfallissueblock.html.php +++ b/module/block/view/waterfallissueblock.html.php @@ -19,8 +19,8 @@ issue->severity;?> issue->pri;?> - issue->owner;?> - issue->assignedTo;?> + issue->owner;?> + issue->assignedTo;?> issue->status;?> From 75a531c422f842a3cc3d87dc5bca04148e0a8771 Mon Sep 17 00:00:00 2001 From: hufangzhou <746775970@qq.com> Date: Thu, 1 Apr 2021 11:27:53 +0800 Subject: [PATCH 11/13] * Finish task #37051. --- module/block/control.php | 1 + module/block/view/waterfallreportblock.html.php | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/module/block/control.php b/module/block/control.php index ae63c94a30..266ea96cfd 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -1174,6 +1174,7 @@ class block extends control */ public function printWaterfallReportBlock() { + $this->app->loadLang('programplan'); $project = $this->loadModel('project')->getByID($this->session->project); $today = helper::today(); $date = date('Ymd', strtotime('this week Monday')); diff --git a/module/block/view/waterfallreportblock.html.php b/module/block/view/waterfallreportblock.html.php index dfbd693309..577228719c 100644 --- a/module/block/view/waterfallreportblock.html.php +++ b/module/block/view/waterfallreportblock.html.php @@ -1,6 +1,6 @@