diff --git a/VERSION b/VERSION
index db50370908..ee1a8f2374 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-15.5
+15.6
diff --git a/api/v1/entries/productissue.php b/api/v1/entries/productissue.php
index 16b9fe6898..ed999bd2bd 100644
--- a/api/v1/entries/productissue.php
+++ b/api/v1/entries/productissue.php
@@ -124,22 +124,21 @@ class productIssueEntry extends entry
/* Get all users in issues so that we can get user detail later in batch. */
$accountList = array();
- foreach($issue->assignedTo as $user) $accountList[] = $user;
+ foreach($issue->assignedTo as $account) $accountList[] = $account;
$accountList[] = $issue->openedBy;
$accountList = array_unique($accountList);
$profileList = $this->loadModel('user')->getUserDetailsForAPI($accountList);
/* Set the user detail to assignedTo and openedBy. */
- foreach($issue->assignedTo as $key => $user)
+ foreach($issue->assignedTo as $key => $account)
{
- /* $key can be 'closed' in some case, so here should be process it. */
- if($key == 'closed')
+ if($account == 'closed')
{
$issue->assignedTo = array();
break;
}
- $issue->assignedTo[$key] = $profileList[$user];
+ $issue->assignedTo[$key] = $profileList[$account];
}
$issue->openedBy = $profileList[$issue->openedBy];
diff --git a/api/v1/entries/productissues.php b/api/v1/entries/productissues.php
index 2769896bd3..f63e2e04e3 100644
--- a/api/v1/entries/productissues.php
+++ b/api/v1/entries/productissues.php
@@ -92,8 +92,12 @@ class productIssuesEntry extends entry
$taskTypeMap = array_flip($this->app->lang->task->typeList);
$bugTypeMap = array_flip($this->app->lang->bug->typeList);
+ $allValidLabels = array_merge(array_keys(array_merge($storyTypeMap, $taskTypeMap, $bugTypeMap)), array($this->app->lang->story->common, $this->app->lang->task->common, $this->app->lang->bug->common));
foreach($labels as $label)
{
+ /* Return empty result if label is not exists.*/
+ if(!in_array($label, $allValidLabels)) $this->send(200, array('page' => $page, 'total' => 0, 'limit' => $limit, 'issues' => array()));
+
if($label == $this->app->lang->story->common) $storyFilter[] = 'all';
if(isset($storyTypeMap[$label])) $storyFilter[] = $storyTypeMap[$label];
@@ -239,7 +243,6 @@ class productIssuesEntry extends entry
$r->assignedTo = array($task->assignedTo);
}
}
-
}
elseif($issue['type'] == 'story')
{
@@ -300,9 +303,9 @@ class productIssuesEntry extends entry
$userList = array();
foreach($result as $issue)
{
- foreach($issue->assignedTo as $user)
+ foreach($issue->assignedTo as $account)
{
- $userList[] = $user;
+ $userList[] = $account;
}
$userList[] = $issue->openedBy;
}
@@ -315,15 +318,14 @@ class productIssuesEntry extends entry
*/
foreach($result as $issue)
{
- foreach($issue->assignedTo as $key => $user)
+ foreach($issue->assignedTo as $key => $account)
{
- /* $key can be 'closed' in some case, so here should be process it. */
- if($key == 'closed')
+ if($account == 'closed')
{
$issue->assignedTo = array();
break;
}
- $issue->assignedTo[$key] = $userDetails[$user];
+ $issue->assignedTo[$key] = $userDetails[$account];
}
$issue->openedBy = $userDetails[$issue->openedBy];
}
diff --git a/config/config.php b/config/config.php
index 3512acf6b7..f78feccc73 100644
--- a/config/config.php
+++ b/config/config.php
@@ -16,7 +16,7 @@ if(!class_exists('config')){class config{}}
if(!function_exists('getWebRoot')){function getWebRoot(){}}
/* 基本设置。Basic settings. */
-$config->version = '15.5'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it.
+$config->version = '15.6'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it.
$config->charset = 'UTF-8'; // ZenTaoPHP的编码。 The encoding of ZenTaoPHP.
$config->cookieLife = time() + 2592000; // Cookie的生存时间。The cookie life time.
$config->timezone = 'Asia/Shanghai'; // 时区设置。 The time zone setting, for more see http://www.php.net/manual/en/timezones.php.
diff --git a/db/demo.sql b/db/demo.sql
index 08ba533c4a..ac6ed6d84c 100644
--- a/db/demo.sql
+++ b/db/demo.sql
@@ -377,16 +377,16 @@ INSERT INTO `zt_module` (`id`, `root`, `branch`, `name`, `parent`, `path`, `grad
(13, 1, 0, '合作洽谈', 0, ',13,', 1, 60, 'bug', '', '', '', '0'),
(14, 1, 0, '关于我们', 0, ',14,', 1, 70, 'bug', '', '', '', '0'),
(15, 6, 0, '企业管理', 0, ',15,', 1, 0, 'line', '', '', '', '0');
-INSERT INTO `zt_product` (`id`, `program`, `name`, `code`, `bind`, `line`, `type`, `status`, `subStatus`, `desc`, `PO`, `QD`, `RD`, `acl`, `whitelist`, `createdBy`, `createdDate`, `createdVersion`, `order`, `deleted`, `storyConcept`) VALUES
-(1, 6, '公司企业网站建设', 'companyWebsite', '0', 0, 'normal', 'normal', '', '建立公司企业网站,可以更好对外展示。
', 'productManager', 'testManager', 'productManager', 'open', '', 'productManager', '2012-06-05 09:57:07', '', 5, '0', 0),
-(2, 6, '企业内部工时管理系统', 'workhourManage', '0', 0, 'normal', 'normal', '', '', 'productManager', 'testManager', 'productManager', 'open', '', 'productManager', '2012-06-05 11:15:20', '5.2.1', 10, '0', 0);
+INSERT INTO `zt_product` (`id`, `program`, `name`, `code`, `bind`, `line`, `type`, `status`, `subStatus`, `desc`, `PO`, `QD`, `RD`, `acl`, `whitelist`, `createdBy`, `createdDate`, `createdVersion`, `order`, `deleted`) VALUES
+(1, 6, '公司企业网站建设', 'companyWebsite', '0', 0, 'normal', 'normal', '', '建立公司企业网站,可以更好对外展示。
', 'productManager', 'testManager', 'productManager', 'open', '', 'productManager', '2012-06-05 09:57:07', '', 5, '0'),
+(2, 6, '企业内部工时管理系统', 'workhourManage', '0', 0, 'normal', 'normal', '', '', 'productManager', 'testManager', 'productManager', 'open', '', 'productManager', '2012-06-05 11:15:20', '5.2.1', 10, '0');
INSERT INTO `zt_productplan` (`id`, `product`, `branch`, `parent`, `title`, `desc`, `begin`, `end`, `order`, `deleted`) VALUES
(1, 1, 0, 0, '1.0版本', '开发出企业网站1.0版本。
', '2020-06-05', '2021-06-04', '', '0');
-INSERT INTO `zt_project` (`id`, `project`, `model`, `type`, `product`, `lifetime`, `budget`, `budgetUnit`, `attribute`, `percent`, `milestone`, `output`, `auth`, `parent`, `path`, `grade`, `name`, `code`, `begin`, `end`, `realBegan`, `realEnd`, `days`, `status`, `subStatus`, `statge`, `pri`, `desc`, `version`, `parentVersion`, `planDuration`, `realDuration`, `openedBy`, `openedDate`, `openedVersion`, `lastEditedBy`, `lastEditedDate`, `closedBy`, `closedDate`, `canceledBy`, `canceledDate`, `PO`, `PM`, `QD`, `RD`, `team`, `acl`, `whitelist`, `order`, `deleted`, `storyConcept`) VALUES
-(1, 7, '', 'sprint', 'single', 'sprint', '0', 'CNY', '', 0, '0', '', '', 7, ',7,1,', 1, '企业网站第一期', 'coWeb1', '2020-06-05', '2021-12-04', '0000-00-00', '0000-00-00', 391, 'doing', '', '1', '1', '开发企业网站的基本雏形。
', 0, 0, 0, 0, '', '0000-00-00 00:00:00', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 'productManager', 'projectManager', 'testManager', 'productManager', '公司开发团队', 'open', '', 5, '0', 0),
-(2, 7, '', 'sprint', 'single', 'sprint', '0', 'CNY', '', 0, '0', '', '', 7, ',7,2,', 1, '企业网站第二期', 'coWebsite2', '2021-06-05', '2022-06-04', '0000-00-00', '0000-00-00', 260, 'wait', '', '1', '1', '', 0, 0, 0, 0, '', '0000-00-00 00:00:00', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 'productManager', 'projectManager', 'testManager', 'productManager', '公司开发团队', 'open', '', 10, '0', 0),
-(7, 0, 'scrum', 'project', 'single', 'sprint', '0', 'CNY', '', 0, '0', '', 'extend', 6, ',6,7,', 2, '企业管理系统', '', '2021-06-05', '2022-06-04', '0000-00-00', '0000-00-00', 0, 'doing', '', '1', '1', '', 0, 0, 0, 0, 'admin', '2021-04-28 11:22:04', '15.0.rc3', 'admin', '2021-04-28 11:22:04', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', 'projectManager', '', '', '', 'open', ',tester3,admin', 35, '0', 0),
-(6, 0, '', 'program', 'single', 'sprint', '0', 'CNY', '', 0, '0', '', '', 0, ',6,', 1, '企业管理', '', '2021-06-05', '2022-06-04', '0000-00-00', '0000-00-00', 0, 'doing', '', '1', '1', '', 0, 0, 0, 0, 'admin', '2021-04-28 11:22:04', '15.0.rc3', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', '', '', '', '', 'open', '', 30, '0', 0);
+INSERT INTO `zt_project` (`id`, `project`, `model`, `type`, `lifetime`, `budget`, `budgetUnit`, `attribute`, `percent`, `milestone`, `output`, `auth`, `parent`, `path`, `grade`, `name`, `code`, `begin`, `end`, `realBegan`, `realEnd`, `days`, `status`, `subStatus`, `pri`, `desc`, `version`, `parentVersion`, `planDuration`, `realDuration`, `openedBy`, `openedDate`, `openedVersion`, `lastEditedBy`, `lastEditedDate`, `closedBy`, `closedDate`, `canceledBy`, `canceledDate`, `PO`, `PM`, `QD`, `RD`, `team`, `acl`, `whitelist`, `order`, `deleted`) VALUES
+(1, 7, '', 'sprint', 'sprint', '0', 'CNY', '', 0, '0', '', '', 7, ',7,1,', 1, '企业网站第一期', 'coWeb1', '2020-06-05', '2021-12-04', '0000-00-00', '0000-00-00', 391, 'doing', '', '1', '开发企业网站的基本雏形。
', 0, 0, 0, 0, '', '0000-00-00 00:00:00', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 'productManager', 'projectManager', 'testManager', 'productManager', '公司开发团队', 'open', '', 5, '0'),
+(2, 7, '', 'sprint', 'sprint', '0', 'CNY', '', 0, '0', '', '', 7, ',7,2,', 1, '企业网站第二期', 'coWebsite2', '2021-06-05', '2022-06-04', '0000-00-00', '0000-00-00', 260, 'wait', '', '1', '', 0, 0, 0, 0, '', '0000-00-00 00:00:00', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 'productManager', 'projectManager', 'testManager', 'productManager', '公司开发团队', 'open', '', 10, '0'),
+(7, 0, 'scrum', 'project', 'sprint', '0', 'CNY', '', 0, '0', '', 'extend', 6, ',6,7,', 2, '企业管理系统', '', '2021-06-05', '2022-06-04', '0000-00-00', '0000-00-00', 0, 'doing', '', '1', '', 0, 0, 0, 0, 'admin', '2021-04-28 11:22:04', '15.0.rc3', 'admin', '2021-04-28 11:22:04', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', 'projectManager', '', '', '', 'open', ',tester3,admin', 35, '0'),
+(6, 0, '', 'program', 'sprint', '0', 'CNY', '', 0, '0', '', '', 0, ',6,', 1, '企业管理', '', '2021-06-05', '2022-06-04', '0000-00-00', '0000-00-00', 0, 'doing', '', '1', '', 0, 0, 0, 0, 'admin', '2021-04-28 11:22:04', '15.0.rc3', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', '', '', '', '', 'open', '', 30, '0');
INSERT INTO `zt_projectcase` (`project`, `product`, `case`, `count`, `version`, `order`) VALUES
(1, 1, 2, 1, 1, 4),
(7, 1, 1, 1, 1, 5),
diff --git a/db/standard/zentao15.6.sql b/db/standard/zentao15.6.sql
new file mode 100644
index 0000000000..3a4a9c7c28
--- /dev/null
+++ b/db/standard/zentao15.6.sql
@@ -0,0 +1,1264 @@
+CREATE TABLE `zt_acl` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL,
+ `objectType` char(30) NOT NULL,
+ `objectID` mediumint(9) NOT NULL DEFAULT 0,
+ `type` char(40) NOT NULL DEFAULT 'whitelist',
+ `source` char(30) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_action` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `objectType` varchar(30) NOT NULL DEFAULT '',
+ `objectID` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `product` varchar(255) NOT NULL,
+ `project` mediumint(8) unsigned NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `actor` varchar(100) NOT NULL DEFAULT '',
+ `action` varchar(30) NOT NULL DEFAULT '',
+ `date` datetime NOT NULL,
+ `comment` text NOT NULL,
+ `extra` text NOT NULL,
+ `read` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `date` (`date`),
+ KEY `actor` (`actor`),
+ KEY `project` (`project`),
+ KEY `action` (`action`),
+ KEY `objectID` (`objectID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_block` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL,
+ `module` varchar(20) NOT NULL,
+ `type` char(30) NOT NULL,
+ `title` varchar(100) NOT NULL,
+ `source` varchar(20) NOT NULL,
+ `block` varchar(20) NOT NULL,
+ `params` text NOT NULL,
+ `order` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `grid` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `height` smallint(5) unsigned NOT NULL DEFAULT 0,
+ `hidden` tinyint(1) unsigned NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `account_module_type_order` (`account`,`module`,`type`,`order`),
+ KEY `account` (`account`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_branch` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `product` mediumint(8) unsigned NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `order` smallint(5) unsigned NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_bug` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `branch` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `module` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `plan` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `story` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `storyVersion` smallint(6) NOT NULL DEFAULT 1,
+ `task` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `toTask` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `toStory` mediumint(8) NOT NULL DEFAULT 0,
+ `title` varchar(255) NOT NULL,
+ `keywords` varchar(255) NOT NULL,
+ `severity` tinyint(4) NOT NULL DEFAULT 0,
+ `pri` tinyint(3) unsigned NOT NULL,
+ `type` varchar(30) NOT NULL DEFAULT '',
+ `os` varchar(30) NOT NULL DEFAULT '',
+ `browser` varchar(30) NOT NULL DEFAULT '',
+ `hardware` varchar(30) NOT NULL,
+ `found` varchar(30) NOT NULL DEFAULT '',
+ `steps` text NOT NULL,
+ `status` enum('active','resolved','closed') NOT NULL DEFAULT 'active',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `color` char(7) NOT NULL,
+ `confirmed` tinyint(1) NOT NULL DEFAULT 0,
+ `activatedCount` smallint(6) NOT NULL,
+ `activatedDate` datetime NOT NULL,
+ `mailto` text DEFAULT NULL,
+ `openedBy` varchar(30) NOT NULL DEFAULT '',
+ `openedDate` datetime NOT NULL,
+ `openedBuild` varchar(255) NOT NULL,
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `assignedDate` datetime NOT NULL,
+ `deadline` date NOT NULL,
+ `resolvedBy` varchar(30) NOT NULL DEFAULT '',
+ `resolution` varchar(30) NOT NULL DEFAULT '',
+ `resolvedBuild` varchar(30) NOT NULL DEFAULT '',
+ `resolvedDate` datetime NOT NULL,
+ `closedBy` varchar(30) NOT NULL DEFAULT '',
+ `closedDate` datetime NOT NULL,
+ `duplicateBug` mediumint(8) unsigned NOT NULL,
+ `linkBug` varchar(255) NOT NULL,
+ `case` mediumint(8) unsigned NOT NULL,
+ `caseVersion` smallint(6) NOT NULL DEFAULT 1,
+ `result` mediumint(8) unsigned NOT NULL,
+ `repo` mediumint(8) unsigned NOT NULL,
+ `entry` varchar(255) NOT NULL,
+ `lines` varchar(10) NOT NULL,
+ `v1` varchar(40) NOT NULL,
+ `v2` varchar(40) NOT NULL,
+ `repoType` varchar(30) NOT NULL DEFAULT '',
+ `testtask` mediumint(8) unsigned NOT NULL,
+ `lastEditedBy` varchar(30) NOT NULL DEFAULT '',
+ `lastEditedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `execution` (`execution`),
+ KEY `status` (`status`),
+ KEY `plan` (`plan`),
+ KEY `story` (`story`),
+ KEY `case` (`case`),
+ KEY `toStory` (`toStory`),
+ KEY `result` (`result`),
+ KEY `assignedTo` (`assignedTo`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_build` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `branch` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `name` char(150) NOT NULL,
+ `scmPath` char(255) NOT NULL,
+ `filePath` char(255) NOT NULL,
+ `date` date NOT NULL,
+ `stories` text NOT NULL,
+ `bugs` text NOT NULL,
+ `builder` char(30) NOT NULL DEFAULT '',
+ `desc` text NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `execution` (`execution`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_burn` (
+ `execution` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ `task` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `date` date NOT NULL,
+ `estimate` float NOT NULL,
+ `left` float NOT NULL,
+ `consumed` float NOT NULL,
+ `storyPoint` float NOT NULL,
+ PRIMARY KEY (`execution`,`date`,`task`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_case` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `branch` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `lib` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `module` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `path` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `story` mediumint(30) unsigned NOT NULL DEFAULT 0,
+ `storyVersion` smallint(6) NOT NULL DEFAULT 1,
+ `title` varchar(255) NOT NULL,
+ `precondition` text NOT NULL,
+ `keywords` varchar(255) NOT NULL,
+ `pri` tinyint(3) unsigned NOT NULL DEFAULT 3,
+ `type` char(30) NOT NULL DEFAULT '1',
+ `auto` varchar(10) NOT NULL DEFAULT 'no',
+ `frame` varchar(10) NOT NULL,
+ `stage` varchar(255) NOT NULL,
+ `howRun` varchar(30) NOT NULL,
+ `scriptedBy` varchar(30) NOT NULL,
+ `scriptedDate` date NOT NULL,
+ `scriptStatus` varchar(30) NOT NULL,
+ `scriptLocation` varchar(255) NOT NULL,
+ `status` char(30) NOT NULL DEFAULT '1',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `color` char(7) NOT NULL,
+ `frequency` enum('1','2','3') NOT NULL DEFAULT '1',
+ `order` tinyint(30) unsigned NOT NULL DEFAULT 0,
+ `openedBy` char(30) NOT NULL DEFAULT '',
+ `openedDate` datetime NOT NULL,
+ `reviewedBy` varchar(255) NOT NULL,
+ `reviewedDate` date NOT NULL,
+ `lastEditedBy` char(30) NOT NULL DEFAULT '',
+ `lastEditedDate` datetime NOT NULL,
+ `version` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `linkCase` varchar(255) NOT NULL,
+ `fromBug` mediumint(8) unsigned NOT NULL,
+ `fromCaseID` mediumint(8) unsigned NOT NULL,
+ `fromCaseVersion` mediumint(8) unsigned NOT NULL DEFAULT 1,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `lastRunner` varchar(30) NOT NULL,
+ `lastRunDate` datetime NOT NULL,
+ `lastRunResult` char(30) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `story` (`story`),
+ KEY `fromBug` (`fromBug`),
+ KEY `module` (`module`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_casestep` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `case` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `version` smallint(3) unsigned NOT NULL DEFAULT 0,
+ `type` varchar(10) NOT NULL DEFAULT 'step',
+ `desc` text NOT NULL,
+ `expect` text NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `case` (`case`),
+ KEY `version` (`version`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_company` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` char(120) DEFAULT NULL,
+ `phone` char(20) DEFAULT NULL,
+ `fax` char(20) DEFAULT NULL,
+ `address` char(120) DEFAULT NULL,
+ `zipcode` char(10) DEFAULT NULL,
+ `website` char(120) DEFAULT NULL,
+ `backyard` char(120) DEFAULT NULL,
+ `guest` enum('1','0') NOT NULL DEFAULT '0',
+ `admins` char(255) DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_compile` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(50) NOT NULL,
+ `job` mediumint(8) unsigned NOT NULL,
+ `queue` mediumint(8) NOT NULL,
+ `status` varchar(255) NOT NULL,
+ `logs` text DEFAULT NULL,
+ `atTime` varchar(10) NOT NULL,
+ `testtask` mediumint(8) unsigned NOT NULL,
+ `tag` varchar(255) NOT NULL,
+ `times` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `updateDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_config` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `owner` char(30) NOT NULL DEFAULT '',
+ `module` varchar(30) NOT NULL,
+ `section` char(30) NOT NULL DEFAULT '',
+ `key` char(30) NOT NULL DEFAULT '',
+ `value` longtext NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique` (`owner`,`module`,`section`,`key`)
+) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_cron` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `m` varchar(20) NOT NULL,
+ `h` varchar(20) NOT NULL,
+ `dom` varchar(20) NOT NULL,
+ `mon` varchar(20) NOT NULL,
+ `dow` varchar(20) NOT NULL,
+ `command` text NOT NULL,
+ `remark` varchar(255) NOT NULL,
+ `type` varchar(20) NOT NULL,
+ `buildin` tinyint(1) NOT NULL DEFAULT 0,
+ `status` varchar(20) NOT NULL,
+ `lastTime` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `lastTime` (`lastTime`)
+) ENGINE=MyISAM AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_dept` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` char(60) NOT NULL,
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `path` char(255) NOT NULL DEFAULT '',
+ `grade` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `order` smallint(4) unsigned NOT NULL DEFAULT 0,
+ `position` char(30) NOT NULL DEFAULT '',
+ `function` char(255) NOT NULL DEFAULT '',
+ `manager` char(30) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`),
+ KEY `parent` (`parent`),
+ KEY `path` (`path`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_doc` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `lib` varchar(30) NOT NULL,
+ `module` varchar(30) NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `keywords` varchar(255) NOT NULL,
+ `type` varchar(30) NOT NULL,
+ `views` smallint(5) unsigned NOT NULL,
+ `draft` longtext NOT NULL,
+ `collector` text NOT NULL,
+ `addedBy` varchar(30) NOT NULL,
+ `addedDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `mailto` text DEFAULT NULL,
+ `acl` varchar(10) NOT NULL DEFAULT 'open',
+ `groups` varchar(255) NOT NULL,
+ `users` text NOT NULL,
+ `version` smallint(5) unsigned NOT NULL DEFAULT 1,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `execution` (`execution`),
+ KEY `lib` (`lib`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_doccontent` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `doc` mediumint(8) unsigned NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `digest` varchar(255) NOT NULL,
+ `content` longtext NOT NULL,
+ `files` text NOT NULL,
+ `type` varchar(10) NOT NULL,
+ `version` smallint(5) unsigned NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `doc_version` (`doc`,`version`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_doclib` (
+ `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
+ `type` varchar(30) NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ `project` mediumint(8) unsigned NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `name` varchar(60) NOT NULL,
+ `acl` varchar(10) NOT NULL DEFAULT 'open',
+ `groups` varchar(255) NOT NULL,
+ `users` text NOT NULL,
+ `main` enum('0','1') NOT NULL DEFAULT '0',
+ `collector` text NOT NULL,
+ `order` tinyint(5) unsigned NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `execution` (`execution`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_effort` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `user` char(30) NOT NULL DEFAULT '',
+ `todo` enum('1','0') NOT NULL DEFAULT '1',
+ `date` date NOT NULL,
+ `begin` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `end` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `type` enum('1','2','3') NOT NULL DEFAULT '1',
+ `idvalue` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `name` char(30) NOT NULL DEFAULT '',
+ `desc` char(255) NOT NULL DEFAULT '',
+ `status` enum('1','2','3') NOT NULL DEFAULT '1',
+ PRIMARY KEY (`id`),
+ KEY `user` (`user`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_entry` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(50) NOT NULL,
+ `account` varchar(30) NOT NULL DEFAULT '',
+ `code` varchar(20) NOT NULL,
+ `key` varchar(32) NOT NULL,
+ `freePasswd` enum('0','1') NOT NULL DEFAULT '0',
+ `ip` varchar(100) NOT NULL,
+ `desc` text NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `calledTime` int(10) unsigned NOT NULL DEFAULT 0,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_expect` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `userID` mediumint(8) NOT NULL,
+ `project` mediumint(8) NOT NULL DEFAULT 0,
+ `expect` text NOT NULL,
+ `progress` text NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_extension` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(150) NOT NULL,
+ `code` varchar(30) NOT NULL,
+ `version` varchar(50) NOT NULL,
+ `author` varchar(100) NOT NULL,
+ `desc` text NOT NULL,
+ `license` text NOT NULL,
+ `type` varchar(20) NOT NULL DEFAULT 'extension',
+ `site` varchar(150) NOT NULL,
+ `zentaoCompatible` varchar(100) NOT NULL,
+ `installedTime` datetime NOT NULL,
+ `depends` varchar(100) NOT NULL,
+ `dirs` mediumtext NOT NULL,
+ `files` mediumtext NOT NULL,
+ `status` varchar(20) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `code` (`code`),
+ KEY `name` (`name`),
+ KEY `installedTime` (`installedTime`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_file` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `pathname` char(50) NOT NULL,
+ `title` char(255) NOT NULL,
+ `extension` char(30) NOT NULL,
+ `size` int(10) unsigned NOT NULL DEFAULT 0,
+ `objectType` char(30) NOT NULL,
+ `objectID` mediumint(9) NOT NULL,
+ `addedBy` char(30) NOT NULL DEFAULT '',
+ `addedDate` datetime NOT NULL,
+ `downloads` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `extra` varchar(255) NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `objectType` (`objectType`),
+ KEY `objectID` (`objectID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_group` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `name` char(30) NOT NULL,
+ `role` char(30) NOT NULL DEFAULT '',
+ `desc` char(255) NOT NULL DEFAULT '',
+ `acl` text DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_grouppriv` (
+ `group` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `module` char(30) NOT NULL DEFAULT '',
+ `method` char(30) NOT NULL DEFAULT '',
+ UNIQUE KEY `group` (`group`,`module`,`method`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_history` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `action` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `field` varchar(30) NOT NULL DEFAULT '',
+ `old` text NOT NULL,
+ `new` text NOT NULL,
+ `diff` mediumtext NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `action` (`action`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_job` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(50) NOT NULL,
+ `repo` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ `frame` varchar(20) NOT NULL,
+ `engine` varchar(20) NOT NULL,
+ `server` mediumint(8) unsigned NOT NULL,
+ `pipeline` varchar(500) NOT NULL,
+ `triggerType` varchar(255) NOT NULL,
+ `svnDir` varchar(255) NOT NULL,
+ `atDay` varchar(255) DEFAULT NULL,
+ `atTime` varchar(10) DEFAULT NULL,
+ `customParam` text NOT NULL,
+ `comment` varchar(255) DEFAULT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `lastExec` datetime DEFAULT NULL,
+ `lastStatus` varchar(255) DEFAULT NULL,
+ `lastTag` varchar(255) DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_lang` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `lang` varchar(30) NOT NULL,
+ `module` varchar(30) NOT NULL,
+ `section` varchar(30) NOT NULL,
+ `key` varchar(60) NOT NULL,
+ `value` text NOT NULL,
+ `system` enum('0','1') NOT NULL DEFAULT '1',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `lang` (`lang`,`module`,`section`,`key`)
+) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_log` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `objectType` varchar(30) NOT NULL,
+ `objectID` mediumint(8) unsigned NOT NULL,
+ `action` mediumint(8) unsigned NOT NULL,
+ `date` datetime NOT NULL,
+ `url` varchar(255) NOT NULL,
+ `contentType` varchar(30) NOT NULL,
+ `data` text NOT NULL,
+ `result` text NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `objectType` (`objectType`),
+ KEY `obejctID` (`objectID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_module` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `root` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `branch` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `name` char(60) NOT NULL DEFAULT '',
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `path` char(255) NOT NULL DEFAULT '',
+ `grade` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `order` smallint(5) unsigned NOT NULL DEFAULT 0,
+ `type` char(30) NOT NULL,
+ `owner` varchar(30) NOT NULL,
+ `collector` text NOT NULL,
+ `short` varchar(30) NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `root` (`root`),
+ KEY `type` (`type`),
+ KEY `path` (`path`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_mr` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `gitlabID` mediumint(8) unsigned NOT NULL,
+ `sourceProject` int unsigned NOT NULL,
+ `sourceBranch` varchar(100) NOT NULL,
+ `targetProject` int unsigned NOT NULL,
+ `targetBranch` varchar(100) NOT NULL,
+ `mriid` int unsigned NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `description` text NOT NULL,
+ `assignee` varchar(255) NOT NULL,
+ `reviewer` varchar(255) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `status` char(30) NOT NULL,
+ `mergeStatus` char(30) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_notify` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `objectType` varchar(50) NOT NULL,
+ `objectID` mediumint(8) unsigned NOT NULL,
+ `action` mediumint(9) NOT NULL,
+ `toList` varchar(255) NOT NULL,
+ `ccList` text NOT NULL,
+ `subject` varchar(255) NOT NULL,
+ `data` text NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `sendTime` datetime NOT NULL,
+ `status` varchar(10) NOT NULL DEFAULT 'wait',
+ `failReason` text NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `objectType_toList_status` (`objectType`,`toList`,`status`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_oauth` (
+ `account` varchar(30) NOT NULL,
+ `openID` varchar(255) NOT NULL,
+ `providerType` varchar(30) NOT NULL,
+ `providerID` mediumint(8) unsigned NOT NULL,
+ KEY `account` (`account`),
+ KEY `providerType` (`providerType`),
+ KEY `providerID` (`providerID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_pipeline` (
+ `id` smallint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `type` char(30) NOT NULL,
+ `name` varchar(50) NOT NULL,
+ `url` varchar(255) DEFAULT NULL,
+ `account` varchar(30) DEFAULT NULL,
+ `password` varchar(255) NOT NULL,
+ `token` varchar(255) DEFAULT NULL,
+ `private` char(32) DEFAULT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_planstory` (
+ `plan` mediumint(8) unsigned NOT NULL,
+ `story` mediumint(8) unsigned NOT NULL,
+ `order` mediumint(9) NOT NULL,
+ UNIQUE KEY `plan_story` (`plan`,`story`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_product` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `program` mediumint(8) unsigned NOT NULL,
+ `name` varchar(90) NOT NULL,
+ `code` varchar(45) NOT NULL,
+ `bind` enum('0','1') NOT NULL DEFAULT '0',
+ `line` mediumint(8) NOT NULL,
+ `type` varchar(30) NOT NULL DEFAULT 'normal',
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `desc` text NOT NULL,
+ `PO` varchar(30) NOT NULL,
+ `QD` varchar(30) NOT NULL,
+ `RD` varchar(30) NOT NULL,
+ `acl` enum('open','private','custom') NOT NULL DEFAULT 'open',
+ `whitelist` text NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `createdVersion` varchar(20) NOT NULL,
+ `order` mediumint(8) unsigned NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `acl` (`acl`),
+ KEY `order` (`order`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_productplan` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `product` mediumint(8) unsigned NOT NULL,
+ `branch` mediumint(8) unsigned NOT NULL,
+ `parent` mediumint(9) NOT NULL DEFAULT 0,
+ `title` varchar(90) NOT NULL,
+ `desc` text NOT NULL,
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ `order` text NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `end` (`end`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_project` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) NOT NULL DEFAULT 0,
+ `model` char(30) NOT NULL,
+ `type` char(30) NOT NULL DEFAULT 'sprint',
+ `lifetime` char(30) NOT NULL DEFAULT '',
+ `budget` varchar(30) NOT NULL DEFAULT '0',
+ `budgetUnit` char(30) NOT NULL DEFAULT 'CNY',
+ `attribute` varchar(30) NOT NULL DEFAULT '',
+ `percent` float unsigned NOT NULL DEFAULT 0,
+ `milestone` enum('0','1') NOT NULL DEFAULT '0',
+ `output` text NOT NULL,
+ `auth` char(30) NOT NULL,
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `path` varchar(255) NOT NULL,
+ `grade` tinyint(3) unsigned NOT NULL,
+ `name` varchar(90) NOT NULL,
+ `code` varchar(45) NOT NULL,
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ `realBegan` date NOT NULL,
+ `realEnd` date NOT NULL,
+ `days` smallint(5) unsigned NOT NULL,
+ `status` varchar(10) NOT NULL,
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `pri` enum('1','2','3','4') NOT NULL DEFAULT '1',
+ `desc` text NOT NULL,
+ `version` smallint(6) NOT NULL,
+ `parentVersion` smallint(6) NOT NULL,
+ `planDuration` int(11) NOT NULL,
+ `realDuration` int(11) NOT NULL,
+ `openedBy` varchar(30) NOT NULL DEFAULT '',
+ `openedDate` datetime NOT NULL,
+ `openedVersion` varchar(20) NOT NULL,
+ `lastEditedBy` varchar(30) NOT NULL DEFAULT '',
+ `lastEditedDate` datetime NOT NULL,
+ `closedBy` varchar(30) NOT NULL DEFAULT '',
+ `closedDate` datetime NOT NULL,
+ `canceledBy` varchar(30) NOT NULL DEFAULT '',
+ `canceledDate` datetime NOT NULL,
+ `PO` varchar(30) NOT NULL DEFAULT '',
+ `PM` varchar(30) NOT NULL DEFAULT '',
+ `QD` varchar(30) NOT NULL DEFAULT '',
+ `RD` varchar(30) NOT NULL DEFAULT '',
+ `team` varchar(90) NOT NULL,
+ `acl` char(30) NOT NULL DEFAULT 'open',
+ `whitelist` text NOT NULL,
+ `order` mediumint(8) unsigned NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `parent` (`parent`),
+ KEY `begin` (`begin`),
+ KEY `end` (`end`),
+ KEY `status` (`status`),
+ KEY `acl` (`acl`),
+ KEY `order` (`order`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_projectcase` (
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `case` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `count` mediumint(8) unsigned NOT NULL DEFAULT 1,
+ `version` smallint(6) NOT NULL DEFAULT 1,
+ `order` smallint(6) unsigned NOT NULL,
+ UNIQUE KEY `project` (`project`,`case`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_projectproduct` (
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ `branch` mediumint(8) unsigned NOT NULL,
+ `plan` mediumint(8) unsigned NOT NULL,
+ PRIMARY KEY (`project`,`product`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_projectspec` (
+ `project` mediumint(8) NOT NULL,
+ `version` smallint(6) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `milestone` enum('0','1') NOT NULL DEFAULT '0',
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ UNIQUE KEY `project` (`project`,`version`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_projectstory` (
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `product` mediumint(8) unsigned NOT NULL,
+ `story` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `version` smallint(6) NOT NULL DEFAULT 1,
+ `order` smallint(6) unsigned NOT NULL,
+ UNIQUE KEY `project` (`project`,`story`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_relation` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) NOT NULL,
+ `product` mediumint(8) NOT NULL,
+ `execution` mediumint(8) NOT NULL,
+ `AType` char(30) NOT NULL,
+ `AID` mediumint(8) NOT NULL,
+ `AVersion` char(30) NOT NULL,
+ `relation` char(30) NOT NULL,
+ `BType` char(30) NOT NULL,
+ `BID` mediumint(8) NOT NULL,
+ `BVersion` char(30) NOT NULL,
+ `extra` char(30) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `relation` (`product`,`relation`,`AType`,`BType`,`AID`,`BID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_release` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `branch` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `build` mediumint(8) unsigned NOT NULL,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `marker` enum('0','1') NOT NULL DEFAULT '0',
+ `date` date NOT NULL,
+ `stories` text NOT NULL,
+ `bugs` text NOT NULL,
+ `leftBugs` text NOT NULL,
+ `desc` text NOT NULL,
+ `mailto` text,
+ `notify` varchar(255),
+ `status` varchar(20) NOT NULL DEFAULT 'normal',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `build` (`build`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_repo` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `product` varchar(255) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `path` varchar(255) NOT NULL,
+ `prefix` varchar(100) NOT NULL,
+ `encoding` varchar(20) NOT NULL,
+ `SCM` varchar(10) NOT NULL,
+ `client` varchar(100) NOT NULL,
+ `commits` mediumint(8) unsigned NOT NULL,
+ `account` varchar(30) NOT NULL,
+ `password` varchar(30) NOT NULL,
+ `encrypt` varchar(30) NOT NULL DEFAULT 'plain',
+ `acl` text NOT NULL,
+ `synced` tinyint(1) NOT NULL DEFAULT 0,
+ `lastSync` datetime NOT NULL,
+ `desc` text NOT NULL,
+ `extra` char(30) NOT NULL,
+ `deleted` tinyint(1) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_repobranch` (
+ `repo` mediumint(8) unsigned NOT NULL,
+ `revision` mediumint(8) unsigned NOT NULL,
+ `branch` varchar(255) NOT NULL,
+ UNIQUE KEY `repo_revision_branch` (`repo`,`revision`,`branch`),
+ KEY `branch` (`branch`),
+ KEY `revision` (`revision`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_repofiles` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `repo` mediumint(8) unsigned NOT NULL,
+ `revision` mediumint(8) unsigned NOT NULL,
+ `path` varchar(255) NOT NULL,
+ `parent` varchar(255) NOT NULL,
+ `type` varchar(20) NOT NULL,
+ `action` char(1) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `path` (`path`),
+ KEY `parent` (`parent`),
+ KEY `repo` (`repo`),
+ KEY `revision` (`revision`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_repohistory` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `repo` mediumint(9) NOT NULL,
+ `revision` varchar(40) NOT NULL,
+ `commit` mediumint(8) unsigned NOT NULL,
+ `comment` text NOT NULL,
+ `committer` varchar(100) NOT NULL,
+ `time` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `repo` (`repo`),
+ KEY `revision` (`revision`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_score` (
+ `id` bigint(12) unsigned NOT NULL AUTO_INCREMENT,
+ `account` varchar(30) NOT NULL,
+ `module` varchar(30) NOT NULL DEFAULT '',
+ `method` varchar(30) NOT NULL,
+ `desc` varchar(250) NOT NULL DEFAULT '',
+ `before` int(11) NOT NULL DEFAULT 0,
+ `score` int(11) NOT NULL DEFAULT 0,
+ `after` int(11) NOT NULL DEFAULT 0,
+ `time` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `account` (`account`),
+ KEY `model` (`module`),
+ KEY `method` (`method`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_searchdict` (
+ `key` smallint(5) unsigned NOT NULL,
+ `value` char(3) NOT NULL,
+ PRIMARY KEY (`key`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_searchindex` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `objectType` char(20) NOT NULL,
+ `objectID` mediumint(9) NOT NULL,
+ `title` text NOT NULL,
+ `content` text NOT NULL,
+ `addedDate` datetime NOT NULL,
+ `editedDate` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `object` (`objectType`,`objectID`),
+ KEY `addedDate` (`addedDate`),
+ FULLTEXT KEY `content` (`content`),
+ FULLTEXT KEY `title` (`title`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_stakeholder` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `objectID` mediumint(8) NOT NULL,
+ `objectType` char(30) NOT NULL,
+ `user` char(30) NOT NULL,
+ `type` char(30) NOT NULL,
+ `key` enum('0','1') NOT NULL,
+ `from` char(30) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `editedBy` char(30) NOT NULL,
+ `editedDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_story` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `parent` mediumint(9) NOT NULL DEFAULT 0,
+ `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 DEFAULT NULL,
+ `source` varchar(20) NOT NULL,
+ `sourceNote` varchar(255) NOT NULL,
+ `fromBug` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `title` varchar(255) NOT NULL,
+ `keywords` varchar(255) NOT NULL,
+ `type` varchar(30) NOT NULL DEFAULT 'story',
+ `category` varchar(30) NOT NULL DEFAULT 'feature',
+ `pri` tinyint(3) unsigned NOT NULL DEFAULT 3,
+ `estimate` float unsigned NOT NULL,
+ `status` enum('','changed','active','draft','closed') NOT NULL DEFAULT '',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `color` char(7) NOT NULL,
+ `stage` enum('','wait','planned','projected','developing','developed','testing','tested','verified','released','closed') NOT NULL DEFAULT 'wait',
+ `stagedBy` char(30) NOT NULL,
+ `mailto` text DEFAULT NULL,
+ `openedBy` varchar(30) NOT NULL DEFAULT '',
+ `openedDate` datetime NOT NULL,
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `assignedDate` datetime NOT NULL,
+ `lastEditedBy` varchar(30) NOT NULL DEFAULT '',
+ `lastEditedDate` datetime NOT NULL,
+ `reviewedBy` varchar(255) NOT NULL,
+ `reviewedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `closedBy` varchar(30) NOT NULL DEFAULT '',
+ `closedDate` datetime NOT NULL,
+ `closedReason` varchar(30) NOT NULL,
+ `toBug` mediumint(8) unsigned NOT NULL,
+ `childStories` varchar(255) NOT NULL,
+ `linkStories` varchar(255) NOT NULL,
+ `duplicateStory` mediumint(8) unsigned NOT NULL,
+ `version` smallint(6) NOT NULL DEFAULT 1,
+ `URChanged` enum('0','1') NOT NULL DEFAULT '0',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `status` (`status`),
+ KEY `assignedTo` (`assignedTo`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_storyestimate` (
+ `story` mediumint(9) NOT NULL,
+ `round` smallint(6) NOT NULL,
+ `estimate` text NOT NULL,
+ `average` float NOT NULL,
+ `openedBy` varchar(30) NOT NULL,
+ `openedDate` datetime NOT NULL,
+ UNIQUE KEY `story` (`story`,`round`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_storyreview` (
+ `story` mediumint(9) NOT NULL,
+ `version` smallint(6) NOT NULL,
+ `reviewer` varchar(30) NOT NULL,
+ `result` varchar(30) NOT NULL,
+ `reviewDate` datetime NOT NULL,
+ UNIQUE KEY `story` (`story`,`version`,`reviewer`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_storyspec` (
+ `story` mediumint(9) NOT NULL,
+ `version` smallint(6) NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `spec` text NOT NULL,
+ `verify` text NOT NULL,
+ UNIQUE KEY `story` (`story`,`version`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_storystage` (
+ `story` mediumint(8) unsigned NOT NULL,
+ `branch` mediumint(8) unsigned NOT NULL,
+ `stage` varchar(50) NOT NULL,
+ `stagedBy` char(30) NOT NULL,
+ UNIQUE KEY `story_branch` (`story`,`branch`),
+ KEY `story` (`story`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_suitecase` (
+ `suite` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ `case` mediumint(8) unsigned NOT NULL,
+ `version` smallint(5) unsigned NOT NULL,
+ UNIQUE KEY `suitecase` (`suite`,`case`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_task` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `parent` mediumint(8) NOT NULL DEFAULT 0,
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `module` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `design` mediumint(8) unsigned NOT NULL,
+ `story` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `storyVersion` smallint(6) NOT NULL DEFAULT 1,
+ `designVersion` smallint(6) unsigned NOT NULL,
+ `fromBug` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `name` varchar(255) NOT NULL,
+ `type` varchar(20) NOT NULL,
+ `pri` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `estimate` float unsigned NOT NULL,
+ `consumed` float unsigned NOT NULL,
+ `left` float unsigned NOT NULL,
+ `deadline` date NOT NULL,
+ `status` enum('wait','doing','done','pause','cancel','closed') NOT NULL DEFAULT 'wait',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `color` char(7) NOT NULL,
+ `mailto` text DEFAULT NULL,
+ `desc` text NOT NULL,
+ `version` smallint(6) NOT NULL,
+ `openedBy` varchar(30) NOT NULL,
+ `openedDate` datetime NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `estStarted` date NOT NULL,
+ `realStarted` datetime NOT NULL,
+ `finishedBy` varchar(30) NOT NULL,
+ `finishedDate` datetime NOT NULL,
+ `finishedList` text NOT NULL,
+ `canceledBy` varchar(30) NOT NULL,
+ `canceledDate` datetime NOT NULL,
+ `closedBy` varchar(30) NOT NULL,
+ `closedDate` datetime NOT NULL,
+ `planDuration` int(11) NOT NULL,
+ `realDuration` int(11) NOT NULL,
+ `closedReason` varchar(30) NOT NULL,
+ `lastEditedBy` varchar(30) NOT NULL,
+ `lastEditedDate` datetime NOT NULL,
+ `activatedDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `execution` (`execution`),
+ KEY `story` (`story`),
+ KEY `parent` (`parent`),
+ KEY `assignedTo` (`assignedTo`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_taskestimate` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `task` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `date` date NOT NULL,
+ `left` float unsigned NOT NULL DEFAULT 0,
+ `consumed` float unsigned NOT NULL,
+ `account` char(30) NOT NULL DEFAULT '',
+ `work` text DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `task` (`task`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_taskspec` (
+ `task` mediumint(8) NOT NULL,
+ `version` smallint(6) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `estStarted` date NOT NULL,
+ `deadline` date NOT NULL,
+ UNIQUE KEY `task` (`task`,`version`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_team` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `root` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `type` enum('project','task','execution') NOT NULL DEFAULT 'project',
+ `account` char(30) NOT NULL DEFAULT '',
+ `role` char(30) NOT NULL DEFAULT '',
+ `limited` char(8) NOT NULL DEFAULT 'no',
+ `join` date NOT NULL DEFAULT '0000-00-00',
+ `days` smallint(5) unsigned NOT NULL,
+ `hours` float(3,1) unsigned NOT NULL DEFAULT 0.0,
+ `estimate` decimal(12,2) unsigned NOT NULL DEFAULT 0.00,
+ `consumed` decimal(12,2) unsigned NOT NULL DEFAULT 0.00,
+ `left` decimal(12,2) unsigned NOT NULL DEFAULT 0.00,
+ `order` tinyint(3) NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `team` (`root`,`type`,`account`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_testreport` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `tasks` varchar(255) NOT NULL,
+ `builds` varchar(255) NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ `owner` char(30) NOT NULL,
+ `members` text NOT NULL,
+ `stories` text NOT NULL,
+ `bugs` text NOT NULL,
+ `cases` text NOT NULL,
+ `report` text NOT NULL,
+ `objectType` varchar(20) NOT NULL,
+ `objectID` mediumint(8) unsigned NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_testresult` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `run` mediumint(8) unsigned NOT NULL,
+ `case` mediumint(8) unsigned NOT NULL,
+ `version` smallint(5) unsigned NOT NULL,
+ `job` mediumint(8) unsigned NOT NULL,
+ `compile` mediumint(8) unsigned NOT NULL,
+ `caseResult` char(30) NOT NULL,
+ `stepResults` text NOT NULL,
+ `lastRunner` varchar(30) NOT NULL,
+ `date` datetime NOT NULL,
+ `duration` float NOT NULL,
+ `xml` text NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `case` (`case`),
+ KEY `version` (`version`),
+ KEY `run` (`run`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_testrun` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `task` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `case` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `version` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `assignedTo` char(30) NOT NULL DEFAULT '',
+ `lastRunner` varchar(30) NOT NULL,
+ `lastRunDate` datetime NOT NULL,
+ `lastRunResult` char(30) NOT NULL,
+ `status` char(30) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `task` (`task`,`case`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_testsuite` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `desc` text NOT NULL,
+ `type` varchar(20) NOT NULL,
+ `addedBy` char(30) NOT NULL,
+ `addedDate` datetime NOT NULL,
+ `lastEditedBy` char(30) NOT NULL,
+ `lastEditedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_testtask` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL,
+ `product` mediumint(8) unsigned NOT NULL,
+ `name` char(90) NOT NULL,
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `build` char(30) NOT NULL,
+ `type` varchar(255) NOT NULL DEFAULT '',
+ `owner` varchar(30) NOT NULL,
+ `pri` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ `realFinishedDate` datetime NOT NULL,
+ `mailto` text DEFAULT NULL,
+ `desc` text NOT NULL,
+ `report` text NOT NULL,
+ `status` enum('blocked','doing','wait','done') NOT NULL DEFAULT 'wait',
+ `testreport` mediumint(8) unsigned NOT NULL,
+ `auto` varchar(10) NOT NULL DEFAULT 'no',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `build` (`build`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_todo` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL,
+ `date` date NOT NULL,
+ `begin` smallint(4) unsigned zerofill NOT NULL,
+ `end` smallint(4) unsigned zerofill NOT NULL,
+ `type` char(10) NOT NULL,
+ `cycle` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `idvalue` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `pri` tinyint(3) unsigned NOT NULL,
+ `name` char(150) NOT NULL,
+ `desc` text NOT NULL,
+ `status` enum('wait','doing','done','closed') NOT NULL DEFAULT 'wait',
+ `private` tinyint(1) NOT NULL,
+ `config` varchar(255) NOT NULL,
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `assignedBy` varchar(30) NOT NULL DEFAULT '',
+ `assignedDate` datetime NOT NULL,
+ `finishedBy` varchar(30) NOT NULL DEFAULT '',
+ `finishedDate` datetime NOT NULL,
+ `closedBy` varchar(30) NOT NULL DEFAULT '',
+ `closedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `account` (`account`),
+ KEY `assignedTo` (`assignedTo`),
+ KEY `finishedBy` (`finishedBy`),
+ KEY `date` (`date`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_user` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `company` mediumint(8) unsigned NOT NULL,
+ `type` char(30) NOT NULL DEFAULT 'inside',
+ `dept` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `account` char(30) NOT NULL DEFAULT '',
+ `password` char(32) NOT NULL DEFAULT '',
+ `role` char(10) NOT NULL DEFAULT '',
+ `realname` varchar(100) NOT NULL DEFAULT '',
+ `nickname` char(60) NOT NULL DEFAULT '',
+ `commiter` varchar(100) NOT NULL,
+ `avatar` text NOT NULL,
+ `birthday` date NOT NULL DEFAULT '0000-00-00',
+ `gender` enum('f','m') NOT NULL DEFAULT 'f',
+ `email` char(90) NOT NULL DEFAULT '',
+ `skype` char(90) NOT NULL DEFAULT '',
+ `qq` char(20) NOT NULL DEFAULT '',
+ `mobile` char(11) NOT NULL DEFAULT '',
+ `phone` char(20) NOT NULL DEFAULT '',
+ `weixin` varchar(90) NOT NULL DEFAULT '',
+ `dingding` varchar(90) NOT NULL DEFAULT '',
+ `slack` varchar(90) NOT NULL DEFAULT '',
+ `whatsapp` varchar(90) NOT NULL DEFAULT '',
+ `address` char(120) NOT NULL DEFAULT '',
+ `zipcode` char(10) NOT NULL DEFAULT '',
+ `nature` text NOT NULL,
+ `analysis` text NOT NULL,
+ `strategy` text NOT NULL,
+ `join` date NOT NULL DEFAULT '0000-00-00',
+ `visits` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `ip` char(15) NOT NULL DEFAULT '',
+ `last` int(10) unsigned NOT NULL DEFAULT 0,
+ `fails` tinyint(5) NOT NULL DEFAULT 0,
+ `locked` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `ranzhi` char(30) NOT NULL DEFAULT '',
+ `score` int(11) NOT NULL DEFAULT 0,
+ `scoreLevel` int(11) NOT NULL DEFAULT 0,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `account` (`account`),
+ KEY `dept` (`dept`),
+ KEY `email` (`email`),
+ KEY `commiter` (`commiter`),
+ KEY `deleted` (`deleted`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_usercontact` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL,
+ `listName` varchar(60) NOT NULL,
+ `userList` text NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `account` (`account`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_usergroup` (
+ `account` char(30) NOT NULL DEFAULT '',
+ `group` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `project` text NOT NULL,
+ UNIQUE KEY `account` (`account`,`group`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_userquery` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL,
+ `module` varchar(30) NOT NULL,
+ `title` varchar(90) NOT NULL,
+ `form` text NOT NULL,
+ `sql` text NOT NULL,
+ `shortcut` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `account` (`account`),
+ KEY `module` (`module`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_usertpl` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL,
+ `type` char(30) NOT NULL,
+ `title` varchar(150) NOT NULL,
+ `content` text NOT NULL,
+ `public` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `account` (`account`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_userview` (
+ `account` char(30) NOT NULL,
+ `programs` mediumtext NOT NULL,
+ `products` mediumtext NOT NULL,
+ `projects` mediumtext NOT NULL,
+ `sprints` mediumtext NOT NULL,
+ UNIQUE KEY `account` (`account`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_webhook` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `type` varchar(15) NOT NULL DEFAULT 'default',
+ `name` varchar(50) NOT NULL,
+ `url` varchar(255) NOT NULL,
+ `domain` varchar(255) NOT NULL,
+ `secret` varchar(255) NOT NULL,
+ `contentType` varchar(30) NOT NULL DEFAULT 'application/json',
+ `sendType` enum('sync','async') NOT NULL DEFAULT 'sync',
+ `products` text NOT NULL,
+ `executions` text NOT NULL,
+ `params` varchar(100) NOT NULL,
+ `actions` text NOT NULL,
+ `desc` text NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
diff --git a/db/update15.4.sql b/db/update15.4.sql
index d9043824ac..2950c63688 100644
--- a/db/update15.4.sql
+++ b/db/update15.4.sql
@@ -1,6 +1,8 @@
UPDATE `zt_action` SET `action` = 'reviewpassed' WHERE `action` = 'passreviewed';
UPDATE `zt_action` SET `action` = 'reviewrejected' WHERE `action` = 'reviewclosed';
UPDATE `zt_action` SET `action` = 'reviewclarified' WHERE `action` = 'clarifyreviewed';
+DELETE FROM `zt_config` WHERE `key` = 'skipYoungBlueTheme' and `section` = 'global';
+UPDATE `zt_config` SET `key` = 'skipYoungBlueTheme' WHERE `key` = 'skipThemeGuide' and `section` = 'global';
DELETE FROM `zt_score` WHERE `module` = 'tutorial' AND `method` = 'finish';
CREATE TABLE `zt_mr` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
diff --git a/db/update15.5.sql b/db/update15.5.sql
new file mode 100644
index 0000000000..9874656feb
--- /dev/null
+++ b/db/update15.5.sql
@@ -0,0 +1,3 @@
+ALTER TABLE `zt_project` drop COLUMN `product`, drop COLUMN `statge`, drop COLUMN `storyConcept`;
+ALTER TABLE `zt_product` drop COLUMN `storyConcept`;
+UPDATE zt_todo SET assignedTo=account,assignedBy=account,assignedDate=`date` WHERE assignedTo='';
diff --git a/db/zentao.sql b/db/zentao.sql
index f75613d858..1ea88b7a3e 100644
--- a/db/zentao.sql
+++ b/db/zentao.sql
@@ -634,7 +634,6 @@ CREATE TABLE IF NOT EXISTS `zt_product` (
`PO` varchar(30) NOT NULL,
`QD` varchar(30) NOT NULL,
`RD` varchar(30) NOT NULL,
- `storyConcept` smallint(5) NOT NULL,
`acl` enum('open','private','custom') NOT NULL default 'open',
`whitelist` text NOT NULL,
`createdBy` varchar(30) NOT NULL,
@@ -668,7 +667,6 @@ CREATE TABLE IF NOT EXISTS `zt_project` (
`project` mediumint(8) NOT NULL DEFAULT 0,
`model` char(30) NOT NULL,
`type` char(30) NOT NULL DEFAULT 'sprint',
- `product` char(30) NOT NULL DEFAULT 'single',
`lifetime` char(30) NOT NULL DEFAULT '',
`budget` varchar(30) NOT NULL DEFAULT '0',
`budgetUnit` char(30) NOT NULL DEFAULT 'CNY',
@@ -687,10 +685,8 @@ CREATE TABLE IF NOT EXISTS `zt_project` (
`realBegan` date NOT NULL,
`realEnd` date NOT NULL,
`days` smallint(5) unsigned NOT NULL,
- `storyConcept` smallint(5) unsigned NOT NULL,
`status` varchar(10) NOT NULL,
`subStatus` varchar(30) NOT NULL DEFAULT '',
- `statge` enum('1','2','3','4','5') NOT NULL DEFAULT '1',
`pri` enum('1','2','3','4') NOT NULL DEFAULT '1',
`desc` text NOT NULL,
`version` smallint(6) NOT NULL,
diff --git a/doc/CHANGELOG b/doc/CHANGELOG
index 651a667ff6..0750207001 100644
--- a/doc/CHANGELOG
+++ b/doc/CHANGELOG
@@ -1,3 +1,36 @@
+2021-10-12 15.6
+修复的BUG
+15263 项目文档库自定义权限问题
+15248 产品计划截至时间为当日时项目集看板不显示该计划
+15229 删除项目集,产品列表显示有问题
+15186 产品计划关联研发需求界面搜索功能按条件搜索不到
+15167 新手教程的提Bug任务没有需要输入的内容
+15143 手册中搜索的下一页链接不正确
+15089 项目集看板中未过期计划和正常发布中无数字显示
+15088 使用指令修改任务状态无效
+15065 点击完bug所属产品后再点击其他模块报错
+14983 后台-二次开发-数据库很多字段描述是空的
+14970 禅道页面加载十几秒
+14929 创建产品时不选择项目集,重新编辑时不能修改所属项目集
+14862 执行-测试-用例 页面展示了未和执行和需求相关的用例
+14851 新手教程创建项目集没有提示保存
+14785 集成gitlab时,gitlab列表不显示数据
+14748 产品提交需求界面创建计划多次点击保存会生成多条数据
+14690 新手教程语言项显示问题
+14679 等保三级扫描的pro10.1版本漏洞
+14674 普通用户帮助手册页点击下拉无响应
+14632 浏览器通知只在地盘-仪表盘页面显示,不能在任意禅道页面推送显示。
+14629 升级后下载附件提示乱码
+14607 搜索条件保存后修改条件再次搜索无效
+14594 顶级项目添加执行不能复制当前项目团队成员
+14528 从我近期参与的项目页返回后显示空白页
+14523 视野维护中移除可访问项目集后,该项目集可访问人员中没同步移除相关用户
+14487 无用php记录太多拉低禅道整体性能
+14486 需求搜索数据错误
+14018 项目集排序权限没有登记
+13907 已延期的产品添加迭代,迭代时间只能选择过去时间
+13815 项目设置权限不生效
+
2021-09-14 15.5
完成的需求
28102 在项目集中添加批量编辑项目功能
diff --git a/framework/api/router.class.php b/framework/api/router.class.php
index 3b18de79fd..1df2e0b4e0 100644
--- a/framework/api/router.class.php
+++ b/framework/api/router.class.php
@@ -88,11 +88,11 @@ class api extends router
}
else
{
- $this->path = trim((strpos($_SERVER['REQUEST_URI'], '?') > 0 ? strstr($_SERVER['REQUEST_URI'], '?', true) : $_SERVER['REQUEST_URI']), '/');
+ $this->path = rtrim((strpos($_SERVER['REQUEST_URI'], '?') > 0 ? strstr($_SERVER['REQUEST_URI'], '?', true) : $_SERVER['REQUEST_URI']), '/');
}
$dir = rtrim(dirname($_SERVER['SCRIPT_NAME']), '/');
- if($dir != '') $this->path = substr($this->path, strlen($dir));
+ if($dir != '' and strpos($this->path, $dir) === 0) $this->path = substr($this->path, strlen($dir));
$subPos = strpos($this->path, '/', 1);
diff --git a/framework/base/helper.class.php b/framework/base/helper.class.php
index 1f39f5ec90..ec1acf2e2c 100644
--- a/framework/base/helper.class.php
+++ b/framework/base/helper.class.php
@@ -581,7 +581,7 @@ class baseHelper
* @access public
* @return void
*/
- static function cd($path = '')
+ static public function cd($path = '')
{
static $cwd = '';
if($path) $cwd = getcwd();
diff --git a/framework/base/router.class.php b/framework/base/router.class.php
index 122d219b6a..fca97c980f 100644
--- a/framework/base/router.class.php
+++ b/framework/base/router.class.php
@@ -898,7 +898,7 @@ class baseRouter
*/
public function setOpenApp()
{
- if(isset($_COOKIE['tab']) and $_COOKIE['tab'])
+ if(isset($_COOKIE['tab']) and $_COOKIE['tab'] and preg_match('/^\w+$/', $_COOKIE['tab']))
{
$this->tab = $_COOKIE['tab'];
}
diff --git a/framework/control.class.php b/framework/control.class.php
index 3554707ffd..3ee876480c 100644
--- a/framework/control.class.php
+++ b/framework/control.class.php
@@ -341,7 +341,9 @@ class control extends baseControl
$message = array();
foreach($fields as $field)
{
- if($field->buildin or !$field->show or !isset($layouts[$field->field])) continue;
+ if(!empty($field->buildin)) continue;
+ if(empty($field->show)) continue;
+ if(!isset($layouts[$field->field])) continue;
$fieldRules = explode(',', trim($field->rules, ','));
$fieldRules = array_unique($fieldRules);
diff --git a/module/action/lang/de.php b/module/action/lang/de.php
index d5f35b9bdb..7d8d8eaca2 100644
--- a/module/action/lang/de.php
+++ b/module/action/lang/de.php
@@ -12,7 +12,7 @@
$lang->action->common = 'Log';
$lang->action->product = $lang->productCommon;
$lang->action->project = 'Project';
-$lang->action->execution = $lang->executionCommon;
+$lang->action->execution = $lang->execution->common;
$lang->action->objectType = 'Object Type';
$lang->action->objectID = 'ID';
$lang->action->objectName = 'Objekt Name';
diff --git a/module/action/lang/en.php b/module/action/lang/en.php
index 3eccd994f4..a74203313e 100755
--- a/module/action/lang/en.php
+++ b/module/action/lang/en.php
@@ -11,19 +11,24 @@
*/
global $config;
-$lang->action->common = 'Log';
-$lang->action->product = $lang->productCommon;
-$lang->action->project = 'Project';
-$lang->action->execution = $lang->executionCommon;
-$lang->action->objectType = 'Object Type';
-$lang->action->objectID = 'ID';
-$lang->action->objectName = 'Object Name';
-$lang->action->actor = 'User';
-$lang->action->action = 'Action';
-$lang->action->actionID = 'Action ID';
-$lang->action->date = 'Date';
-$lang->action->extra = 'Extra';
-$lang->action->system = 'System';
+$lang->action->common = 'Log';
+$lang->action->id = 'ID';
+$lang->action->product = $lang->productCommon;
+$lang->action->project = 'Project';
+$lang->action->execution = $lang->execution->common;
+$lang->action->objectType = 'Object Type';
+$lang->action->objectID = 'ID';
+$lang->action->objectName = 'Object Name';
+$lang->action->actor = 'User';
+$lang->action->action = 'Action';
+$lang->action->actionID = 'Action ID';
+$lang->action->date = 'Date';
+$lang->action->extra = 'Extra';
+$lang->action->system = 'System';
+$lang->action->url = 'URL';
+$lang->action->contentType = 'Content Type';
+$lang->action->data = 'Data';
+$lang->action->result = 'Result';
$lang->action->trash = 'Recycle';
$lang->action->undelete = 'Restore';
diff --git a/module/action/lang/fr.php b/module/action/lang/fr.php
index 8cfb507284..0754fd1130 100644
--- a/module/action/lang/fr.php
+++ b/module/action/lang/fr.php
@@ -11,8 +11,8 @@
*/
$lang->action->common = 'Log';
$lang->action->product = $lang->productCommon;
-$lang->action->project = $lang->executionCommon;
-$lang->action->execution = $lang->executionCommon;
+$lang->action->project = 'Project';
+$lang->action->execution = $lang->execution->common;
$lang->action->objectType = "Type d'objet";
$lang->action->objectID = 'ID';
$lang->action->objectName = "Nom de l'object";
diff --git a/module/action/lang/vi.php b/module/action/lang/vi.php
index 4f3a7ffef2..67a7ae7567 100644
--- a/module/action/lang/vi.php
+++ b/module/action/lang/vi.php
@@ -12,7 +12,7 @@
$lang->action->common = 'Nhật ký';
$lang->action->product = $lang->productCommon;
$lang->action->project = 'Project';
-$lang->action->execution = $lang->executionCommon;
+$lang->action->execution = $lang->execution->common;
$lang->action->objectType = 'Loại đối tượng';
$lang->action->objectID = 'ID';
$lang->action->objectName = 'Tên đối tượng';
diff --git a/module/action/lang/zh-cn.php b/module/action/lang/zh-cn.php
index 37a184818e..2f1e82893b 100755
--- a/module/action/lang/zh-cn.php
+++ b/module/action/lang/zh-cn.php
@@ -11,19 +11,24 @@
*/
global $config;
-$lang->action->common = '系统日志';
-$lang->action->product = $lang->productCommon;
-$lang->action->project = '项目';
-$lang->action->execution = $lang->executionCommon;
-$lang->action->objectType = '对象类型';
-$lang->action->objectID = '对象ID';
-$lang->action->objectName = '对象名称';
-$lang->action->actor = '操作者';
-$lang->action->action = '动作';
-$lang->action->actionID = '记录ID';
-$lang->action->date = '日期';
-$lang->action->extra = '附加值';
-$lang->action->system = '系统';
+$lang->action->common = '系统日志';
+$lang->action->id = '编号';
+$lang->action->product = $lang->productCommon;
+$lang->action->project = '项目';
+$lang->action->execution = $lang->execution->common;
+$lang->action->objectType = '对象类型';
+$lang->action->objectID = '对象ID';
+$lang->action->objectName = '对象名称';
+$lang->action->actor = '操作者';
+$lang->action->action = '动作';
+$lang->action->actionID = '记录ID';
+$lang->action->date = '日期';
+$lang->action->extra = '附加值';
+$lang->action->system = '系统';
+$lang->action->url = '网址';
+$lang->action->contentType = '内容类型';
+$lang->action->data = '数据';
+$lang->action->result = '结果';
$lang->action->trash = '回收站';
$lang->action->undelete = '还原';
diff --git a/module/action/lang/zh-tw.php b/module/action/lang/zh-tw.php
index 6ea0a55058..e87f00e8b0 100755
--- a/module/action/lang/zh-tw.php
+++ b/module/action/lang/zh-tw.php
@@ -11,19 +11,24 @@
*/
global $config;
-$lang->action->common = '系統日誌';
-$lang->action->product = $lang->productCommon;
-$lang->action->project = '項目';
-$lang->action->execution = $lang->executionCommon;
-$lang->action->objectType = '對象類型';
-$lang->action->objectID = '對象ID';
-$lang->action->objectName = '對象名稱';
-$lang->action->actor = '操作者';
-$lang->action->action = '動作';
-$lang->action->actionID = '記錄ID';
-$lang->action->date = '日期';
-$lang->action->extra = '附加值';
-$lang->action->system = '系統';
+$lang->action->common = '系統日誌';
+$lang->action->id = '編號';
+$lang->action->product = $lang->productCommon;
+$lang->action->project = '項目';
+$lang->action->execution = $lang->executionCommon;
+$lang->action->objectType = '對象類型';
+$lang->action->objectID = '對象ID';
+$lang->action->objectName = '對象名稱';
+$lang->action->actor = '操作者';
+$lang->action->action = '動作';
+$lang->action->actionID = '記錄ID';
+$lang->action->date = '日期';
+$lang->action->extra = '附加值';
+$lang->action->system = '系統';
+$lang->action->url = '網址';
+$lang->action->contentType = '內容類型';
+$lang->action->data = '數據';
+$lang->action->result = '結果';
$lang->action->trash = '資源回收筒';
$lang->action->undelete = '還原';
diff --git a/module/action/model.php b/module/action/model.php
index 2bbdedc01c..61cf3e0d9b 100755
--- a/module/action/model.php
+++ b/module/action/model.php
@@ -49,7 +49,7 @@ class actionModel extends model
$action->date = helper::now();
$action->extra = $extra;
- if($objectType == 'story' and $actionType !== 'reviewed' and strpos(',reviewclosed,passreviewed,clarifyreviewed,', ",$actionType,") !== false) $action->actor = $this->lang->action->system;
+ if($objectType == 'story' and strpos(',reviewpassed,reviewrejected,reviewclarified,', ",$actionType,") !== false) $action->actor = $this->lang->action->system;
/* Use purifier to process comment. Fix bug #2683. */
$action->comment = fixer::stripDataTags($comment);
@@ -338,7 +338,7 @@ class actionModel extends model
elseif($actionName == 'moved')
{
$name = $this->dao->select('name')->from(TABLE_PROJECT)->where('id')->eq($action->extra)->fetch('name');
- if($name) $action->extra = common::hasPriv('project', 'task') ? html::a(helper::createLink('project', 'task', "projectID=$action->extra"), "#$action->extra " . $name) : "#$action->extra " . $name;
+ if($name) $action->extra = common::hasPriv('execution', 'task') ? html::a(helper::createLink('execution', 'task', "executionID=$action->extra"), "#$action->extra " . $name) : "#$action->extra " . $name;
}
elseif($actionName == 'frombug' and common::hasPriv('bug', 'view'))
{
@@ -774,7 +774,7 @@ class actionModel extends model
/* If is project, select its related. */
$executions = array();
- if(is_numeric($projectID)) $executions = $this->loadModel('execution')->getPairs($projectID);
+ if(is_numeric($projectID) and $executionID == 'all') $executions = $this->loadModel('execution')->getPairs($projectID);
$this->loadModel('doc');
$libs = $this->doc->getLibs('includeDeleted') + array('' => '');
@@ -864,8 +864,8 @@ class actionModel extends model
}
if($this->session->actionQuery == false) $this->session->set('actionQuery', ' 1 = 1');
- $allProducts = "`product` = 'all'";
- $allProjects = "`project` = 'all'";
+ $allProducts = "`product` = 'all'";
+ $allProjects = "`project` = 'all'";
$allExecutions = "`execution` = 'all'";
$actionQuery = $this->session->actionQuery;
diff --git a/module/block/lang/de.php b/module/block/lang/de.php
index ac3e8e0f6d..49b5678f4c 100644
--- a/module/block/lang/de.php
+++ b/module/block/lang/de.php
@@ -76,10 +76,6 @@ $lang->block->selectProduct = 'Product selection';
$lang->block->of = ' von ';
$lang->block->remain = 'Left';
-$lang->block->params = new stdclass();
-$lang->block->params->name = 'Name';
-$lang->block->params->value = 'Wert';
-
$lang->block->createBlock = 'InfoBlock erstellen';
$lang->block->editBlock = 'Bearbeiten';
$lang->block->ordersSaved = 'Sortierung gespeichert.';
diff --git a/module/block/lang/en.php b/module/block/lang/en.php
index 94c0c643e7..44689051f1 100644
--- a/module/block/lang/en.php
+++ b/module/block/lang/en.php
@@ -12,6 +12,8 @@
global $config;
$lang->block = new stdclass();
$lang->block->common = 'Block';
+$lang->block->id = 'ID';
+$lang->block->params = 'Params';
$lang->block->name = 'Name';
$lang->block->style = 'Style';
$lang->block->grid = 'Position';
@@ -76,10 +78,6 @@ $lang->block->selectProduct = 'Product selection';
$lang->block->of = ' of ';
$lang->block->remain = 'Left';
-$lang->block->params = new stdclass();
-$lang->block->params->name = 'Name';
-$lang->block->params->value = 'Value';
-
$lang->block->createBlock = 'Add Block';
$lang->block->editBlock = 'Edit Block';
$lang->block->ordersSaved = 'The order is saved.';
diff --git a/module/block/lang/fr.php b/module/block/lang/fr.php
index 74c3a19073..1b47a8ce94 100644
--- a/module/block/lang/fr.php
+++ b/module/block/lang/fr.php
@@ -76,10 +76,6 @@ $lang->block->selectProduct = 'Product selection';
$lang->block->of = ' di ';
$lang->block->remain = 'Left';
-$lang->block->params = new stdclass();
-$lang->block->params->name = 'Nom';
-$lang->block->params->value = 'Valeur';
-
$lang->block->createBlock = 'Ajouter Bloc';
$lang->block->editBlock = 'Editer Bloc';
$lang->block->ordersSaved = 'L´ordre a été sauvegardé.';
diff --git a/module/block/lang/vi.php b/module/block/lang/vi.php
index 9d90a89d26..37202953eb 100644
--- a/module/block/lang/vi.php
+++ b/module/block/lang/vi.php
@@ -76,10 +76,6 @@ $lang->block->selectProduct = 'Product selection';
$lang->block->of = ' thực ';
$lang->block->remain = 'Left';
-$lang->block->params = new stdclass();
-$lang->block->params->name = 'Tên';
-$lang->block->params->value = 'Giá trị';
-
$lang->block->createBlock = 'Thêm Block';
$lang->block->editBlock = 'Sửa Block';
$lang->block->ordersSaved = 'Thứ tự đã được lưu';
diff --git a/module/block/lang/zh-cn.php b/module/block/lang/zh-cn.php
index 232bdf7348..dbd8e2ed9f 100644
--- a/module/block/lang/zh-cn.php
+++ b/module/block/lang/zh-cn.php
@@ -12,6 +12,8 @@
global $config;
$lang->block = new stdclass();
$lang->block->common = '区块';
+$lang->block->id = '编号';
+$lang->block->params = '参数';
$lang->block->name = '区块名称';
$lang->block->style = '外观';
$lang->block->grid = '位置';
@@ -76,10 +78,6 @@ $lang->block->selectProduct = '选择产品';
$lang->block->of = '的';
$lang->block->remain = '剩余工时';
-$lang->block->params = new stdclass();
-$lang->block->params->name = '参数名称';
-$lang->block->params->value = '参数值';
-
$lang->block->createBlock = '添加区块';
$lang->block->editBlock = '编辑区块';
$lang->block->ordersSaved = '排序已保存';
diff --git a/module/block/lang/zh-tw.php b/module/block/lang/zh-tw.php
index 14c4684549..7350ddb8c9 100644
--- a/module/block/lang/zh-tw.php
+++ b/module/block/lang/zh-tw.php
@@ -12,6 +12,8 @@
global $config;
$lang->block = new stdclass();
$lang->block->common = '區塊';
+$lang->block->id = '編號';
+$lang->block->params = '參數';
$lang->block->name = '區塊名稱';
$lang->block->style = '外觀';
$lang->block->grid = '位置';
@@ -76,10 +78,6 @@ $lang->block->selectProduct = '選擇產品';
$lang->block->of = '的';
$lang->block->remain = '剩餘工時';
-$lang->block->params = new stdclass();
-$lang->block->params->name = '參數名稱';
-$lang->block->params->value = '參數值';
-
$lang->block->createBlock = '添加區塊';
$lang->block->editBlock = '編輯區塊';
$lang->block->ordersSaved = '排序已保存';
@@ -538,7 +536,7 @@ $lang->block->typeList->testtask['done'] = '已測版本';
$lang->block->typeList->testtask['all'] = '全部';
$lang->block->modules['project']->moreLinkList = new stdclass();
-$lang->block->modules['project']->moreLinkList->recentproject = 'project|browse|';
+$lang->block->modules['project']->moreLinkList->recentproject = $config->systemMode == 'new' ? 'project|browse|' : 'execution|all|';
$lang->block->modules['project']->moreLinkList->statistic = 'project|browse|';
$lang->block->modules['project']->moreLinkList->project = 'project|browse|';
$lang->block->modules['project']->moreLinkList->cmmireport = 'weekly|index|';
diff --git a/module/block/view/executionblock.html.php b/module/block/view/executionblock.html.php
index 6854e2ab3d..6611c5feff 100644
--- a/module/block/view/executionblock.html.php
+++ b/module/block/view/executionblock.html.php
@@ -17,7 +17,7 @@
.table .c-burn {width: 150px;}
-
" . $lang->execution->create, '', "class='btn btn-primary'")?>
+ " . $lang->execution->create, '', "class='btn btn-primary' data-app='execution'")?>
diff --git a/module/block/view/recentprojectblock.html.php b/module/block/view/recentprojectblock.html.php
index ce4e32b025..4291a611c0 100644
--- a/module/block/view/recentprojectblock.html.php
+++ b/module/block/view/recentprojectblock.html.php
@@ -17,7 +17,7 @@
#cards .project-infos > span {display: inline-block; line-height: 12px;}
#cards .project-infos > span > .icon {font-size: 12px; display: inline-block; position: relative; top: -1px}
#cards .project-infos > span + span {margin-left: 10px;}
-#cards .project-detail {position: absolute; bottom: 16px; left: 16px; right: 16px; font-size: 12px;}
+#cards .project-detail {position: absolute; bottom: 16px; left: 16px; right: 16px; font-size: 12px; padding-left: 10px;}
#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;}
diff --git a/module/block/view/storyblock.html.php b/module/block/view/storyblock.html.php
index c8822ffa87..68e9c7ece8 100644
--- a/module/block/view/storyblock.html.php
+++ b/module/block/view/storyblock.html.php
@@ -10,6 +10,7 @@
* @link http://www.zentao.net
*/
?>
+app->loadLang('story');?>
block->emptyTip;?>
diff --git a/module/bug/config.php b/module/bug/config.php
index 82b51996f6..e85eb78851 100644
--- a/module/bug/config.php
+++ b/module/bug/config.php
@@ -26,7 +26,7 @@ $config->bug->list->allFields = 'id, module, execution, story, task,
$config->bug->list->defaultFields = 'id,severity,pri,title,openedBy,assignedTo,resolvedBy,resolution';
-$config->bug->list->exportFields = 'id, product, branch, module, execution, story, task,
+$config->bug->list->exportFields = 'id, product, branch, module, project, execution, story, task,
title, keywords, severity, pri, type, os, browser,
steps, status, deadline, activatedCount, confirmed, mailto,
openedBy, openedDate, openedBuild,
diff --git a/module/bug/control.php b/module/bug/control.php
index 8412b26f41..811234831b 100644
--- a/module/bug/control.php
+++ b/module/bug/control.php
@@ -574,12 +574,12 @@ class bug extends control
/* Set custom. */
foreach(explode(',', $this->config->bug->list->customCreateFields) as $field) $customFields[$field] = $this->lang->bug->$field;
- $title = isset($this->products[$productID]) ? $this->products[$productID] . $this->lang->colon . $this->lang->bug->create : $this->lang->bug->create;
- $this->view->title = $title;
+ $this->view->title = isset($this->products[$productID]) ? $this->products[$productID] . $this->lang->colon . $this->lang->bug->create : $this->lang->bug->create;
$this->view->customFields = $customFields;
$this->view->showFields = $this->config->bug->custom->createFields;
+ $this->view->gobackLink = (isset($output['from']) and $output['from'] == 'global') ? $this->createLink('bug', 'browse', "productID=$productID") : '';
$this->view->products = $products;
$this->view->productID = $productID;
$this->view->productName = isset($this->products[$productID]) ? $this->products[$productID] : '';
@@ -724,7 +724,7 @@ class bug extends control
/* Judge bug exits or not. */
$bugID = (int)$bugID;
$bug = $this->bug->getById($bugID, true);
- if(!$bug) die(js::error($this->lang->notFound) . js::locate('back'));
+ if(!$bug) die(js::error($this->lang->notFound) . js::locate($this->createLink('qa', 'index')));
$this->session->set('storyList', '', 'product');
$this->session->set('projectList', $this->app->getURI(true) . "#app={$this->app->tab}", 'project');
@@ -1719,6 +1719,7 @@ class bug extends control
/* Get users, products and executions. */
$users = $this->loadModel('user')->getPairs('noletter');
$products = $this->loadModel('product')->getPairs();
+ $projects = $this->loadModel('project')->getPairsByProgram();
$executions = $this->loadModel('execution')->getPairs($this->projectID, 'all', 'all');
/* Get related objects id lists. */
@@ -1777,6 +1778,7 @@ class bug extends control
/* fill some field with useful value. */
$bug->product = !isset($products[$bug->product]) ? '' : $products[$bug->product] . "(#$bug->product)";
+ $bug->project = !isset($projects[$bug->project]) ? '' : $projects[$bug->project] . "(#$bug->project)";
$bug->execution = !isset($executions[$bug->execution]) ? '' : $executions[$bug->execution] . "(#$bug->execution)";
$bug->story = !isset($relatedStories[$bug->story]) ? '' : $relatedStories[$bug->story] . "(#$bug->story)";
$bug->task = !isset($relatedTasks[$bug->task]) ? '' : $relatedTasks[$bug->task] . "($bug->task)";
@@ -1802,7 +1804,7 @@ class bug extends control
if(isset($users[$bug->lastEditedBy])) $bug->lastEditedBy = $users[$bug->lastEditedBy];
if(isset($users[$bug->closedBy])) $bug->closedBy = $users[$bug->closedBy];
- $bug->title = htmlspecialchars_decode($bug->title,ENT_QUOTES);
+ $bug->title = htmlspecialchars_decode($bug->title,ENT_QUOTES);
if($bug->linkBug)
{
diff --git a/module/bug/css/create.css b/module/bug/css/create.css
index 554b1268aa..433e87435a 100644
--- a/module/bug/css/create.css
+++ b/module/bug/css/create.css
@@ -44,3 +44,4 @@ html[lang='en'] #deadlineTd .input-group-addon {padding: 5px 18px;}
#typeBox .required:after {right: 1px;}
#osBox .required:after {right: 1px;}
#osBox {width: 190px;}
+#projectBox .required:after {right: 1px;}
diff --git a/module/bug/js/browse.js b/module/bug/js/browse.js
index 76bf55c9d3..6d469700d9 100644
--- a/module/bug/js/browse.js
+++ b/module/bug/js/browse.js
@@ -1,4 +1,11 @@
$(function()
{
if($('#bugList thead th.c-title').width() < 150) $('#bugList thead th.c-title').width(150);
+
+ /* The display of the adjusting sidebarHeader is synchronized with the sidebar. */
+ $(".sidebar-toggle").click(function()
+ {
+ $("#sidebarHeader").toggle("fast");
+ });
+ if($("main").is(".hide-sidebar")) $("#sidebarHeader").hide();
});
diff --git a/module/bug/lang/en.php b/module/bug/lang/en.php
index 550be67d26..4df3eeb931 100644
--- a/module/bug/lang/en.php
+++ b/module/bug/lang/en.php
@@ -30,6 +30,13 @@ $lang->bug->pri = 'Priority';
$lang->bug->type = 'Type';
$lang->bug->os = 'OS';
$lang->bug->browser = 'Browser';
+$lang->bug->hardware = 'Hardware';
+$lang->bug->result = 'Result';
+$lang->bug->repo = 'Repo';
+$lang->bug->lines = 'Lines';
+$lang->bug->v1 = 'Version A';
+$lang->bug->v2 = 'Version B';
+$lang->bug->repoType = 'Repo Type';
$lang->bug->steps = 'Repro Steps';
$lang->bug->status = 'Status';
$lang->bug->statusAB = 'Status';
diff --git a/module/bug/lang/zh-cn.php b/module/bug/lang/zh-cn.php
index ac43c139a6..8c11dead7d 100644
--- a/module/bug/lang/zh-cn.php
+++ b/module/bug/lang/zh-cn.php
@@ -30,6 +30,13 @@ $lang->bug->pri = '优先级';
$lang->bug->type = 'Bug类型';
$lang->bug->os = '操作系统';
$lang->bug->browser = '浏览器';
+$lang->bug->hardware = '硬件';
+$lang->bug->result = '结果';
+$lang->bug->repo = '所属版本库';
+$lang->bug->lines = '代码行';
+$lang->bug->v1 = '版本1';
+$lang->bug->v2 = '版本2';
+$lang->bug->repoType = '版本库类型';
$lang->bug->steps = '重现步骤';
$lang->bug->status = 'Bug状态';
$lang->bug->statusAB = '状态';
diff --git a/module/bug/lang/zh-tw.php b/module/bug/lang/zh-tw.php
index 4a46b999ec..423d9356c6 100644
--- a/module/bug/lang/zh-tw.php
+++ b/module/bug/lang/zh-tw.php
@@ -30,6 +30,13 @@ $lang->bug->pri = '優先順序';
$lang->bug->type = 'Bug類型';
$lang->bug->os = '操作系統';
$lang->bug->browser = '瀏覽器';
+$lang->bug->hardware = '硬件';
+$lang->bug->result = '結果';
+$lang->bug->repo = '所屬版本庫';
+$lang->bug->lines = '代碼行';
+$lang->bug->v1 = '版本1';
+$lang->bug->v2 = '版本2';
+$lang->bug->repoType = '版本庫類型';
$lang->bug->steps = '重現步驟';
$lang->bug->status = 'Bug狀態';
$lang->bug->statusAB = '狀態';
diff --git a/module/bug/model.php b/module/bug/model.php
index 378f3f35eb..24718b5a6b 100644
--- a/module/bug/model.php
+++ b/module/bug/model.php
@@ -202,7 +202,7 @@ class bugModel extends model
foreach(explode(',', $this->config->bug->create->requiredFields) as $field)
{
$field = trim($field);
- if($field and empty($bug->$field)) die(js::alert(sprintf($this->lang->error->notempty, $this->lang->bug->$field)));
+ if($field and isset($bug->$field) and empty($bug->$field)) die(js::alert(sprintf($this->lang->error->notempty, $this->lang->bug->$field)));
}
$bugs[$i] = $bug;
diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php
index 373db1cbbc..7af9d2793b 100644
--- a/module/bug/view/create.html.php
+++ b/module/bug/view/create.html.php
@@ -328,7 +328,8 @@ js::set('moduleID', $moduleID);
session->bugList ? $this->session->bugList : $this->inlink('browse', "productID=$productID");?>
goback, '', 'class="btn btn-wide"');?>
-
+ goback, '', 'class="btn btn-wide"');?>
+
id);?>
diff --git a/module/build/control.php b/module/build/control.php
index 2d9d1d6c36..cb65bd5395 100644
--- a/module/build/control.php
+++ b/module/build/control.php
@@ -46,7 +46,7 @@ class build extends control
if($this->app->tab == 'project')
{
$this->loadModel('project')->setMenu($projectID);
- $executions = $this->execution->getPairs($projectID);
+ $executions = $this->execution->getPairs($projectID, 'all', 'stagefilter');
$executionID = empty($executionID) ? key($executions) : $executionID;
$this->session->set('project', $projectID);
}
@@ -136,7 +136,7 @@ class build extends control
$execution->name = '';
}
- $executions = $this->product->getExecutionPairsByProduct($build->product, $build->branch, 'id_desc', $this->session->project);
+ $executions = $this->product->getExecutionPairsByProduct($build->product, $build->branch, 'id_desc', $this->session->project, 'stagefilter');
if(!isset($executions[$build->execution])) $executions[$build->execution] = $execution->name;
$productGroups = $this->execution->getProducts($build->execution);
@@ -188,7 +188,7 @@ class build extends control
if(!$build)
{
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'fail', 'code' => 404, 'message' => '404 Not found'));
- die(js::error($this->lang->notFound) . js::locate('back'));
+ die(js::error($this->lang->notFound) . js::locate($this->createLink('execution', 'all')));
}
$this->session->project = $build->project;
@@ -565,7 +565,7 @@ class build extends control
/* Set menu. */
$build = $this->build->getByID($buildID);
$product = $this->loadModel('product')->getByID($build->product);
- $this->loadModel('execution')->setMenu($this->execution->getPairs($build->project), $build->execution);
+ $this->loadModel('execution')->setMenu($build->execution);
/* Load pager. */
$this->app->loadClass('pager', $static = true);
diff --git a/module/build/lang/en.php b/module/build/lang/en.php
index 15111b6574..20a3d4b1bd 100644
--- a/module/build/lang/en.php
+++ b/module/build/lang/en.php
@@ -29,6 +29,7 @@ $lang->build->basicInfo = 'Basic Info';
$lang->build->id = 'ID';
$lang->build->product = $lang->productCommon;
+$lang->build->project = 'Project';
$lang->build->branch = 'Platform/Branch';
$lang->build->execution = $lang->executionCommon;
$lang->build->name = 'Name';
@@ -37,6 +38,7 @@ $lang->build->builder = 'Builder';
$lang->build->scmPath = 'SCM Path';
$lang->build->filePath = 'File Path';
$lang->build->desc = 'Description';
+$lang->build->mailto = 'Mailto';
$lang->build->files = 'Files';
$lang->build->last = 'Last Build';
$lang->build->packageType = 'Package Type';
diff --git a/module/build/lang/zh-cn.php b/module/build/lang/zh-cn.php
index 193473d840..2470d7e637 100644
--- a/module/build/lang/zh-cn.php
+++ b/module/build/lang/zh-cn.php
@@ -29,6 +29,7 @@ $lang->build->basicInfo = '基本信息';
$lang->build->id = 'ID';
$lang->build->product = $lang->productCommon;
+$lang->build->project = '所属项目';
$lang->build->branch = '平台/分支';
$lang->build->execution = '所属' . $lang->executionCommon;
$lang->build->name = '名称编号';
@@ -37,6 +38,7 @@ $lang->build->builder = '构建者';
$lang->build->scmPath = '源代码地址';
$lang->build->filePath = '下载地址';
$lang->build->desc = '描述';
+$lang->build->mailto = 'Mailto';
$lang->build->files = '上传发行包';
$lang->build->last = '上个版本';
$lang->build->packageType = '包类型';
diff --git a/module/build/lang/zh-tw.php b/module/build/lang/zh-tw.php
index 9d04267975..789f918176 100644
--- a/module/build/lang/zh-tw.php
+++ b/module/build/lang/zh-tw.php
@@ -29,6 +29,7 @@ $lang->build->basicInfo = '基本信息';
$lang->build->id = 'ID';
$lang->build->product = $lang->productCommon;
+$lang->build->project = '所屬項目';
$lang->build->branch = '平台/分支';
$lang->build->execution = '所屬' . $lang->executionCommon;
$lang->build->name = '名稱編號';
@@ -37,6 +38,7 @@ $lang->build->builder = '構建者';
$lang->build->scmPath = '原始碼地址';
$lang->build->filePath = '下載地址';
$lang->build->desc = '描述';
+$lang->build->mailto = 'Mailto';
$lang->build->files = '上傳發行包';
$lang->build->last = '上個版本';
$lang->build->packageType = '包類型';
diff --git a/module/caselib/control.php b/module/caselib/control.php
index d3f750f987..80dcf2fbd7 100644
--- a/module/caselib/control.php
+++ b/module/caselib/control.php
@@ -377,7 +377,7 @@ class caselib extends control
{
$libID = (int)$libID;
$lib = $this->caselib->getById($libID, true);
- if(!isset($lib->id)) die(js::error($this->lang->notFound) . js::locate('back'));
+ if(!isset($lib->id)) die(js::error($this->lang->notFound) . js::locate($this->createLink('qa', 'index')));
/* Set lib menu. */
$libraries = $this->caselib->getLibraries();
diff --git a/module/caselib/js/browse.js b/module/caselib/js/browse.js
index c0b0581ddc..001e3ddc52 100644
--- a/module/caselib/js/browse.js
+++ b/module/caselib/js/browse.js
@@ -20,3 +20,13 @@ function confirmBatchDelete(actionLink)
if(confirm(batchDelete)) setFormAction(actionLink);
return false;
}
+
+$(function()
+{
+ /* The display of the adjusting sidebarHeader is synchronized with the sidebar. */
+ $(".sidebar-toggle").click(function()
+ {
+ $("#sidebarHeader").toggle("fast");
+ });
+ if($("main").is(".hide-sidebar")) $("#sidebarHeader").hide();
+});
\ No newline at end of file
diff --git a/module/common/model.php b/module/common/model.php
index 210de9d9fa..d1ccf771a5 100644
--- a/module/common/model.php
+++ b/module/common/model.php
@@ -119,6 +119,8 @@ class commonModel extends model
$user->id = 0;
$user->account = 'guest';
$user->realname = 'guest';
+ $user->dept = 0;
+ $user->avatar = '';
$user->role = 'guest';
$user->admin = false;
$user->rights = $this->loadModel('user')->authorize('guest');
@@ -223,6 +225,7 @@ class commonModel extends model
$user = $this->app->user;
$user->rights = $this->loadModel('user')->authorize($user->account);
$user->groups = $this->user->getGroups($user->account);
+ $user->admin = strpos($this->app->company->admins, ",{$user->account},") !== false;
$this->session->set('user', $user);
$this->app->user = $this->session->user;
if(commonModel::hasPriv($module, $method)) return true;
@@ -358,9 +361,21 @@ class commonModel extends model
$html .= "";
$html .= "