From cf457c7a7e2d85c94803e3854f15d30a34888155 Mon Sep 17 00:00:00 2001 From: pengjiangxiu Date: Fri, 14 Jul 2017 15:03:26 +0800 Subject: [PATCH 1/8] * Finish task #3077. --- module/bug/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/bug/config.php b/module/bug/config.php index 525b6d7bca..ad1dc49272 100644 --- a/module/bug/config.php +++ b/module/bug/config.php @@ -27,7 +27,7 @@ $config->bug->list->defaultFields = 'id,severity,pri,title,openedBy,assignedTo,r $config->bug->list->exportFields = 'id, product, branch, module, project, story, task, title, keywords, severity, pri, type, os, browser, - steps, status, activatedCount, confirmed, mailto, + steps, status, deadline, activatedCount, confirmed, mailto, openedBy, openedDate, openedBuild, assignedTo, assignedDate, resolvedBy, resolution, resolvedBuild, resolvedDate, From ca2a3528de6e4e2cd3bca364f51478d7382ed46d Mon Sep 17 00:00:00 2001 From: pengjiangxiu Date: Sat, 15 Jul 2017 10:13:41 +0800 Subject: [PATCH 2/8] * finish task #3076. --- db/update9.3.beta.sql | 4 ++++ db/zentao.sql | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 db/update9.3.beta.sql diff --git a/db/update9.3.beta.sql b/db/update9.3.beta.sql new file mode 100644 index 0000000000..1a241ea247 --- /dev/null +++ b/db/update9.3.beta.sql @@ -0,0 +1,4 @@ +alter table zt_bug modify column mailto text; +alter table zt_story modify column mailto text; +alter table zt_task modify column mailto text; +alter table zt_testtask modify column mailto text; diff --git a/db/zentao.sql b/db/zentao.sql index bf500ff379..a0e4d3b78e 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -68,7 +68,7 @@ CREATE TABLE IF NOT EXISTS `zt_bug` ( `color` char(7) NOT NULL, `confirmed` tinyint(1) NOT NULL default '0', `activatedCount` smallint(6) NOT NULL, - `mailto` varchar(255) NOT NULL default '', + `mailto` text, `openedBy` varchar(30) NOT NULL default '', `openedDate` datetime NOT NULL, `openedBuild` varchar(255) NOT NULL, @@ -353,7 +353,7 @@ CREATE TABLE IF NOT EXISTS `zt_group` ( `name` char(30) NOT NULL, `role` char(30) NOT NULL default '', `desc` char(255) NOT NULL default '', - `acl` text NOT NULL default '', + `acl` text, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_grouppriv`; @@ -513,7 +513,7 @@ CREATE TABLE IF NOT EXISTS `zt_story` ( `product` mediumint(8) unsigned NOT NULL default '0', `branch` mediumint(8) unsigned NOT NULL default '0', `module` mediumint(8) unsigned NOT NULL default '0', - `plan` text NOT NULL default '', + `plan` text, `source` varchar(20) NOT NULL, `sourceNote` varchar(255) NOT NULL, `fromBug` mediumint(8) unsigned NOT NULL default '0', @@ -525,7 +525,7 @@ CREATE TABLE IF NOT EXISTS `zt_story` ( `status` enum('','changed','active','draft','closed') NOT NULL default '', `color` char(7) NOT NULL, `stage` enum('','wait','planned','projected','developing','developed','testing','tested','verified','released') NOT NULL DEFAULT 'wait', - `mailto` varchar(255) NOT NULL default '', + `mailto` text, `openedBy` varchar(30) NOT NULL default '', `openedDate` datetime NOT NULL, `assignedTo` varchar(30) NOT NULL default '', @@ -587,7 +587,7 @@ CREATE TABLE IF NOT EXISTS `zt_task` ( `deadline` date NOT NULL, `status` enum('wait','doing','done','pause','cancel','closed') NOT NULL default 'wait', `color` char(7) NOT NULL, - `mailto` varchar(255) NOT NULL default '', + `mailto` text, `desc` text NOT NULL, `openedBy` varchar(30) NOT NULL, `openedDate` datetime NOT NULL, @@ -705,7 +705,7 @@ CREATE TABLE IF NOT EXISTS `zt_testtask` ( `pri` tinyint(3) unsigned NOT NULL default '0', `begin` date NOT NULL, `end` date NOT NULL, - `mailto` varchar(255) NOT NULL default '', + `mailto` text, `desc` text NOT NULL, `report` text NOT NULL, `status` enum('blocked','doing','wait','done') NOT NULL DEFAULT 'wait', From 279a96fca5dfc9090296178ae23011c3a64396c3 Mon Sep 17 00:00:00 2001 From: pengjiangxiu Date: Sat, 15 Jul 2017 10:16:33 +0800 Subject: [PATCH 3/8] * finish task #3075. --- module/bug/view/create.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php index 8cbafe06d6..a91f34327c 100644 --- a/module/bug/view/create.html.php +++ b/module/bug/view/create.html.php @@ -231,7 +231,7 @@ js::set('confirmDeleteTemplate', $lang->bug->confirmDeleteTemplate); - + Date: Sat, 15 Jul 2017 15:41:59 +0800 Subject: [PATCH 4/8] * finish task #3066. --- module/productplan/control.php | 1 + module/productplan/lang/en.php | 1 + module/productplan/lang/zh-cn.php | 1 + module/productplan/lang/zh-tw.php | 1 + module/productplan/model.php | 4 +++- module/productplan/view/create.html.php | 3 +++ 6 files changed, 10 insertions(+), 1 deletion(-) diff --git a/module/productplan/control.php b/module/productplan/control.php index 7b6e144c77..d27dc613a0 100644 --- a/module/productplan/control.php +++ b/module/productplan/control.php @@ -61,6 +61,7 @@ class productplan extends control $this->view->begin = $lastPlan ? $begin : ''; $this->view->title = $this->view->product->name . $this->lang->colon . $this->lang->productplan->create; + $this->view->lastPlan = $lastPlan; $this->view->position[] = $this->lang->productplan->common; $this->view->position[] = $this->lang->productplan->create; $this->display(); diff --git a/module/productplan/lang/en.php b/module/productplan/lang/en.php index 5bc236f6b7..01ba413fd5 100644 --- a/module/productplan/lang/en.php +++ b/module/productplan/lang/en.php @@ -43,6 +43,7 @@ $lang->productplan->title = 'Title'; $lang->productplan->desc = 'Description'; $lang->productplan->begin = 'Begin'; $lang->productplan->end = 'End'; +$lang->productplan->last = 'Last Release'; $lang->productplan->endList[7] = '1 Week'; $lang->productplan->endList[14] = '1 Weeks'; diff --git a/module/productplan/lang/zh-cn.php b/module/productplan/lang/zh-cn.php index 929d819ab7..ae947374eb 100644 --- a/module/productplan/lang/zh-cn.php +++ b/module/productplan/lang/zh-cn.php @@ -43,6 +43,7 @@ $lang->productplan->title = '名称'; $lang->productplan->desc = '描述'; $lang->productplan->begin = '开始日期'; $lang->productplan->end = '结束日期'; +$lang->productplan->last = '上次发布'; $lang->productplan->endList[7] = '一星期'; $lang->productplan->endList[14] = '两星期'; diff --git a/module/productplan/lang/zh-tw.php b/module/productplan/lang/zh-tw.php index a39000cba1..16155a7359 100644 --- a/module/productplan/lang/zh-tw.php +++ b/module/productplan/lang/zh-tw.php @@ -43,6 +43,7 @@ $lang->productplan->title = '名稱'; $lang->productplan->desc = '描述'; $lang->productplan->begin = '開始日期'; $lang->productplan->end = '結束日期'; +$lang->productplan->last = '上次發佈'; $lang->productplan->endList[7] = '一星期'; $lang->productplan->endList[14] = '兩星期'; diff --git a/module/productplan/model.php b/module/productplan/model.php index b658137879..5dc5c519a2 100644 --- a/module/productplan/model.php +++ b/module/productplan/model.php @@ -48,12 +48,14 @@ class productplanModel extends model * @access public * @return void */ - public function getLast($productID) + public function getLast($productID, $branch = 0) { return $this->dao->select('*')->from(TABLE_PRODUCTPLAN) ->where('deleted')->eq(0) ->andWhere('product')->eq($productID) + ->beginIF($branch)->andWhere('branch')->eq($branch)->fi() ->orderBy('end desc') + ->limit(1) ->fetch(); } diff --git a/module/productplan/view/create.html.php b/module/productplan/view/create.html.php index 008760f91e..c605b8ec19 100644 --- a/module/productplan/view/create.html.php +++ b/module/productplan/view/create.html.php @@ -37,6 +37,9 @@ productplan->title;?> + +   (' . $lang->productplan->last . ': ' . $lastPlan->title . ')';?> + productplan->begin;?> From 26e3e0d2066874d3a1290b73cc5a472d9acbc304 Mon Sep 17 00:00:00 2001 From: pengjiangxiu Date: Sat, 15 Jul 2017 16:16:02 +0800 Subject: [PATCH 5/8] * finish task #3069. --- module/testtask/model.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/module/testtask/model.php b/module/testtask/model.php index b1db7f91e3..d6fbe9d873 100644 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -273,6 +273,7 @@ class testtaskModel extends model { return $this->dao->select('*')->from(TABLE_CASE)->where($query) ->andWhere('id')->notIN($linkedCases) + ->andWhere('status')->ne('wait') ->beginIF($task->branch)->andWhere('branch')->in("0,$task->branch")->fi() ->andWhere('deleted')->eq(0) ->orderBy('id desc') @@ -299,6 +300,7 @@ class testtaskModel extends model { $cases = $this->dao->select('*')->from(TABLE_CASE)->where($query) ->andWhere('product')->eq($productID) + ->andWhere('status')->ne('wait') ->beginIF($linkedCases)->andWhere('id')->notIN($linkedCases)->fi() ->beginIF($task->branch)->andWhere('branch')->in("0,$task->branch")->fi() ->andWhere('story')->in(trim($stories, ',')) @@ -330,6 +332,7 @@ class testtaskModel extends model { $cases = $this->dao->select('*')->from(TABLE_CASE)->where($query) ->andWhere('product')->eq($productID) + ->andWhere('status')->ne('wait') ->beginIF($linkedCases)->andWhere('id')->notIN($linkedCases)->fi() ->beginIF($task->branch)->andWhere('branch')->in("0,$task->branch")->fi() ->andWhere('fromBug')->in(trim($bugs, ',')) @@ -361,6 +364,7 @@ class testtaskModel extends model ->where($query) ->andWhere('t2.suite')->eq((int)$suite) ->andWhere('t1.product')->eq($productID) + ->andWhere('status')->ne('wait') ->beginIF($linkedCases)->andWhere('t1.id')->notIN($linkedCases)->fi() ->beginIF($task->branch)->andWhere('t1.branch')->in("0,$task->branch")->fi() ->andWhere('deleted')->eq(0) @@ -382,7 +386,7 @@ class testtaskModel extends model { $caseList = $this->dao->select("`case`")->from(TABLE_TESTRUN)->where('task')->eq($testTask)->andWhere('`case`')->notin($linkedCases)->fetchPairs('case'); - return $this->dao->select("*")->from(TABLE_CASE)->where('id')->in($caseList)->page($pager)->fetchAll(); + return $this->dao->select("*")->from(TABLE_CASE)->where('id')->in($caseList)->andWhere('status')->ne('wait')->page($pager)->fetchAll(); } /** From c00018831ea9840d827aa49a8c65beec5a7823e2 Mon Sep 17 00:00:00 2001 From: pengjiangxiu Date: Sat, 15 Jul 2017 17:11:40 +0800 Subject: [PATCH 6/8] * finish task #3073. --- module/productplan/control.php | 2 +- module/productplan/lang/zh-cn.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/productplan/control.php b/module/productplan/control.php index d27dc613a0..8bbc7f836b 100644 --- a/module/productplan/control.php +++ b/module/productplan/control.php @@ -179,7 +179,7 @@ class productplan extends control * @access public * @return void */ - public function browse($productID = 0, $branch = 0, $browseType = 'unexpired', $orderBy = 'begin_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1 ) + public function browse($productID = 0, $branch = 0, $browseType = 'all', $orderBy = 'begin_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1 ) { /* Load pager. */ $this->app->loadClass('pager', $static = true); diff --git a/module/productplan/lang/zh-cn.php b/module/productplan/lang/zh-cn.php index ae947374eb..0601f7d940 100644 --- a/module/productplan/lang/zh-cn.php +++ b/module/productplan/lang/zh-cn.php @@ -58,6 +58,6 @@ $lang->productplan->errorNoBegin = 'ID %s 开始时间不能为空'; $lang->productplan->errorNoEnd = 'ID %s 结束时间不能为空'; $lang->productplan->beginGeEnd = 'ID %s 开始时间不能大于结束时间'; -$lang->productplan->featureBar['browse']['unexpired'] = '未过期'; $lang->productplan->featureBar['browse']['all'] = '全部'; +$lang->productplan->featureBar['browse']['unexpired'] = '未过期'; $lang->productplan->featureBar['browse']['overdue'] = '已过期'; From 1b5465b57b787cc79161129890a0d1b29cfd546b Mon Sep 17 00:00:00 2001 From: pengjiangxiu Date: Mon, 17 Jul 2017 10:54:17 +0800 Subject: [PATCH 7/8] * Finish task #3078. --- module/admin/control.php | 18 ++++++++++-------- module/admin/view/sso.html.php | 4 ++++ module/common/view/footer.html.php | 2 +- module/common/view/header.html.php | 6 +++--- module/sso/lang/en.php | 1 + module/sso/lang/zh-cn.php | 1 + module/sso/lang/zh-tw.php | 1 + 7 files changed, 21 insertions(+), 12 deletions(-) diff --git a/module/admin/control.php b/module/admin/control.php index ca21460e1e..86ecabbaaa 100644 --- a/module/admin/control.php +++ b/module/admin/control.php @@ -205,10 +205,11 @@ class admin extends control if(!empty($_POST)) { $ssoConfig = new stdclass(); - $ssoConfig->turnon = $this->post->turnon; - $ssoConfig->addr = $this->post->addr; - $ssoConfig->code = trim($this->post->code); - $ssoConfig->key = trim($this->post->key); + $ssoConfig->turnon = $this->post->turnon; + $ssoConfig->redirect = $this->post->redirect; + $ssoConfig->addr = $this->post->addr; + $ssoConfig->code = trim($this->post->code); + $ssoConfig->key = trim($this->post->key); $this->loadModel('setting')->setItems('system.sso', $ssoConfig); if(dao::isError()) die(js::error(dao::getError())); @@ -221,10 +222,11 @@ class admin extends control $this->view->title = $this->lang->admin->sso; $this->view->position[] = $this->lang->admin->sso; - $this->view->turnon = isset($this->config->sso->turnon) ? $this->config->sso->turnon : 1; - $this->view->addr = isset($this->config->sso->addr) ? $this->config->sso->addr : ''; - $this->view->key = isset($this->config->sso->key) ? $this->config->sso->key : ''; - $this->view->code = isset($this->config->sso->code) ? $this->config->sso->code : ''; + $this->view->turnon = isset($this->config->sso->turnon) ? $this->config->sso->turnon : 1; + $this->view->redirect = isset($this->config->sso->redirect) ? $this->config->sso->redirect : 0; + $this->view->addr = isset($this->config->sso->addr) ? $this->config->sso->addr : ''; + $this->view->key = isset($this->config->sso->key) ? $this->config->sso->key : ''; + $this->view->code = isset($this->config->sso->code) ? $this->config->sso->code : ''; $this->display(); } diff --git a/module/admin/view/sso.html.php b/module/admin/view/sso.html.php index cb0d53acaa..41a954797f 100644 --- a/module/admin/view/sso.html.php +++ b/module/admin/view/sso.html.php @@ -24,6 +24,10 @@ sso->turnon; ?> sso->turnonList, $turnon);?> + + sso->redirect; ?> + sso->turnonList, $redirect);?> + sso->addr; ?> sso->addrNotice}' autocomplete='off'");?> diff --git a/module/common/view/footer.html.php b/module/common/view/footer.html.php index f7852fef5e..5f2e643cd7 100755 --- a/module/common/view/footer.html.php +++ b/module/common/view/footer.html.php @@ -33,7 +33,7 @@ $.get(createLink('tutorial', 'ajaxSaveNovice', 'novice=' + (novice ? 'true' : 'f }); -config->sso->turnon)):?> +config->sso->redirect)):?> config->sso->addr; $ranzhiURL = substr($ranzhiAddr, 0, strrpos($ranzhiAddr, '/sys/')); diff --git a/module/common/view/header.html.php b/module/common/view/header.html.php index 078a73800f..e813913dc3 100755 --- a/module/common/view/header.html.php +++ b/module/common/view/header.html.php @@ -7,7 +7,7 @@ include 'chosen.html.php'; app->loadConfig('sso');?>