From b5da3ce7d568b8f51f235c7db6220c44d7dd98ba Mon Sep 17 00:00:00 2001 From: zhujinyong Date: Mon, 14 Mar 2022 13:55:52 +0800 Subject: [PATCH 01/10] * Execute xuanxuan update sql. --- module/upgrade/model.php | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 43cf0660c3..c8ab0aa00e 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -461,28 +461,29 @@ class upgradeModel extends model set_time_limit(0); $this->updateActivatedDate(); + if(!empty($this->config->isINT)) + { + $xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'xuanxuan.sql'; + $this->execSQL($xuanxuanSql); + $executedXuanxuan = true; + } + else + { + if(!$executedXuanxuan) + { + $xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan4.6.sql'; + $this->execSQL($xuanxuanSql); + $xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan5.1.sql'; + $this->execSQL($xuanxuanSql); + } + } + switch($fromEdition) { case 'open': $this->execSQL($this->getUpgradeFile('proinstall')); case 'pro': $this->execSQL($this->getUpgradeFile('bizinstall')); - if(!empty($this->config->isINT)) - { - $xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'xuanxuan.sql'; - $this->execSQL($xuanxuanSql); - $executedXuanxuan = true; - } - else - { - if(!$executedXuanxuan) - { - $xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan4.6.sql'; - $this->execSQL($xuanxuanSql); - $xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan5.1.sql'; - $this->execSQL($xuanxuanSql); - } - } case 'biz': $this->execSQL($this->getUpgradeFile('maxinstall')); $this->execSQL($this->getUpgradeFile('functions')); From 140c7652ade0cda9602b466c40271802e539964a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B9=BF=E6=98=8E?= Date: Mon, 14 Mar 2022 14:23:19 +0800 Subject: [PATCH 02/10] * Fix upgrade bug. --- db/standard/zentao16.5.sql | 3791 ++++++++++++++++++++++++++++++++++++ db/update16.4.sql | 2 +- db/zentao.sql | 2 +- module/custom/model.php | 3 +- module/setting/model.php | 7 +- 5 files changed, 3798 insertions(+), 7 deletions(-) create mode 100644 db/standard/zentao16.5.sql diff --git a/db/standard/zentao16.5.sql b/db/standard/zentao16.5.sql new file mode 100644 index 0000000000..35c0dc6e6f --- /dev/null +++ b/db/standard/zentao16.5.sql @@ -0,0 +1,3791 @@ +CREATE TABLE `zt_account` ( + `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `type` varchar(255) NOT NULL, + `provider` varchar(255) NOT NULL, + `adminURI` varchar(255) NOT NULL, + `account` varchar(255) NOT NULL, + `password` varchar(255) NOT NULL, + `email` varchar(255) NOT NULL, + `mobile` varchar(255) NOT NULL, + `extra` text NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `status` varchar(30) NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `name` (`name`), + KEY `provider` (`provider`), + KEY `status` (`status`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +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(80) NOT NULL DEFAULT '', + `date` datetime NOT NULL, + `comment` text NOT NULL, + `extra` text, + `read` enum('0','1') NOT NULL DEFAULT '0', + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `efforted` tinyint(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 AUTO_INCREMENT=71 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_activity` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `process` mediumint(9) NOT NULL, + `name` varchar(255) NOT NULL, + `optional` varchar(255) NOT NULL, + `tailorNorm` varchar(255) NOT NULL, + `content` text NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `status` varchar(30) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedBy` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `order` mediumint(8) DEFAULT '0', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=90 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_api` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `product` varchar(255) NOT NULL DEFAULT '', + `lib` int(10) unsigned NOT NULL DEFAULT '0', + `module` int(10) unsigned NOT NULL DEFAULT '0', + `title` varchar(100) NOT NULL DEFAULT '', + `path` varchar(255) NOT NULL DEFAULT '', + `protocol` varchar(10) NOT NULL DEFAULT '', + `method` varchar(10) NOT NULL DEFAULT '', + `requestType` varchar(100) NOT NULL DEFAULT '', + `responseType` varchar(100) NOT NULL DEFAULT '', + `status` varchar(20) NOT NULL DEFAULT '', + `owner` varchar(30) NOT NULL DEFAULT '0', + `desc` text, + `version` smallint(5) unsigned NOT NULL DEFAULT '0', + `params` text, + `paramsExample` text, + `responseExample` text, + `response` text, + `commonParams` text, + `addedBy` varchar(30) NOT NULL DEFAULT '0', + `addedDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL DEFAULT '0', + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=70 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_api_lib_release` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `lib` int(10) unsigned NOT NULL DEFAULT '0', + `desc` varchar(255) NOT NULL DEFAULT '', + `version` varchar(255) NOT NULL DEFAULT '', + `snap` mediumtext NOT NULL, + `addedBy` varchar(30) NOT NULL DEFAULT '0', + `addedDate` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_apispec` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `doc` int(10) unsigned NOT NULL DEFAULT '0', + `module` int(10) unsigned NOT NULL DEFAULT '0', + `title` varchar(100) NOT NULL DEFAULT '', + `path` varchar(255) NOT NULL DEFAULT '', + `protocol` varchar(10) NOT NULL DEFAULT '', + `method` varchar(10) NOT NULL DEFAULT '', + `requestType` varchar(100) NOT NULL DEFAULT '', + `responseType` varchar(100) NOT NULL DEFAULT '', + `status` varchar(20) NOT NULL DEFAULT '', + `owner` varchar(255) NOT NULL DEFAULT '0', + `desc` text, + `version` smallint(5) unsigned NOT NULL DEFAULT '0', + `params` text, + `paramsExample` text, + `responseExample` text, + `response` text, + `addedBy` varchar(30) NOT NULL DEFAULT '0', + `addedDate` datetime DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=176 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_apistruct` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `lib` int(10) unsigned NOT NULL DEFAULT '0', + `name` varchar(30) NOT NULL DEFAULT '', + `type` varchar(50) NOT NULL DEFAULT '', + `desc` varchar(255) NOT NULL DEFAULT '', + `version` smallint(5) unsigned NOT NULL DEFAULT '0', + `attribute` text, + `addedBy` varchar(30) NOT NULL DEFAULT '0', + `addedDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL DEFAULT '0', + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_apistruct_spec` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL DEFAULT '', + `type` varchar(50) NOT NULL DEFAULT '', + `desc` varchar(255) NOT NULL DEFAULT '', + `attribute` text, + `version` smallint(5) unsigned NOT NULL DEFAULT '0', + `addedBy` varchar(30) NOT NULL DEFAULT '0', + `addedDate` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_asset` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `status` varchar(30) NOT NULL, + `type` varchar(30) NOT NULL, + `group` varchar(128) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` char(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_assetlib` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `type` varchar(255) 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; +CREATE TABLE `zt_attend` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `account` char(30) NOT NULL, + `date` date NOT NULL, + `signIn` time NOT NULL, + `signOut` time NOT NULL, + `status` varchar(30) NOT NULL DEFAULT '', + `ip` varchar(15) NOT NULL, + `device` varchar(30) NOT NULL, + `client` varchar(20) NOT NULL, + `manualIn` time NOT NULL, + `manualOut` time NOT NULL, + `reason` varchar(30) NOT NULL DEFAULT '', + `desc` text NOT NULL, + `reviewStatus` varchar(30) NOT NULL DEFAULT '', + `reviewedBy` char(30) NOT NULL, + `reviewedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `attend` (`date`,`account`), + KEY `account` (`account`), + KEY `date` (`date`), + KEY `status` (`status`), + KEY `reason` (`reason`), + KEY `reviewStatus` (`reviewStatus`), + KEY `reviewedBy` (`reviewedBy`) +) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_attendstat` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `account` char(30) NOT NULL, + `month` char(10) NOT NULL DEFAULT '', + `normal` decimal(12,2) NOT NULL DEFAULT '0.00', + `late` decimal(12,2) NOT NULL DEFAULT '0.00', + `early` decimal(12,2) NOT NULL DEFAULT '0.00', + `absent` decimal(12,2) NOT NULL DEFAULT '0.00', + `trip` decimal(12,2) NOT NULL DEFAULT '0.00', + `egress` decimal(12,2) NOT NULL DEFAULT '0.00', + `lieu` decimal(12,2) NOT NULL DEFAULT '0.00', + `paidLeave` decimal(12,2) NOT NULL DEFAULT '0.00', + `unpaidLeave` decimal(12,2) NOT NULL DEFAULT '0.00', + `timeOvertime` decimal(12,2) NOT NULL DEFAULT '0.00', + `restOvertime` decimal(12,2) NOT NULL DEFAULT '0.00', + `holidayOvertime` decimal(12,2) NOT NULL DEFAULT '0.00', + `deserve` decimal(12,2) NOT NULL DEFAULT '0.00', + `actual` decimal(12,2) NOT NULL DEFAULT '0.00', + `status` char(30) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + UNIQUE KEY `attend` (`month`,`account`), + KEY `account` (`account`), + KEY `month` (`month`), + KEY `status` (`status`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_auditcl` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `model` char(30) NOT NULL DEFAULT 'waterfall', + `practiceArea` char(30) NOT NULL, + `type` char(30) NOT NULL, + `title` varchar(255) NOT NULL, + `objectType` char(30) NOT NULL, + `objectID` int(10) DEFAULT NULL, + `assignedTo` varchar(30) NOT NULL, + `status` varchar(30) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedBy` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_auditplan` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `dateType` char(30) DEFAULT NULL, + `config` text, + `objectID` mediumint(9) NOT NULL, + `objectType` char(30) NOT NULL, + `process` mediumint(9) NOT NULL, + `processType` char(30) NOT NULL, + `checkDate` date NOT NULL, + `checkedBy` varchar(30) NOT NULL, + `realCheckDate` date NOT NULL, + `result` char(30) NOT NULL, + `project` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `status` varchar(30) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedBy` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + `checkBy` varchar(30) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_auditresult` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `auditplan` mediumint(8) NOT NULL, + `listID` mediumint(8) NOT NULL, + `result` char(30) NOT NULL, + `checkedBy` varchar(30) NOT NULL, + `checkedDate` date NOT NULL, + `comment` text NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `status` varchar(30) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedBy` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_baseimage` ( + `id` smallint(7) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL DEFAULT '', + `path` varchar(255) NOT NULL DEFAULT '', + `osType` varchar(50) NOT NULL DEFAULT '', + `os` varchar(50) NOT NULL DEFAULT '', + `osCategory` varchar(50) NOT NULL DEFAULT '', + `osArch` varchar(50) NOT NULL DEFAULT '', + `osLang` varchar(50) NOT NULL DEFAULT '', + `suggestCore` tinyint(1) unsigned NOT NULL DEFAULT '0', + `suggestMemory` mediumint(6) unsigned NOT NULL DEFAULT '0', + `suggestVolume` mediumint(6) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_baseimagebrowser` ( + `vmBackingID` int(10) NOT NULL, + `browserID` int(10) NOT NULL, + PRIMARY KEY (`vmBackingID`,`browserID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_basicmeas` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `purpose` varchar(50) NOT NULL, + `scope` char(30) NOT NULL, + `object` char(30) NOT NULL, + `name` varchar(90) NOT NULL, + `code` char(30) NOT NULL, + `unit` varchar(10) NOT NULL, + `configure` text, + `params` text, + `definition` text, + `source` varchar(255) DEFAULT NULL, + `collectType` varchar(30) NOT NULL, + `collectConf` text NOT NULL, + `execTime` varchar(30) NOT NULL, + `collectedBy` varchar(10) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `order` mediumint(8) unsigned NOT NULL DEFAULT '0', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `code` (`code`) +) ENGINE=MyISAM AUTO_INCREMENT=54 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_block` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `account` char(30) NOT NULL, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `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_vision_module_type_order` (`account`,`vision`,`module`,`type`,`order`), + KEY `account` (`account`) +) ENGINE=MyISAM AUTO_INCREMENT=11 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, + `default` enum('0','1') NOT NULL DEFAULT '0', + `status` enum('active','closed') NOT NULL DEFAULT 'active', + `desc` varchar(255) NOT NULL, + `createdDate` date NOT NULL, + `closedDate` date 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_browser` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL DEFAULT '', + `type` varchar(255) NOT NULL DEFAULT '', + `version` varchar(255) NOT NULL DEFAULT '', + `lang` varchar(255) NOT NULL DEFAULT '', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_budget` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `stage` char(30) NOT NULL, + `subject` mediumint(8) NOT NULL, + `amount` char(30) NOT NULL, + `name` varchar(255) NOT NULL, + `desc` text NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `lastEditedBy` char(30) NOT NULL, + `lastEditedDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) 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', + `injection` mediumint(8) unsigned NOT NULL, + `identify` mediumint(8) unsigned NOT NULL, + `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, + `feedbackBy` varchar(100) NOT NULL, + `notifyEmail` varchar(100) NOT NULL, + `mailto` text, + `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', + `feedback` mediumint(8) unsigned NOT NULL DEFAULT '0', + `result` mediumint(8) unsigned NOT NULL, + `repo` mediumint(8) unsigned NOT NULL, + `mr` 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 '', + `issueKey` varchar(50) 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_cmcl` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `type` char(30) NOT NULL, + `title` int(11) NOT NULL, + `contents` text NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `status` varchar(30) NOT NULL, + `order` int(11) 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; +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 AUTO_INCREMENT=2 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, + `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, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `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` (`vision`,`owner`,`module`,`section`,`key`) +) ENGINE=MyISAM AUTO_INCREMENT=33 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=20 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_deploy` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `begin` datetime NOT NULL, + `end` datetime NOT NULL, + `name` varchar(255) NOT NULL, + `desc` text NOT NULL, + `status` varchar(20) NOT NULL, + `owner` char(30) NOT NULL, + `members` text NOT NULL, + `notify` text NOT NULL, + `cases` text NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `result` varchar(20) NOT NULL, + `deleted` enum('0','1') NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_deployproduct` ( + `deploy` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + `release` mediumint(8) unsigned NOT NULL, + `package` varchar(255) NOT NULL, + UNIQUE KEY `deploy_product_release` (`deploy`,`product`,`release`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_deployscope` ( + `deploy` mediumint(8) unsigned NOT NULL, + `service` mediumint(8) unsigned NOT NULL, + `hosts` text NOT NULL, + `remove` text NOT NULL, + `add` text NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_deploystep` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `deploy` mediumint(8) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `begin` datetime NOT NULL, + `end` datetime NOT NULL, + `stage` varchar(30) NOT NULL, + `content` text NOT NULL, + `status` varchar(30) NOT NULL, + `assignedTo` char(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `finishedBy` char(30) NOT NULL, + `finishedDate` datetime 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_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_design` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` varchar(255) NOT NULL, + `product` varchar(255) NOT NULL, + `commit` text NOT NULL, + `commitedBy` varchar(30) NOT NULL, + `execution` mediumint(8) unsigned NOT NULL DEFAULT '0', + `name` varchar(255) NOT NULL, + `status` varchar(30) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `assignedBy` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + `story` char(30) NOT NULL, + `desc` text NOT NULL, + `version` smallint(6) NOT NULL, + `type` char(30) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_designspec` ( + `design` mediumint(8) NOT NULL, + `version` smallint(6) NOT NULL, + `name` varchar(255) NOT NULL, + `desc` text NOT NULL, + `files` varchar(255) NOT NULL, + UNIQUE KEY `design` (`design`,`version`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_doc` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `lib` varchar(30) NOT NULL, + `template` varchar(30) NOT NULL, + `templateType` varchar(30) NOT NULL, + `chapterType` varchar(30) NOT NULL, + `module` varchar(30) NOT NULL, + `title` varchar(255) NOT NULL, + `keywords` varchar(255) NOT NULL, + `type` varchar(30) NOT NULL, + `status` varchar(30) NOT NULL, + `parent` smallint(5) 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', + `views` smallint(5) unsigned NOT NULL, + `assetLib` mediumint(8) unsigned NOT NULL DEFAULT '0', + `assetLibType` varchar(30) NOT NULL DEFAULT '', + `from` mediumint(8) unsigned NOT NULL DEFAULT '0', + `fromVersion` smallint(6) NOT NULL DEFAULT '1', + `draft` longtext NOT NULL, + `collector` text NOT NULL, + `addedBy` varchar(30) NOT NULL, + `addedDate` datetime NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `assignedDate` date NOT NULL, + `approvedDate` date NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `mailto` text, + `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, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `product` mediumint(8) unsigned NOT NULL, + `project` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `name` varchar(60) NOT NULL, + `baseUrl` varchar(255) NOT NULL DEFAULT '', + `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, + `desc` 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 AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_domain` ( + `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `domain` varchar(255) NOT NULL, + `adminURI` varchar(255) NOT NULL, + `resolverURI` varchar(255) NOT NULL, + `register` varchar(255) NOT NULL, + `expiredDate` datetime NOT NULL, + `renew` varchar(255) NOT NULL, + `account` 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', + PRIMARY KEY (`id`), + KEY `domain` (`domain`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_durationestimation` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `stage` mediumint(9) NOT NULL, + `workload` varchar(255) NOT NULL, + `worktimeRate` varchar(255) NOT NULL, + `people` varchar(255) NOT NULL, + `startDate` date NOT NULL, + `endDate` date 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; +CREATE TABLE `zt_effort` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `objectType` varchar(30) NOT NULL, + `objectID` mediumint(8) unsigned NOT NULL, + `product` varchar(255) NOT NULL, + `project` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `account` varchar(30) NOT NULL, + `work` text, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `date` date NOT NULL, + `left` float NOT NULL, + `consumed` float NOT NULL, + `begin` smallint(4) unsigned zerofill NOT NULL, + `end` smallint(4) unsigned zerofill NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `execution` (`execution`), + KEY `objectID` (`objectID`), + KEY `date` (`date`), + KEY `account` (`account`) +) 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_faq` ( + `id` mediumint(9) NOT NULL AUTO_INCREMENT, + `module` mediumint(9) NOT NULL, + `product` mediumint(9) NOT NULL, + `question` varchar(255) NOT NULL, + `answer` text NOT NULL, + `addedtime` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_feedback` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `product` mediumint(8) unsigned NOT NULL, + `module` mediumint(8) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `type` char(30) NOT NULL, + `solution` char(30) NOT NULL, + `desc` text NOT NULL, + `status` varchar(30) NOT NULL, + `subStatus` varchar(30) NOT NULL DEFAULT '', + `public` enum('0','1') NOT NULL DEFAULT '0', + `notify` enum('0','1') NOT NULL DEFAULT '0', + `notifyEmail` varchar(100) NOT NULL, + `likes` text NOT NULL, + `result` mediumint(8) unsigned NOT NULL, + `faq` mediumint(8) unsigned NOT NULL, + `openedBy` char(30) NOT NULL, + `openedDate` datetime NOT NULL, + `reviewedBy` varchar(255) NOT NULL, + `reviewedDate` datetime NOT NULL, + `processedBy` char(30) NOT NULL, + `processedDate` datetime NOT NULL, + `closedBy` char(30) NOT NULL, + `closedDate` datetime NOT NULL, + `closedReason` varchar(30) NOT NULL, + `editedBy` char(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedTo` varchar(255) NOT NULL, + `assignedDate` datetime NOT NULL, + `feedbackBy` varchar(100) NOT NULL, + `mailto` varchar(255) NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_feedbackview` ( + `account` char(30) NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + UNIQUE KEY `account_product` (`account`,`product`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_file` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `pathname` char(100) 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_gapanalysis` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `account` varchar(30) NOT NULL, + `role` varchar(20) NOT NULL, + `analysis` text NOT NULL, + `needTrain` enum('no','yes') NOT NULL DEFAULT 'no', + `createdBy` char(30) DEFAULT 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`), + UNIQUE KEY `project_account` (`project`,`account`) +) 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', + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `name` char(30) NOT NULL, + `role` char(30) NOT NULL DEFAULT '', + `desc` char(255) NOT NULL DEFAULT '', + `acl` text, + `developer` enum('0','1') NOT NULL DEFAULT '1', + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=17 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_holiday` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(30) NOT NULL DEFAULT '', + `type` enum('holiday','working') NOT NULL DEFAULT 'holiday', + `desc` text NOT NULL, + `year` char(4) NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + PRIMARY KEY (`id`), + KEY `year` (`year`), + KEY `name` (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_host` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `assetID` mediumint(8) unsigned NOT NULL, + `admin` smallint(5) unsigned NOT NULL DEFAULT '0', + `serverRoom` mediumint(8) unsigned NOT NULL, + `cabinet` varchar(128) NOT NULL, + `serverModel` varchar(256) NOT NULL, + `hardwareType` varchar(64) NOT NULL, + `hostType` enum('physical','virtual') NOT NULL, + `cpuBrand` varchar(128) NOT NULL, + `cpuModel` varchar(128) NOT NULL, + `cpuNumber` varchar(16) NOT NULL, + `cpuCores` varchar(30) NOT NULL, + `cpuRate` varchar(30) NOT NULL, + `memory` varchar(30) NOT NULL, + `diskType` varchar(30) NOT NULL, + `diskSize` varchar(30) NOT NULL, + `unit` enum('GB','TB') NOT NULL DEFAULT 'GB', + `privateIP` varchar(128) NOT NULL, + `publicIP` varchar(128) NOT NULL, + `nic` varchar(128) NOT NULL, + `mac` varchar(128) NOT NULL, + `osName` varchar(64) NOT NULL, + `osVersion` varchar(64) NOT NULL, + `webserver` varchar(128) NOT NULL, + `database` varchar(128) NOT NULL, + `language` varchar(16) NOT NULL, + `status` varchar(50) NOT NULL, + `agentPort` varchar(10) NOT NULL, + `instanceNum` tinyint(4) NOT NULL DEFAULT '0', + `pri` smallint(5) unsigned NOT NULL DEFAULT '0', + `heartbeatTime` datetime NOT NULL, + `tags` varchar(50) NOT NULL DEFAULT '', + `provider` varchar(255) NOT NULL DEFAULT '', + `bridgeID` varchar(255) NOT NULL DEFAULT '', + `cloudKey` varchar(255) NOT NULL DEFAULT '', + `cloudSecret` varchar(255) NOT NULL DEFAULT '', + `cloudRegion` varchar(255) NOT NULL DEFAULT '', + `cloudNamespace` varchar(255) NOT NULL DEFAULT '', + `cloudUser` varchar(255) NOT NULL DEFAULT '', + `cloudAccount` varchar(255) NOT NULL DEFAULT '', + `cloudPassword` varchar(255) NOT NULL DEFAULT '', + `couldVPC` varchar(255) NOT NULL DEFAULT '', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_chat` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `gid` char(40) NOT NULL DEFAULT '', + `name` varchar(60) NOT NULL DEFAULT '', + `type` varchar(20) NOT NULL DEFAULT 'group', + `admins` varchar(255) NOT NULL DEFAULT '', + `committers` varchar(255) NOT NULL DEFAULT '', + `subject` mediumint(8) unsigned NOT NULL DEFAULT '0', + `public` enum('0','1') NOT NULL DEFAULT '0', + `createdBy` varchar(30) NOT NULL DEFAULT '', + `createdDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `ownedBy` varchar(30) NOT NULL DEFAULT '', + `editedBy` varchar(30) NOT NULL DEFAULT '', + `editedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `lastActiveTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `lastMessage` int(11) unsigned NOT NULL DEFAULT '0', + `dismissDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `pinnedMessages` text NOT NULL, + PRIMARY KEY (`id`), + KEY `gid` (`gid`), + KEY `name` (`name`), + KEY `type` (`type`), + KEY `public` (`public`), + KEY `createdBy` (`createdBy`), + KEY `editedBy` (`editedBy`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_chat_message_index` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `gid` char(40) NOT NULL, + `tableName` char(64) NOT NULL, + `start` int(11) unsigned NOT NULL, + `end` int(11) unsigned NOT NULL, + `startDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `endDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `count` mediumint(8) unsigned NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `chattable` (`gid`,`tableName`), + KEY `start` (`start`), + KEY `end` (`end`), + KEY `startDate` (`startDate`), + KEY `endDate` (`endDate`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_chatuser` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `cgid` char(40) NOT NULL DEFAULT '', + `user` mediumint(8) NOT NULL DEFAULT '0', + `order` smallint(5) NOT NULL DEFAULT '0', + `star` enum('0','1') NOT NULL DEFAULT '0', + `hide` enum('0','1') NOT NULL DEFAULT '0', + `mute` enum('0','1') NOT NULL DEFAULT '0', + `freeze` enum('0','1') NOT NULL DEFAULT '0', + `join` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `quit` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `category` varchar(40) NOT NULL DEFAULT '', + `lastReadMessage` int(11) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `chatuser` (`cgid`,`user`), + KEY `cgid` (`cgid`), + KEY `user` (`user`), + KEY `order` (`order`), + KEY `star` (`star`), + KEY `hide` (`hide`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_client` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `version` char(30) NOT NULL DEFAULT '', + `desc` varchar(100) NOT NULL DEFAULT '', + `changeLog` text NOT NULL, + `strategy` varchar(10) NOT NULL DEFAULT '', + `downloads` text NOT NULL, + `createdDate` datetime NOT NULL, + `createdBy` varchar(30) NOT NULL DEFAULT '', + `editedDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL DEFAULT '', + `status` enum('released','wait') NOT NULL DEFAULT 'wait', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_conference` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `rid` char(40) NOT NULL DEFAULT '', + `cgid` char(40) NOT NULL DEFAULT '', + `status` enum('closed','open') NOT NULL DEFAULT 'closed', + `participants` text NOT NULL, + `invitee` text NOT NULL, + `openedBy` mediumint(8) NOT NULL DEFAULT '0', + `openedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_conferenceaction` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `rid` char(40) NOT NULL DEFAULT '', + `type` enum('create','invite','join','leave','close','publish') NOT NULL DEFAULT 'create', + `data` text NOT NULL, + `user` mediumint(8) NOT NULL DEFAULT '0', + `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `device` char(40) NOT NULL DEFAULT 'default', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_message` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `gid` char(40) NOT NULL DEFAULT '', + `cgid` char(40) NOT NULL DEFAULT '', + `user` varchar(30) NOT NULL DEFAULT '', + `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `type` enum('normal','broadcast','notify','bulletin') NOT NULL DEFAULT 'normal', + `content` text NOT NULL, + `contentType` enum('text','plain','emotion','image','file','object','code') NOT NULL DEFAULT 'text', + `data` text NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `mgid` (`gid`), + KEY `mcgid` (`cgid`), + KEY `muser` (`user`), + KEY `mtype` (`type`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_message_backup` ( + `id` int(11) unsigned NOT NULL, + `gid` char(40) NOT NULL DEFAULT '', + `cgid` char(40) NOT NULL DEFAULT '', + `user` varchar(30) NOT NULL DEFAULT '', + `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `type` enum('normal','broadcast','notify') NOT NULL DEFAULT 'normal', + `content` text NOT NULL, + `contentType` enum('text','plain','emotion','image','file','object','code') NOT NULL DEFAULT 'text', + `data` text NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_message_index` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `tableName` char(64) NOT NULL, + `start` int(11) unsigned NOT NULL, + `end` int(11) unsigned NOT NULL, + `startDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `endDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `chats` text NOT NULL, + PRIMARY KEY (`id`), + KEY `tableName` (`tableName`), + KEY `start` (`start`), + KEY `end` (`end`), + KEY `startDate` (`startDate`), + KEY `endDate` (`endDate`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_messagestatus` ( + `user` mediumint(8) NOT NULL DEFAULT '0', + `message` int(11) unsigned NOT NULL, + `status` enum('waiting','sent','readed','deleted') NOT NULL DEFAULT 'waiting', + UNIQUE KEY `user` (`user`,`message`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_queue` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `type` char(30) NOT NULL, + `content` text NOT NULL, + `addDate` datetime NOT NULL, + `processDate` datetime NOT NULL, + `result` text NOT NULL, + `status` char(30) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_userdevice` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `user` mediumint(8) NOT NULL DEFAULT '0', + `device` char(40) NOT NULL DEFAULT 'default', + `deviceID` char(40) NOT NULL DEFAULT '', + `token` char(64) NOT NULL DEFAULT '', + `validUntil` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `lastLogin` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `lastLogout` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + UNIQUE KEY `userdevice` (`user`,`device`), + KEY `user` (`user`), + KEY `lastLogin` (`lastLogin`), + KEY `lastLogout` (`lastLogout`) +) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_intervention` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `activity` mediumint(8) NOT NULL, + `status` char(30) NOT NULL, + `partake` text NOT NULL, + `begin` date NOT NULL, + `realBegin` date NOT NULL, + `situation` varchar(255) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `project` (`project`,`activity`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_issue` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `resolvedBy` varchar(30) NOT NULL, + `project` varchar(255) NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `desc` text NOT NULL, + `pri` char(30) NOT NULL, + `severity` char(30) NOT NULL, + `type` char(30) NOT NULL, + `activity` varchar(255) NOT NULL, + `deadline` date NOT NULL, + `resolution` char(30) NOT NULL, + `resolutionComment` text NOT NULL, + `objectID` varchar(255) NOT NULL, + `resolvedDate` date NOT NULL, + `status` varchar(30) NOT NULL, + `owner` varchar(255) NOT NULL, + `lib` mediumint(8) unsigned NOT NULL DEFAULT '0', + `from` mediumint(8) unsigned NOT NULL DEFAULT '0', + `version` smallint(6) NOT NULL DEFAULT '1', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `activateBy` varchar(30) NOT NULL, + `activateDate` date NOT NULL, + `closedBy` varchar(30) NOT NULL, + `closedDate` date NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `assignedBy` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `approvedDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) 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, + `sonarqubeServer` mediumint(8) unsigned NOT NULL, + `projectKey` 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_kanban` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `space` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `owner` varchar(30) NOT NULL, + `team` text NOT NULL, + `desc` text NOT NULL, + `acl` char(30) NOT NULL DEFAULT 'open', + `whitelist` text NOT NULL, + `archived` enum('0','1') NOT NULL DEFAULT '1', + `performable` enum('0','1') NOT NULL DEFAULT '0', + `status` enum('active','closed') NOT NULL DEFAULT 'active', + `order` mediumint(8) NOT NULL DEFAULT '0', + `displayCards` smallint(6) NOT NULL DEFAULT '0', + `fluidBoard` enum('0','1') NOT NULL DEFAULT '0', + `object` varchar(255) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `lastEditedBy` char(30) NOT NULL, + `lastEditedDate` datetime NOT NULL, + `closedBy` char(30) NOT NULL, + `closedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_kanbancard` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `kanban` mediumint(8) unsigned NOT NULL, + `region` mediumint(8) unsigned NOT NULL, + `group` mediumint(8) unsigned NOT NULL, + `fromID` mediumint(8) unsigned NOT NULL, + `fromType` varchar(30) NOT NULL, + `name` varchar(255) NOT NULL, + `status` varchar(30) NOT NULL DEFAULT 'doing', + `pri` mediumint(8) unsigned NOT NULL, + `assignedTo` text NOT NULL, + `desc` text NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + `estimate` float unsigned NOT NULL, + `progress` float unsigned NOT NULL DEFAULT '0', + `color` char(7) NOT NULL, + `acl` char(30) NOT NULL DEFAULT 'open', + `whitelist` text NOT NULL, + `order` mediumint(8) NOT NULL DEFAULT '0', + `archived` enum('0','1') NOT NULL DEFAULT '0', + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `lastEditedBy` char(30) NOT NULL, + `lastEditedDate` datetime NOT NULL, + `archivedBy` char(30) NOT NULL, + `archivedDate` datetime NOT NULL, + `assignedBy` char(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_kanbancell` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `kanban` mediumint(8) NOT NULL, + `lane` mediumint(8) NOT NULL, + `column` mediumint(8) NOT NULL, + `type` char(30) NOT NULL, + `cards` text NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `card_group` (`kanban`,`type`,`lane`,`column`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_kanbancolumn` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `parent` mediumint(8) NOT NULL DEFAULT '0', + `type` char(30) NOT NULL, + `region` mediumint(8) unsigned NOT NULL, + `group` mediumint(8) NOT NULL DEFAULT '0', + `name` varchar(255) NOT NULL DEFAULT '', + `color` char(30) NOT NULL, + `limit` smallint(6) NOT NULL DEFAULT '-1', + `order` mediumint(8) NOT NULL DEFAULT '0', + `archived` enum('0','1') NOT NULL DEFAULT '0', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_kanbangroup` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `kanban` mediumint(8) unsigned NOT NULL, + `region` mediumint(8) unsigned NOT NULL, + `order` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_kanbanlane` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `execution` mediumint(8) NOT NULL DEFAULT '0', + `type` char(30) NOT NULL, + `region` mediumint(8) unsigned NOT NULL, + `group` mediumint(8) unsigned NOT NULL, + `groupby` char(30) NOT NULL, + `extra` char(30) NOT NULL, + `name` varchar(255) NOT NULL DEFAULT '', + `color` char(30) NOT NULL, + `order` smallint(6) NOT NULL DEFAULT '0', + `lastEditedTime` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_kanbanregion` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `space` mediumint(8) unsigned NOT NULL, + `kanban` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `order` mediumint(8) NOT NULL DEFAULT '0', + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `lastEditedBy` char(30) NOT NULL, + `lastEditedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_kanbanspace` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `type` varchar(50) NOT NULL, + `owner` varchar(30) NOT NULL, + `team` text NOT NULL, + `desc` text NOT NULL, + `acl` char(30) NOT NULL DEFAULT 'open', + `whitelist` text NOT NULL, + `status` enum('active','closed') NOT NULL DEFAULT 'active', + `order` mediumint(8) NOT NULL DEFAULT '0', + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `lastEditedBy` char(30) NOT NULL, + `lastEditedDate` datetime NOT NULL, + `closedBy` char(30) NOT NULL, + `closedDate` datetime NOT 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', + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + PRIMARY KEY (`id`), + UNIQUE KEY `lang` (`lang`,`module`,`section`,`key`,`vision`) +) ENGINE=MyISAM AUTO_INCREMENT=18 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_leave` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `year` char(4) NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + `start` time NOT NULL, + `finish` time NOT NULL, + `hours` float(4,1) unsigned NOT NULL DEFAULT '0.0', + `backDate` datetime NOT NULL, + `type` varchar(30) NOT NULL DEFAULT '', + `desc` text NOT NULL, + `status` varchar(30) NOT NULL DEFAULT '', + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `reviewedBy` char(30) NOT NULL, + `reviewedDate` datetime NOT NULL, + `level` tinyint(3) NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `reviewers` text NOT NULL, + `backReviewers` text NOT NULL, + PRIMARY KEY (`id`), + KEY `year` (`year`), + KEY `type` (`type`), + KEY `status` (`status`), + KEY `createdBy` (`createdBy`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_lieu` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `year` char(4) NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + `start` time NOT NULL, + `finish` time NOT NULL, + `hours` float(4,1) unsigned NOT NULL DEFAULT '0.0', + `overtime` char(255) NOT NULL, + `trip` char(255) NOT NULL, + `desc` text NOT NULL, + `status` varchar(30) NOT NULL DEFAULT '', + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `reviewedBy` char(30) NOT NULL, + `reviewedDate` datetime NOT NULL, + `level` tinyint(3) NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `reviewers` text NOT NULL, + PRIMARY KEY (`id`), + KEY `year` (`year`), + KEY `status` (`status`), + KEY `createdBy` (`createdBy`) +) ENGINE=MyISAM 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_measqueue` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `type` varchar(30) NOT NULL, + `mid` mediumint(8) unsigned NOT NULL, + `status` varchar(255) NOT NULL, + `logs` text, + `execTime` varchar(10) NOT NULL, + `params` text, + `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_measrecords` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `type` varchar(30) NOT NULL, + `mid` mediumint(8) NOT NULL, + `measCode` char(50) NOT NULL DEFAULT '', + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `params` text NOT NULL, + `year` char(4) NOT NULL, + `month` char(6) NOT NULL, + `week` char(8) NOT NULL, + `day` char(8) NOT NULL, + `value` varchar(255) NOT NULL, + `date` date NOT NULL, + PRIMARY KEY (`id`), + KEY `product` (`product`), + KEY `project` (`project`), + KEY `time` (`year`,`month`,`day`,`week`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_meastemplate` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `model` char(30) NOT NULL, + `name` varchar(255) NOT NULL, + `content` 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_meeting` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) NOT NULL, + `execution` mediumint(8) NOT NULL, + `name` varchar(255) NOT NULL, + `type` varchar(255) NOT NULL, + `begin` time NOT NULL, + `end` time NOT NULL, + `dept` mediumint(8) NOT NULL, + `mode` varchar(255) NOT NULL, + `host` varchar(30) NOT NULL, + `participant` text NOT NULL, + `date` date NOT NULL, + `room` int(11) NOT NULL, + `minutes` text NOT NULL, + `minutedBy` varchar(30) NOT NULL, + `minutedDate` datetime NOT NULL, + `objectType` varchar(30) NOT NULL, + `objectID` mediumint(8) 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; +CREATE TABLE `zt_meetingroom` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `position` varchar(30) NOT NULL, + `seats` int(11) NOT NULL, + `equipment` varchar(255) NOT NULL, + `openTime` 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', + PRIMARY KEY (`id`) +) 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 AUTO_INCREMENT=15 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_mr` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `gitlabID` mediumint(8) unsigned NOT NULL, + `sourceProject` int(10) unsigned NOT NULL, + `sourceBranch` varchar(100) NOT NULL, + `targetProject` int(10) unsigned NOT NULL, + `targetBranch` varchar(100) NOT NULL, + `mriid` int(10) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `description` text NOT NULL, + `assignee` varchar(255) NOT NULL, + `reviewer` varchar(255) NOT NULL, + `approver` 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, + `approvalStatus` char(30) NOT NULL, + `needApproved` enum('0','1') NOT NULL DEFAULT '0', + `needCI` enum('0','1') NOT NULL DEFAULT '0', + `repoID` mediumint(8) unsigned NOT NULL, + `jobID` mediumint(8) unsigned NOT NULL, + `compileID` mediumint(8) unsigned NOT NULL, + `compileStatus` char(30) NOT NULL, + `removeSourceBranch` enum('0','1') NOT NULL DEFAULT '0', + `synced` enum('0','1') NOT NULL DEFAULT '1', + `syncError` varchar(255) NOT NULL, + `hasNoConflict` enum('0','1') NOT NULL DEFAULT '0', + `diffs` longtext, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_mrapproval` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `mrID` mediumint(8) unsigned NOT NULL, + `account` varchar(255) NOT NULL, + `date` datetime NOT NULL, + `action` char(30) NOT NULL, + `comment` text NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_nc` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `auditplan` mediumint(8) NOT NULL, + `listID` mediumint(8) NOT NULL, + `title` varchar(255) NOT NULL, + `desc` text NOT NULL, + `type` char(30) NOT NULL, + `status` varchar(30) NOT NULL DEFAULT 'active', + `severity` char(30) NOT NULL, + `deadline` date NOT NULL, + `resolvedBy` varchar(30) NOT NULL, + `resolution` char(30) NOT NULL, + `resolvedDate` date NOT NULL, + `closedBy` varchar(30) NOT NULL, + `closedDate` date NOT NULL, + `parent` mediumint(8) unsigned NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `assignedDate` date NOT NULL, + `activateDate` date 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; +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_object` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) NOT NULL, + `from` mediumint(8) NOT NULL, + `title` varchar(255) NOT NULL, + `category` char(30) NOT NULL, + `version` varchar(255) NOT NULL, + `type` enum('reviewed','taged') NOT NULL, + `range` text NOT NULL, + `data` text NOT NULL, + `storyEst` char(30) NOT NULL, + `taskEst` char(30) NOT NULL, + `requestEst` char(30) NOT NULL, + `testEst` char(30) NOT NULL, + `devEst` char(30) NOT NULL, + `designEst` char(30) 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_opportunity` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `source` char(30) NOT NULL, + `type` char(30) NOT NULL, + `strategy` char(30) NOT NULL, + `status` varchar(30) NOT NULL DEFAULT 'active', + `impact` mediumint(8) NOT NULL, + `chance` mediumint(8) NOT NULL, + `ratio` mediumint(8) NOT NULL, + `pri` char(30) NOT NULL, + `identifiedDate` date NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `assignedDate` date NOT NULL, + `approvedDate` date NOT NULL, + `prevention` text NOT NULL, + `plannedClosedDate` date NOT NULL, + `actualClosedDate` date NOT NULL, + `lib` mediumint(8) unsigned NOT NULL DEFAULT '0', + `from` mediumint(8) unsigned NOT NULL DEFAULT '0', + `version` smallint(6) NOT NULL DEFAULT '1', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `activatedBy` varchar(30) NOT NULL, + `activatedDate` datetime NOT NULL, + `closedBy` varchar(30) NOT NULL, + `closedDate` datetime NOT NULL, + `canceledBy` varchar(30) NOT NULL, + `canceledDate` datetime NOT NULL, + `cancelReason` char(30) NOT NULL, + `hangupedBy` varchar(30) NOT NULL, + `hangupedDate` datetime NOT NULL, + `resolution` text NOT NULL, + `resolvedBy` varchar(30) NOT NULL, + `resolvedDate` datetime NOT NULL, + `lastCheckedBy` varchar(30) NOT NULL, + `lastCheckedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_overtime` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `year` char(4) NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + `start` time NOT NULL, + `finish` time NOT NULL, + `hours` float(4,1) unsigned NOT NULL DEFAULT '0.0', + `leave` varchar(255) NOT NULL, + `type` varchar(30) NOT NULL DEFAULT '', + `desc` text NOT NULL, + `status` varchar(30) NOT NULL DEFAULT '', + `rejectReason` varchar(100) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `reviewedBy` char(30) NOT NULL, + `reviewedDate` datetime NOT NULL, + `level` tinyint(3) NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `reviewers` text NOT NULL, + PRIMARY KEY (`id`), + KEY `year` (`year`), + KEY `type` (`type`), + KEY `status` (`status`), + KEY `createdBy` (`createdBy`) +) 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_process` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `model` char(30) NOT NULL DEFAULT 'waterfall', + `name` varchar(255) NOT NULL, + `type` char(30) NOT NULL, + `abbr` char(30) NOT NULL, + `desc` text NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `status` varchar(30) NOT NULL, + `order` mediumint(9) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedBy` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=27 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, + `feedback` varchar(30) NOT NULL, + `acl` enum('open','private','custom') NOT NULL DEFAULT 'open', + `whitelist` text NOT NULL, + `reviewer` text NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `createdVersion` varchar(20) NOT NULL, + `order` mediumint(8) unsigned NOT NULL, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `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, + `status` enum('wait','doing','done','closed') NOT NULL DEFAULT 'wait', + `desc` text NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + `order` text NOT NULL, + `closedReason` varchar(20) 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_programactivity` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `process` mediumint(8) NOT NULL, + `activity` mediumint(8) NOT NULL, + `name` varchar(255) NOT NULL, + `content` text NOT NULL, + `reason` varchar(255) NOT NULL, + `result` char(30) NOT NULL, + `linkedBy` char(30) 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_programoutput` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `process` mediumint(8) NOT NULL, + `activity` mediumint(8) NOT NULL, + `output` mediumint(8) NOT NULL, + `content` text NOT NULL, + `name` varchar(255) NOT NULL, + `reason` varchar(255) NOT NULL, + `result` char(30) NOT NULL, + `linkedBy` char(30) 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_programprocess` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `process` mediumint(8) NOT NULL, + `name` varchar(255) NOT NULL, + `type` char(30) NOT NULL, + `abbr` char(30) NOT NULL, + `desc` text NOT NULL, + `reason` varchar(255) NOT NULL, + `linkedBy` char(30) 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_programreport` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `template` mediumint(8) NOT NULL, + `project` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `params` text NOT NULL, + `content` 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_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, + `suspendedDate` date 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, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `displayCards` smallint(6) NOT NULL DEFAULT '0', + `fluidBoard` enum('0','1') NOT NULL DEFAULT '0', + `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`,`branch`) +) 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, + `branch` 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`), + KEY `story` (`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_relationoftasks` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `execution` mediumint(8) unsigned NOT NULL, + `pretask` mediumint(8) unsigned NOT NULL, + `condition` enum('begin','end') NOT NULL, + `task` mediumint(8) unsigned NOT NULL, + `action` enum('begin','end') NOT NULL, + PRIMARY KEY (`id`), + KEY `relationoftasks` (`execution`,`task`) +) 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) DEFAULT NULL, + `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, + `preMerge` enum('0','1') NOT NULL DEFAULT '0', + `job` mediumint(8) unsigned NOT NULL, + `fileServerUrl` text, + `fileServerAccount` varchar(40) NOT NULL DEFAULT '', + `fileServerPassword` varchar(100) NOT NULL DEFAULT '', + `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_report` ( + `id` mediumint(9) NOT NULL AUTO_INCREMENT, + `code` varchar(100) NOT NULL, + `name` text NOT NULL, + `module` varchar(100) NOT NULL, + `sql` text NOT NULL, + `vars` text NOT NULL, + `langs` text NOT NULL, + `params` text NOT NULL, + `step` tinyint(1) NOT NULL DEFAULT '2', + `desc` text NOT NULL, + `addedBy` char(30) NOT NULL, + `addedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `code` (`code`) +) ENGINE=MyISAM AUTO_INCREMENT=27 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_researchplan` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `customer` varchar(255) NOT NULL, + `stakeholder` varchar(255) NOT NULL, + `objective` varchar(255) NOT NULL, + `begin` datetime NOT NULL, + `end` datetime NOT NULL, + `location` varchar(255) NOT NULL, + `team` varchar(255) NOT NULL, + `method` enum('','videoConference','interview','questionnaire','telephoneInterview') NOT NULL, + `outline` text NOT NULL, + `schedule` 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; +CREATE TABLE `zt_researchreport` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `relatedPlan` mediumint(8) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `author` varchar(30) NOT NULL, + `content` text NOT NULL, + `customer` varchar(255) NOT NULL, + `researchObjects` varchar(255) NOT NULL, + `begin` datetime NOT NULL, + `end` datetime NOT NULL, + `location` varchar(255) NOT NULL, + `method` enum('','videoConference','interview','questionnaire','telephoneInterview') 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; +CREATE TABLE `zt_review` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `object` mediumint(8) NOT NULL, + `template` mediumint(8) NOT NULL, + `status` char(30) NOT NULL, + `reviewedBy` varchar(255) NOT NULL, + `auditedBy` varchar(255) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `deadline` date NOT NULL, + `lastReviewedBy` varchar(255) DEFAULT NULL, + `lastReviewedDate` date NOT NULL, + `lastAuditedBy` varchar(255) NOT NULL, + `lastAuditedDate` date NOT NULL, + `lastEditedBy` varchar(255) NOT NULL, + `lastEditedDate` date NOT NULL, + `result` char(30) NOT NULL, + `auditResult` char(30) NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=39 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_reviewcl` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) NOT NULL, + `object` char(30) NOT NULL, + `category` char(30) NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `order` mediumint(8) DEFAULT '0', + `status` varchar(30) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedBy` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=30 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_reviewissue` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `review` mediumint(8) NOT NULL, + `injection` mediumint(8) NOT NULL, + `identify` mediumint(8) NOT NULL, + `type` char(30) NOT NULL DEFAULT 'review', + `listID` mediumint(8) NOT NULL, + `title` varchar(255) NOT NULL, + `opinion` varchar(255) NOT NULL, + `opinionDate` date NOT NULL, + `status` char(30) NOT NULL, + `resolution` char(30) NOT NULL, + `resolutionBy` char(30) NOT NULL, + `resolutionDate` date 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_reviewlist` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) NOT NULL, + `object` char(30) NOT NULL, + `category` char(30) NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `status` varchar(30) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedBy` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_reviewresult` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `review` mediumint(8) NOT NULL, + `type` char(30) NOT NULL DEFAULT 'review', + `result` char(30) NOT NULL, + `opinion` text NOT NULL, + `reviewer` char(30) NOT NULL, + `remainIssue` char(30) NOT NULL, + `createdDate` date NOT NULL, + `consumed` float NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `reviewer` (`review`,`reviewer`,`type`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_risk` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` varchar(255) NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `source` char(30) NOT NULL, + `category` char(30) NOT NULL, + `strategy` char(30) NOT NULL, + `status` varchar(30) NOT NULL DEFAULT 'active', + `impact` char(30) NOT NULL, + `probability` char(30) NOT NULL, + `rate` char(30) NOT NULL, + `pri` char(30) NOT NULL, + `identifiedDate` date NOT NULL, + `prevention` text NOT NULL, + `remedy` text NOT NULL, + `plannedClosedDate` date NOT NULL, + `actualClosedDate` date NOT NULL, + `lib` mediumint(8) unsigned NOT NULL DEFAULT '0', + `from` mediumint(8) unsigned NOT NULL DEFAULT '0', + `version` smallint(6) NOT NULL DEFAULT '1', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `resolution` text NOT NULL, + `resolvedBy` varchar(30) NOT NULL, + `activateBy` varchar(30) NOT NULL, + `activateDate` date NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `closedBy` varchar(30) NOT NULL, + `closedDate` date NOT NULL, + `cancelBy` varchar(30) NOT NULL, + `cancelDate` date NOT NULL, + `cancelReason` char(30) NOT NULL, + `hangupBy` varchar(30) NOT NULL, + `hangupDate` date NOT NULL, + `trackedBy` varchar(30) NOT NULL, + `trackedDate` date NOT NULL, + `assignedDate` date NOT NULL, + `approvedDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) 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` int(10) unsigned NOT NULL AUTO_INCREMENT, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `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_serverroom` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(128) NOT NULL, + `city` varchar(128) NOT NULL, + `line` varchar(20) NOT NULL, + `bandwidth` varchar(128) NOT NULL, + `provider` varchar(128) NOT NULL, + `owner` varchar(30) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` char(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_service` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `external` enum('0','1') NOT NULL DEFAULT '0', + `port` smallint(5) unsigned NOT NULL, + `entry` varchar(255) NOT NULL, + `deploy` varchar(255) NOT NULL, + `version` varchar(64) NOT NULL, + `color` char(7) NOT NULL, + `desc` text, + `dept` varchar(128) NOT NULL, + `devel` varchar(30) NOT NULL, + `qa` varchar(30) NOT NULL, + `ops` varchar(30) NOT NULL, + `hosts` text, + `softName` varchar(128) NOT NULL, + `softVersion` varchar(128) NOT NULL, + `type` varchar(20) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` char(30) NOT NULL, + `editedDate` datetime 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(5) unsigned NOT NULL DEFAULT '0', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_solutions` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `contents` text NOT NULL COMMENT '问题描述', + `support` text NOT NULL COMMENT '是否需要高层支持', + `measures` text NOT NULL COMMENT '解决建议', + `type` char(30) NOT NULL, + `addedBy` varchar(30) NOT NULL, + `addedDate` date NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_sqlview` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(90) NOT NULL, + `code` varchar(45) NOT NULL, + `sql` 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; +CREATE TABLE `zt_stage` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `percent` varchar(255) NOT NULL, + `type` 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', + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=7 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, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `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, + `source` varchar(20) NOT NULL, + `sourceNote` varchar(255) NOT NULL, + `fromBug` mediumint(8) unsigned NOT NULL DEFAULT '0', + `feedback` 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, + `lib` mediumint(8) unsigned NOT NULL DEFAULT '0', + `fromStory` mediumint(8) unsigned NOT NULL DEFAULT '0', + `fromVersion` smallint(6) NOT NULL DEFAULT '1', + `openedBy` varchar(30) NOT NULL DEFAULT '', + `openedDate` datetime NOT NULL, + `assignedTo` varchar(30) NOT NULL DEFAULT '', + `assignedDate` datetime NOT NULL, + `approvedDate` date 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, + `activatedDate` datetime 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', + `storyChanged` enum('0','1') NOT NULL DEFAULT '0', + `feedbackBy` varchar(100) NOT NULL, + `notifyEmail` varchar(100) NOT NULL, + `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', + `feedback` mediumint(8) unsigned NOT NULL, + `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, + `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` datetime NOT NULL, + `repo` mediumint(8) unsigned NOT NULL, + `mr` 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, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + 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, + 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 '', + `position` varchar(30) NOT NULL, + `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, + `deploy` mediumint(8) unsigned 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, + `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, + `feedback` mediumint(8) unsigned NOT NULL, + `type` char(15) 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', + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + PRIMARY KEY (`id`), + KEY `account` (`account`), + KEY `assignedTo` (`assignedTo`), + KEY `finishedBy` (`finishedBy`), + KEY `date` (`date`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_traincategory` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` char(30) NOT NULL DEFAULT '', + `parent` mediumint(8) unsigned NOT NULL DEFAULT '0', + `path` char(255) NOT NULL DEFAULT '', + `grade` tinyint(3) NOT NULL, + `order` mediumint(8) NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `parent` (`parent`), + KEY `path` (`path`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_traincontents` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `code` varchar(50) NOT NULL, + `course` mediumint(8) unsigned NOT NULL DEFAULT '0', + `name` varchar(255) NOT NULL, + `type` varchar(30) NOT NULL, + `parent` mediumint(8) unsigned NOT NULL DEFAULT '0', + `path` char(255) NOT NULL DEFAULT '', + `desc` text NOT NULL, + `order` mediumint(8) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` tinyint(1) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_traincourse` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `code` varchar(50) NOT NULL, + `category` mediumint(8) NOT NULL, + `name` varchar(255) NOT NULL, + `status` varchar(10) NOT NULL, + `teacher` varchar(30) NOT NULL DEFAULT '', + `desc` text NOT NULL, + `createdBy` varchar(255) NOT NULL, + `createdDate` date NOT NULL, + `editedBy` varchar(255) NOT NULL, + `editedDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_trainplan` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + `place` varchar(255) NOT NULL, + `trainee` text NOT NULL, + `lecturer` varchar(20) NOT NULL, + `type` enum('inside','outside') NOT NULL DEFAULT 'inside', + `status` varchar(20) NOT NULL, + `summary` text NOT NULL, + `createdBy` char(30) DEFAULT 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_trainrecords` ( + `user` char(30) NOT NULL, + `objectId` mediumint(8) unsigned NOT NULL, + `objectType` varchar(10) NOT NULL, + `status` varchar(10) NOT NULL, + PRIMARY KEY (`user`,`objectId`,`objectType`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_trip` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `type` enum('trip','egress') NOT NULL DEFAULT 'trip', + `customers` varchar(20) NOT NULL, + `name` char(30) NOT NULL, + `desc` text NOT NULL, + `year` char(4) NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + `start` time NOT NULL, + `finish` time NOT NULL, + `from` char(50) NOT NULL, + `to` char(50) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `year` (`year`), + KEY `createdBy` (`createdBy`) +) 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 '', + `pinyin` varchar(255) 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', + `visions` varchar(20) NOT NULL DEFAULT 'rnd,lite', + `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', + `feedback` enum('0','1') NOT NULL DEFAULT '0', + `ranzhi` char(30) NOT NULL DEFAULT '', + `ldap` char(30) NOT NULL, + `score` int(11) NOT NULL DEFAULT '0', + `scoreLevel` int(11) NOT NULL DEFAULT '0', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + `clientStatus` enum('online','away','busy','offline','meeting') NOT NULL DEFAULT 'offline', + `clientLang` varchar(10) NOT NULL DEFAULT 'zh-cn', + PRIMARY KEY (`id`), + UNIQUE KEY `account` (`account`), + KEY `dept` (`dept`), + KEY `email` (`email`), + KEY `commiter` (`commiter`), + KEY `deleted` (`deleted`) +) ENGINE=MyISAM AUTO_INCREMENT=2 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', + `common` 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_vm` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `hostID` int(10) unsigned NOT NULL DEFAULT '0', + `name` varchar(255) NOT NULL DEFAULT '', + `osCategory` varchar(50) NOT NULL DEFAULT '', + `osType` varchar(50) NOT NULL DEFAULT '', + `osArch` varchar(50) NOT NULL DEFAULT '', + `osLang` varchar(50) NOT NULL DEFAULT '', + `status` varchar(50) NOT NULL DEFAULT '', + `destroyAt` datetime DEFAULT NULL, + `ip` varchar(200) NOT NULL DEFAULT '', + `agentPort` varchar(255) NOT NULL DEFAULT '', + `macAddress` varchar(255) NOT NULL DEFAULT '', + `workspace` varchar(255) NOT NULL DEFAULT '', + `templateID` int(10) unsigned NOT NULL DEFAULT '0', + `baseImageID` int(10) unsigned NOT NULL DEFAULT '0', + `baseImagePath` varchar(255) NOT NULL DEFAULT '', + `desc` varchar(255) NOT NULL DEFAULT '', + `heatbeat` datetime DEFAULT NULL, + `vnc` varchar(255) NOT NULL DEFAULT '', + `instance` varchar(255) NOT NULL DEFAULT '', + `eip` varchar(255) NOT NULL DEFAULT '', + `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', + `public` varchar(50) NOT NULL DEFAULT '', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_vmtemplate` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `hostID` int(10) unsigned NOT NULL DEFAULT '0', + `templateName` varchar(255) NOT NULL DEFAULT '', + `osType` varchar(50) NOT NULL DEFAULT '', + `osCategory` varchar(50) NOT NULL DEFAULT '', + `status` varchar(50) NOT NULL DEFAULT '', + PRIMARY KEY (`id`) +) 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; +CREATE TABLE `zt_weeklyreport` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `weekStart` date NOT NULL, + `pv` float(9,2) NOT NULL, + `ev` float(9,2) NOT NULL, + `ac` float(9,2) NOT NULL, + `sv` float(9,2) NOT NULL, + `cv` float(9,2) NOT NULL, + `staff` smallint(5) unsigned NOT NULL, + `progress` varchar(255) NOT NULL, + `workload` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `week` (`project`,`weekStart`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workestimation` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `scale` decimal(10,2) unsigned NOT NULL, + `productivity` decimal(10,2) unsigned NOT NULL, + `duration` decimal(10,2) unsigned NOT NULL, + `unitLaborCost` decimal(10,2) unsigned NOT NULL, + `totalLaborCost` decimal(10,2) unsigned NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + `dayHour` decimal(10,2) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflow` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `parent` varchar(30) NOT NULL, + `child` varchar(30) NOT NULL, + `type` varchar(10) NOT NULL DEFAULT 'flow', + `navigator` varchar(10) NOT NULL, + `app` varchar(20) NOT NULL, + `position` varchar(30) NOT NULL, + `module` varchar(30) NOT NULL, + `table` varchar(50) NOT NULL, + `name` varchar(30) NOT NULL, + `titleField` varchar(30) NOT NULL, + `contentField` text NOT NULL, + `flowchart` text NOT NULL, + `js` text NOT NULL, + `css` text NOT NULL, + `order` smallint(5) unsigned NOT NULL, + `buildin` tinyint(1) unsigned NOT NULL, + `administrator` text NOT NULL, + `desc` text NOT NULL, + `version` varchar(10) NOT NULL DEFAULT '1.0', + `status` varchar(10) NOT NULL DEFAULT 'wait', + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unique` (`app`,`module`,`vision`), + KEY `type` (`type`), + KEY `app` (`app`), + KEY `module` (`module`), + KEY `order` (`order`) +) ENGINE=MyISAM AUTO_INCREMENT=19 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowaction` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `module` varchar(30) NOT NULL, + `action` varchar(50) NOT NULL, + `method` varchar(50) NOT NULL, + `name` varchar(50) NOT NULL, + `type` enum('single','batch') NOT NULL DEFAULT 'single', + `batchMode` enum('same','different') NOT NULL DEFAULT 'different', + `extensionType` varchar(10) NOT NULL DEFAULT 'override' COMMENT 'none | extend | override', + `open` varchar(20) NOT NULL, + `position` enum('menu','browseandview','browse','view') NOT NULL DEFAULT 'browseandview', + `layout` char(20) NOT NULL, + `show` enum('dropdownlist','direct') NOT NULL DEFAULT 'dropdownlist', + `order` smallint(5) unsigned NOT NULL, + `buildin` tinyint(1) unsigned NOT NULL, + `virtual` tinyint(1) unsigned NOT NULL, + `conditions` text NOT NULL, + `verifications` text NOT NULL, + `hooks` text NOT NULL, + `linkages` text NOT NULL, + `js` text NOT NULL, + `css` text NOT NULL, + `toList` char(255) NOT NULL, + `blocks` text NOT NULL, + `desc` text NOT NULL, + `status` varchar(10) NOT NULL DEFAULT 'enable', + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unique` (`module`,`action`,`vision`), + KEY `module` (`module`), + KEY `action` (`action`), + KEY `order` (`order`) +) ENGINE=MyISAM AUTO_INCREMENT=190 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowdatasource` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `type` enum('system','sql','func','option','lang','category') NOT NULL DEFAULT 'option', + `name` varchar(30) NOT NULL, + `code` varchar(30) NOT NULL, + `datasource` text NOT NULL, + `view` varchar(20) NOT NULL, + `keyField` varchar(50) NOT NULL, + `valueField` varchar(50) NOT NULL, + `buildin` tinyint(1) unsigned NOT NULL, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` char(30) NOT NULL, + `editedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `type` (`type`) +) ENGINE=MyISAM AUTO_INCREMENT=71 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowfield` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `module` varchar(30) NOT NULL, + `field` varchar(50) NOT NULL, + `type` varchar(20) NOT NULL DEFAULT 'varchar', + `length` varchar(10) NOT NULL, + `name` varchar(50) NOT NULL, + `control` varchar(20) NOT NULL, + `expression` text NOT NULL, + `options` text NOT NULL, + `default` varchar(100) NOT NULL, + `rules` varchar(255) NOT NULL, + `placeholder` varchar(100) NOT NULL, + `order` smallint(5) unsigned NOT NULL, + `searchOrder` smallint(5) unsigned NOT NULL DEFAULT '0', + `exportOrder` smallint(5) unsigned NOT NULL DEFAULT '0', + `canExport` enum('0','1') NOT NULL DEFAULT '0', + `canSearch` enum('0','1') NOT NULL DEFAULT '0', + `isValue` enum('0','1') NOT NULL DEFAULT '0', + `readonly` enum('0','1') NOT NULL DEFAULT '0', + `buildin` tinyint(1) unsigned NOT NULL, + `desc` text NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unique` (`module`,`field`), + KEY `module` (`module`), + KEY `field` (`field`), + KEY `order` (`order`) +) ENGINE=MyISAM AUTO_INCREMENT=360 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowlabel` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `module` varchar(30) NOT NULL, + `action` varchar(30) NOT NULL DEFAULT 'browse', + `code` varchar(30) NOT NULL, + `label` varchar(255) NOT NULL, + `params` text NOT NULL, + `orderBy` text NOT NULL, + `order` tinyint(3) NOT NULL, + `buildin` tinyint(1) unsigned NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` char(30) NOT NULL, + `editedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `module` (`module`) +) ENGINE=MyISAM AUTO_INCREMENT=53 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowlayout` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `module` varchar(30) NOT NULL, + `action` varchar(50) NOT NULL, + `field` varchar(50) NOT NULL, + `order` smallint(5) unsigned NOT NULL, + `width` smallint(5) NOT NULL, + `position` text NOT NULL, + `readonly` enum('0','1') NOT NULL DEFAULT '0', + `mobileShow` enum('0','1') NOT NULL DEFAULT '1', + `summary` varchar(20) NOT NULL, + `defaultValue` text NOT NULL, + `layoutRules` varchar(255) NOT NULL, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + PRIMARY KEY (`id`), + UNIQUE KEY `unique` (`module`,`action`,`field`,`vision`), + KEY `module` (`module`), + KEY `action` (`action`), + KEY `order` (`order`) +) ENGINE=MyISAM AUTO_INCREMENT=138 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowlinkdata` ( + `objectType` varchar(30) NOT NULL, + `objectID` mediumint(8) unsigned NOT NULL, + `linkedType` varchar(30) NOT NULL, + `linkedID` mediumint(8) unsigned NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + UNIQUE KEY `unique` (`objectType`,`objectID`,`linkedType`,`linkedID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowrelation` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `prev` varchar(30) NOT NULL, + `next` varchar(30) NOT NULL, + `field` varchar(50) NOT NULL, + `actions` varchar(20) NOT NULL, + `actionCodes` text NOT NULL, + `buildin` enum('0','1') NOT NULL DEFAULT '0', + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowrelationlayout` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `prev` varchar(30) NOT NULL, + `next` varchar(30) NOT NULL, + `action` varchar(50) NOT NULL, + `field` varchar(50) NOT NULL, + `order` smallint(5) unsigned NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unique` (`prev`,`next`,`action`,`field`), + KEY `prev` (`prev`), + KEY `next` (`next`), + KEY `action` (`action`), + KEY `order` (`order`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowreport` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `module` varchar(30) NOT NULL COMMENT 'module name', + `name` varchar(100) NOT NULL COMMENT 'report name', + `type` enum('pie','line','bar') NOT NULL DEFAULT 'pie' COMMENT 'report type', + `countType` enum('sum','count') NOT NULL DEFAULT 'sum' COMMENT 'report count method', + `displayType` enum('value','percent') NOT NULL DEFAULT 'value' COMMENT 'report display method', + `dimension` varchar(130) NOT NULL COMMENT 'dimension field code of zt_workflowfield', + `fields` text NOT NULL COMMENT 'count fileds code of zt_workflowfield,use comma split', + `order` smallint(5) unsigned NOT NULL DEFAULT '0', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowrule` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `type` enum('system','regex','func') NOT NULL DEFAULT 'regex', + `name` varchar(30) NOT NULL, + `rule` text NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` char(30) NOT NULL, + `editedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `type` (`type`) +) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowsql` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `module` varchar(30) NOT NULL, + `field` varchar(50) NOT NULL, + `action` varchar(50) NOT NULL, + `sql` text NOT NULL, + `vars` text NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `module` (`module`), + KEY `field` (`field`), + KEY `action` (`action`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowversion` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `module` varchar(30) NOT NULL, + `version` varchar(10) NOT NULL, + `fields` text NOT NULL, + `actions` text NOT NULL, + `layouts` text NOT NULL, + `sqls` text NOT NULL, + `labels` text NOT NULL, + `table` text NOT NULL, + `datas` text NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `moduleversion` (`module`,`version`), + KEY `module` (`module`), + KEY `version` (`version`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_zoutput` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `activity` mediumint(8) NOT NULL, + `name` varchar(255) NOT NULL, + `content` text NOT NULL, + `optional` char(20) NOT NULL, + `tailorNorm` varchar(255) NOT NULL, + `status` varchar(30) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `order` mediumint(8) DEFAULT '0', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=130 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_dayactions` AS SELECT + 1 AS `actions`, + 1 AS `day`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_daybugopen` AS SELECT + 1 AS `bugopen`, + 1 AS `day`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_daybugresolve` AS SELECT + 1 AS `bugresolve`, + 1 AS `day`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_dayeffort` AS SELECT + 1 AS `consumed`, + 1 AS `date`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_daystoryclose` AS SELECT + 1 AS `storyclose`, + 1 AS `day`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_daystoryopen` AS SELECT + 1 AS `storyopen`, + 1 AS `day`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_daytaskfinish` AS SELECT + 1 AS `taskfinish`, + 1 AS `day`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_daytaskopen` AS SELECT + 1 AS `taskopen`, + 1 AS `day`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_dayuserlogin` AS SELECT + 1 AS `userlogin`, + 1 AS `day`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_executionsummary` AS SELECT + 1 AS `execution`, + 1 AS `estimate`, + 1 AS `consumed`, + 1 AS `left`, + 1 AS `number`, + 1 AS `undone`, + 1 AS `totalReal`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_productbugs` AS SELECT + 1 AS `product`, + 1 AS `bugs`, + 1 AS `resolutions`, + 1 AS `seriousBugs`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_productstories` AS SELECT + 1 AS `product`, + 1 AS `stories`, + 1 AS `undone`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_projectbugs` AS SELECT + 1 AS `execution`, + 1 AS `bugs`, + 1 AS `resolutions`, + 1 AS `seriousBugs`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_projectstories` AS SELECT + 1 AS `execution`, + 1 AS `stories`, + 1 AS `undone`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_projectsummary` AS SELECT + 1 AS `project`, + 1 AS `estimate`, + 1 AS `consumed`, + 1 AS `left`, + 1 AS `number`, + 1 AS `undone`, + 1 AS `totalReal`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_projectteams` AS SELECT + 1 AS `execution`, + 1 AS `teams`*/; +SET character_set_client = @saved_cs_client; +/*!50001 DROP VIEW IF EXISTS `view_datasource_10`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `view_datasource_10` AS select `zt_build`.`id` AS `id`,`zt_build`.`name` AS `name` from `zt_build` where (`zt_build`.`deleted` = '0') */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `view_datasource_11`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `view_datasource_11` AS select `zt_module`.`id` AS `id`,`zt_module`.`name` AS `name` from `zt_module` where (`zt_module`.`deleted` = '0') */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `view_datasource_12`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `view_datasource_12` AS select `zt_productplan`.`id` AS `id`,`zt_productplan`.`title` AS `title` from `zt_productplan` where (`zt_productplan`.`deleted` = '0') */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `view_datasource_4`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `view_datasource_4` AS select `zt_story`.`id` AS `id`,`zt_story`.`title` AS `title` from `zt_story` where (`zt_story`.`deleted` = '0') */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `view_datasource_41`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `view_datasource_41` AS select `zt_case`.`id` AS `id`,`zt_case`.`title` AS `title` from `zt_case` where (`zt_case`.`deleted` = '0') */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `view_datasource_46`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `view_datasource_46` AS select `zt_task`.`id` AS `id`,`zt_task`.`name` AS `name` from `zt_task` where ((`zt_task`.`deleted` = '0') and (`zt_task`.`vision` = 'lite')) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `view_datasource_5`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `view_datasource_5` AS select `zt_task`.`id` AS `id`,`zt_task`.`name` AS `name` from `zt_task` where ((`zt_task`.`deleted` = '0') and (`zt_task`.`vision` = 'rnd')) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `view_datasource_6`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `view_datasource_6` AS select `zt_bug`.`id` AS `id`,`zt_bug`.`title` AS `title` from `zt_bug` where (`zt_bug`.`deleted` = '0') */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_dayactions`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_dayactions` AS select count(0) AS `actions`,left(`zt_action`.`date`,10) AS `day` from `zt_action` group by left(`zt_action`.`date`,10) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_daybugopen`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_daybugopen` AS select count(0) AS `bugopen`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'bug') and (`zt_action`.`action` = 'opened')) group by left(`zt_action`.`date`,10) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_daybugresolve`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_daybugresolve` AS select count(0) AS `bugresolve`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'bug') and (`zt_action`.`action` = 'resolved')) group by left(`zt_action`.`date`,10) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_dayeffort`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_dayeffort` AS select round(sum(`zt_effort`.`consumed`),1) AS `consumed`,`zt_effort`.`date` AS `date` from `zt_effort` group by `zt_effort`.`date` */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_daystoryclose`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_daystoryclose` AS select count(0) AS `storyclose`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'story') and (`zt_action`.`action` = 'closed')) group by left(`zt_action`.`date`,10) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_daystoryopen`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_daystoryopen` AS select count(0) AS `storyopen`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'story') and (`zt_action`.`action` = 'opened')) group by left(`zt_action`.`date`,10) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_daytaskfinish`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_daytaskfinish` AS select count(0) AS `taskfinish`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'task') and (`zt_action`.`action` = 'finished')) group by left(`zt_action`.`date`,10) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_daytaskopen`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_daytaskopen` AS select count(0) AS `taskopen`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'task') and (`zt_action`.`action` = 'opened')) group by left(`zt_action`.`date`,10) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_dayuserlogin`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_dayuserlogin` AS select count(0) AS `userlogin`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'user') and (`zt_action`.`action` = 'login')) group by left(`zt_action`.`date`,10) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_executionsummary`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_executionsummary` AS select `zt_task`.`execution` AS `execution`,sum(if((`zt_task`.`parent` >= '0'),`zt_task`.`estimate`,0)) AS `estimate`,sum(if((`zt_task`.`parent` >= '0'),`zt_task`.`consumed`,0)) AS `consumed`,sum(if(((`zt_task`.`status` <> 'cancel') and (`zt_task`.`status` <> 'closed') and (`zt_task`.`parent` >= '0')),`zt_task`.`left`,0)) AS `left`,count(0) AS `number`,sum(if(((`zt_task`.`status` <> 'done') and (`zt_task`.`status` <> 'closed')),1,0)) AS `undone`,sum((if((`zt_task`.`parent` >= '0'),`zt_task`.`consumed`,0) + if(((`zt_task`.`status` <> 'cancel') and (`zt_task`.`status` <> 'closed') and (`zt_task`.`parent` >= '0')),`zt_task`.`left`,0))) AS `totalReal` from `zt_task` where (`zt_task`.`deleted` = '0') group by `zt_task`.`execution` */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_productbugs`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_productbugs` AS select `zt_bug`.`product` AS `product`,count(0) AS `bugs`,sum(if((`zt_bug`.`resolution` = ''),0,1)) AS `resolutions`,sum(if((`zt_bug`.`severity` <= 2),1,0)) AS `seriousBugs` from `zt_bug` where (`zt_bug`.`deleted` = '0') group by `zt_bug`.`product` */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_productstories`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_productstories` AS select `zt_story`.`product` AS `product`,count('*') AS `stories`,sum(if((`zt_story`.`status` = 'closed'),0,1)) AS `undone` from `zt_story` where (`zt_story`.`deleted` = '0') group by `zt_story`.`product` */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_projectbugs`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_projectbugs` AS select `zt_bug`.`execution` AS `execution`,count(0) AS `bugs`,sum(if((`zt_bug`.`resolution` = ''),0,1)) AS `resolutions`,sum(if((`zt_bug`.`severity` <= 2),1,0)) AS `seriousBugs` from `zt_bug` where (`zt_bug`.`deleted` = '0') group by `zt_bug`.`execution` */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_projectstories`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_projectstories` AS select `t1`.`project` AS `execution`,count('*') AS `stories`,sum(if((`t2`.`status` = 'closed'),0,1)) AS `undone` from ((`zt_projectstory` `t1` left join `zt_story` `t2` on((`t1`.`story` = `t2`.`id`))) left join `zt_project` `t3` on((`t1`.`project` = `t3`.`id`))) where ((`t2`.`deleted` = '0') and (`t3`.`type` in ('sprint','stage'))) group by `t1`.`project` */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_projectsummary`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_projectsummary` AS select `zt_task`.`project` AS `project`,sum(if((`zt_task`.`parent` >= '0'),`zt_task`.`estimate`,0)) AS `estimate`,sum(if((`zt_task`.`parent` >= '0'),`zt_task`.`consumed`,0)) AS `consumed`,sum(if(((`zt_task`.`status` <> 'cancel') and (`zt_task`.`status` <> 'closed') and (`zt_task`.`parent` >= '0')),`zt_task`.`left`,0)) AS `left`,count(0) AS `number`,sum(if(((`zt_task`.`status` <> 'done') and (`zt_task`.`status` <> 'closed')),1,0)) AS `undone`,sum((if((`zt_task`.`parent` >= '0'),`zt_task`.`consumed`,0) + if(((`zt_task`.`status` <> 'cancel') and (`zt_task`.`status` <> 'closed') and (`zt_task`.`parent` >= '0')),`zt_task`.`left`,0))) AS `totalReal` from `zt_task` where (`zt_task`.`deleted` = '0') group by `zt_task`.`project` */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_projectteams`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_projectteams` AS select `zt_team`.`root` AS `execution`,count('*') AS `teams` from `zt_team` where (`zt_team`.`type` = 'execution') group by `zt_team`.`root` */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; diff --git a/db/update16.4.sql b/db/update16.4.sql index 9109ebb368..da6ff44dc8 100644 --- a/db/update16.4.sql +++ b/db/update16.4.sql @@ -11,7 +11,7 @@ ALTER TABLE `zt_doc` ADD `vision` varchar(10) NOT NULL DEFAULT 'rnd' AFTER `id`; ALTER TABLE `zt_doclib` ADD `vision` varchar(10) NOT NULL DEFAULT 'rnd' AFTER `type`; ALTER TABLE `zt_action` ADD `vision` varchar(10) NOT NULL DEFAULT 'rnd' AFTER `read`; ALTER TABLE `zt_searchindex` ADD `vision` varchar(10) NOT NULL DEFAULT 'rnd' AFTER `id`; -ALTER TABLE `zt_config` ADD `vision` varchar(10) NOT NULL DEFAULT '' AFTER `id`; +ALTER TABLE `zt_config` ADD `vision` varchar(10) NOT NULL DEFAULT 'rnd' AFTER `id`; ALTER TABLE `zt_config` DROP INDEX `unique`, ADD UNIQUE `unique` (`vision`,`owner`,`module`,`section`,`key`); ALTER TABLE `zt_todo` ADD `vision` varchar(10) NOT NULL DEFAULT 'rnd' AFTER `deleted`; ALTER TABLE `zt_block` ADD `vision` varchar(10) NOT NULL DEFAULT 'rnd' AFTER `account`; diff --git a/db/zentao.sql b/db/zentao.sql index 6774045bda..accdf19b9b 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -359,7 +359,7 @@ CREATE TABLE IF NOT EXISTS `zt_compile` ( -- DROP TABLE IF EXISTS `zt_config`; CREATE TABLE IF NOT EXISTS `zt_config` ( `id` mediumint(8) unsigned NOT NULL auto_increment, - `vision` varchar(10) NOT NULL DEFAULT '', + `vision` varchar(10) NOT NULL DEFAULT 'rnd', `owner` char(30) NOT NULL default '', `module` varchar(30) NOT NULL, `section` char(30) NOT NULL default '', diff --git a/module/custom/model.php b/module/custom/model.php index 15dc1f03d2..8b4eeb4f8d 100644 --- a/module/custom/model.php +++ b/module/custom/model.php @@ -76,7 +76,8 @@ class customModel extends model $item->key = $key; $item->value = $value; $item->system = $system; - $item->vision = $this->config->vision; + + if(!defined('IN_UPGRADE')) $item->vision = $this->config->vision; $this->dao->replace(TABLE_LANG)->data($item)->exec(); } diff --git a/module/setting/model.php b/module/setting/model.php index b9e0d29cf4..72e55e0482 100644 --- a/module/setting/model.php +++ b/module/setting/model.php @@ -51,8 +51,8 @@ class settingModel extends model { /* Determine vision of config item. */ $pathVision = explode('@', $path); - $vision = isset($pathVision[1]) ? $pathVision[1] : ''; - $path = $pathVision[0]; + $vision = isset($pathVision[1]) ? $pathVision[1] : ''; + $path = $pathVision[0]; /* fix bug when account has dot. */ $account = isset($this->app->user->account) ? $this->app->user->account : ''; @@ -78,8 +78,7 @@ class settingModel extends model $item->key = $key; $item->value = $value; - /* If in upgrade, skip vision. */ - if(!defined('IN_UPGRADE')) $item->vision = $vision; + if($vision) $item->vision = $vision; $this->dao->replace(TABLE_CONFIG)->data($item)->exec(); } From 3c75a1555e6825565241e8c086d312a6c31111af Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 14 Mar 2022 14:39:59 +0800 Subject: [PATCH 03/10] * Add auto test of task. --- test/class/task.class.php | 232 +++++++++++++++++- test/model/task/computeBeginAndEnd.php | 8 +- test/model/task/getUserTasks.php | 1 + .../task/getdataoffinishedtasksperday.php | 19 ++ .../task/getdataoftasksperassignedto.php | 19 ++ .../task/getdataoftasksperclosedreason.php | 19 ++ test/model/task/getdataoftasksperconsumed.php | 31 +++ test/model/task/getdataoftasksperdeadline.php | 32 +++ test/model/task/getdataoftasksperestimate.php | 33 +++ .../model/task/getdataoftasksperexecution.php | 31 +++ .../task/getdataoftasksperfinishedby.php | 19 ++ test/model/task/getdataoftasksperleft.php | 33 +++ test/model/task/getdataoftaskspermodule.php | 24 ++ test/model/task/getdataoftasksperpri.php | 25 ++ test/model/task/getdataoftasksperstatus.php | 29 +++ test/model/task/getdataoftaskspertype.php | 26 ++ test/model/task/processdata4report.php | 86 +++++++ test/model/task/processtask.php | 15 +- test/model/task/processtasks.php | 70 +----- test/model/task/update.php | 10 +- 20 files changed, 684 insertions(+), 78 deletions(-) create mode 100755 test/model/task/getdataoffinishedtasksperday.php create mode 100755 test/model/task/getdataoftasksperassignedto.php create mode 100755 test/model/task/getdataoftasksperclosedreason.php create mode 100755 test/model/task/getdataoftasksperconsumed.php create mode 100755 test/model/task/getdataoftasksperdeadline.php create mode 100755 test/model/task/getdataoftasksperestimate.php create mode 100755 test/model/task/getdataoftasksperexecution.php create mode 100755 test/model/task/getdataoftasksperfinishedby.php create mode 100755 test/model/task/getdataoftasksperleft.php create mode 100755 test/model/task/getdataoftaskspermodule.php create mode 100755 test/model/task/getdataoftasksperpri.php create mode 100755 test/model/task/getdataoftasksperstatus.php create mode 100755 test/model/task/getdataoftaskspertype.php create mode 100755 test/model/task/processdata4report.php diff --git a/test/class/task.class.php b/test/class/task.class.php index 0587227940..bbb57bbf81 100644 --- a/test/class/task.class.php +++ b/test/class/task.class.php @@ -640,6 +640,7 @@ class taskTest public function processTaskTest($task) { + $task->deadline = $task->deadline == '-1day' ? date('Y-m-d',strtotime('-1 day')) : date('Y-m-d',strtotime('+1 day')); $object = $this->objectModel->processTask($task); if(dao::isError()) @@ -652,8 +653,33 @@ class taskTest } } - public function processTasksTest($tasks) + public function processTasksTest($executionID) { + global $tester; + $tasks = $tester->dao->select('*')->from(TABLE_TASK)->where('execution')->eq($executionID)->andWhere('deleted')->eq('0')->fetchAll('id'); + $parents = '0'; + foreach($tasks as $task) + { + if($task->parent > 0) $parents .= ",$task->parent"; + } + $parents = $tester->dao->select('*')->from(TABLE_TASK)->where('`id`')->in($parents)->andWhere('deleted')->eq('0')->fetchAll('id'); + foreach($tasks as $task) + { + if($task->parent > 0) + { + if(isset($tasks[$task->parent])) + { + $tasks[$task->parent]->children[$task->id] = $task; + unset($tasks[$task->id]); + } + else + { + $parent = $parents[$task->parent]; + $task->parentName = $parent->name; + } + } + } + $object = $this->objectModel->processTasks($tasks); if(dao::isError()) @@ -665,4 +691,208 @@ class taskTest return $object; } } + + public function processData4ReportTest($tasks, $children, $field) + { + $object = $this->objectModel->processData4Report($tasks, $children, $field); + + $object['void'] = isset($object['']) ? $object[''] : 'void'; + + if(dao::isError()) + { + return dao::getError(); + } + else + { + if($field == 'deadline') + { + $dateList = array(date('Y-m-d',strtotime('-8 day')), date('Y-m-d',strtotime('-15 day'))); + return array($object[$dateList[0]], $object[$dateList[1]]); + } + return count($object) == 0 ? array('void' => 'void') : $object; + } + } + + public function getDataOfTasksPerExecutionTest() + { + $object = $this->objectModel->getDataOfTasksPerExecution(); + + if(dao::isError()) + { + return dao::getError(); + } + else + { + return $object; + } + } + + public function getDataOfTasksPerModuleTest() + { + $object = $this->objectModel->getDataOfTasksPerModule(); + + if(dao::isError()) + { + return dao::getError(); + } + else + { + return $object; + } + } + + public function getDataOfTasksPerAssignedToTest() + { + $object = $this->objectModel->getDataOfTasksPerAssignedTo(); + + if(dao::isError()) + { + return dao::getError(); + } + else + { + return $object; + } + } + + public function getDataOfTasksPerTypeTest() + { + $object = $this->objectModel->getDataOfTasksPerType(); + + if(dao::isError()) + { + return dao::getError(); + } + else + { + return $object; + } + } + + public function getDataOfTasksPerPriTest() + { + $object = $this->objectModel->getDataOfTasksPerPri(); + + if(dao::isError()) + { + return dao::getError(); + } + else + { + return $object; + } + } + + public function getDataOfTasksPerDeadlineTest($dateID) + { + $dateList = array(date('Y-m-d',strtotime('+1 day')), date('Y-m-d',strtotime('+2 day')), date('Y-m-d',strtotime('+3 day')), date('Y-m-d',strtotime('+4 day')), date('Y-m-d',strtotime('-1 day')), date('Y-m-d',strtotime('-2 day')), date('Y-m-d',strtotime('-3 day')), date('Y-m-d',strtotime('-4 day'))); + $object = $this->objectModel->getDataOfTasksPerDeadline(); + + if(dao::isError()) + { + return dao::getError(); + } + else + { + return array($dateID => $object[$dateList[$dateID]]); + } + } + + public function getDataOfTasksPerEstimateTest() + { + $object = $this->objectModel->getDataOfTasksPerEstimate(); + + if(dao::isError()) + { + return dao::getError(); + } + else + { + return $object; + } + } + + public function getDataOfTasksPerLeftTest() + { + $object = $this->objectModel->getDataOfTasksPerLeft(); + + if(dao::isError()) + { + return dao::getError(); + } + else + { + return $object; + } + } + + public function getDataOfTasksPerConsumedTest() + { + $object = $this->objectModel->getDataOfTasksPerConsumed(); + + if(dao::isError()) + { + return dao::getError(); + } + else + { + return $object; + } + } + + public function getDataOfTasksPerFinishedByTest() + { + $object = $this->objectModel->getDataOfTasksPerFinishedBy(); + + if(dao::isError()) + { + return dao::getError(); + } + else + { + return $object; + } + } + + public function getDataOfTasksPerClosedReasonTest() + { + $object = $this->objectModel->getDataOfTasksPerClosedReason(); + + if(dao::isError()) + { + return dao::getError(); + } + else + { + return $object; + } + } + + public function getDataOffinishedTasksPerDayTest() + { + $object = $this->objectModel->getDataOffinishedTasksPerDay(); + + if(dao::isError()) + { + return dao::getError(); + } + else + { + return $object; + } + } + + public function getDataOfTasksPerStatusTest() + { + $object = $this->objectModel->getDataOfTasksPerStatus(); + + if(dao::isError()) + { + return dao::getError(); + } + else + { + return $object; + } + } } diff --git a/test/model/task/computeBeginAndEnd.php b/test/model/task/computeBeginAndEnd.php index ef62089605..7a77dd45b1 100755 --- a/test/model/task/computeBeginAndEnd.php +++ b/test/model/task/computeBeginAndEnd.php @@ -10,8 +10,8 @@ title=taskModel->computeBeginAndEnd(); cid=1 pid=1 -根据taskID计算没有父计划的开始结束时间 >> 1,2022-03-11,0000-00-00 00:00:00,2022-03-18 -根据taskID计算有父计划的父开始结束时间 >> 601,,0000-00-00 00:00:00,2022-03-04 +根据taskID计算没有父计划的开始结束时间 >> 1,2022-03-14,0000-00-00 00:00:00,2022-03-21 +根据taskID计算有父计划的父开始结束时间 >> 601,,0000-00-00 00:00:00,2022-03-07 根据不存在的taskID计划开始结束时间 >> 0 */ @@ -19,7 +19,7 @@ pid=1 $taskIDList = array('1', '901', '100001'); $task = new taskTest(); -r($task->computeBeginAndEndTest($taskIDList[0])) && p('id,estStarted,realStarted,deadline') && e('1,2022-03-11,0000-00-00 00:00:00,2022-03-18'); //根据taskID计算没有父计划的开始结束时间 -r($task->computeBeginAndEndTest($taskIDList[1])) && p('id,estStarted,realStarted,deadline') && e('601,,0000-00-00 00:00:00,2022-03-04'); //根据taskID计算有父计划的父开始结束时间 +r($task->computeBeginAndEndTest($taskIDList[0])) && p('id,estStarted,realStarted,deadline') && e('1,2022-03-14,0000-00-00 00:00:00,2022-03-21'); //根据taskID计算没有父计划的开始结束时间 +r($task->computeBeginAndEndTest($taskIDList[1])) && p('id,estStarted,realStarted,deadline') && e('601,,0000-00-00 00:00:00,2022-03-07'); //根据taskID计算有父计划的父开始结束时间 r($task->computeBeginAndEndTest($taskIDList[2])) && p('id,estStarted,realStarted,deadline') && e('0'); //根据不存在的taskID计算开始结束时间 system("./ztest init"); diff --git a/test/model/task/getUserTasks.php b/test/model/task/getUserTasks.php index 8032fb1e27..828325c25c 100755 --- a/test/model/task/getUserTasks.php +++ b/test/model/task/getUserTasks.php @@ -19,3 +19,4 @@ $assignedTo = 'user92'; $task = new taskTest(); r($task->getUserTasksTest($taskID,$assignedTo)) && p('2:name') && e('开发任务12'); // 根据指派人员查看任务 +system("./ztest init"); diff --git a/test/model/task/getdataoffinishedtasksperday.php b/test/model/task/getdataoffinishedtasksperday.php new file mode 100755 index 0000000000..ca492e4194 --- /dev/null +++ b/test/model/task/getdataoffinishedtasksperday.php @@ -0,0 +1,19 @@ +#!/usr/bin/env php +getDataOffinishedTasksPerDay(); +cid=1 +pid=1 + +统计没有每日完成的任务数量 >> 0 + +*/ + + +$task = new taskTest(); +r($task->getDataOffinishedTasksPerDayTest()) && p() && e('0'); //统计没有每日完成的任务数量 diff --git a/test/model/task/getdataoftasksperassignedto.php b/test/model/task/getdataoftasksperassignedto.php new file mode 100755 index 0000000000..6bacdf81b3 --- /dev/null +++ b/test/model/task/getdataoftasksperassignedto.php @@ -0,0 +1,19 @@ +#!/usr/bin/env php +getDataOfTasksPerAssignedTo(); +cid=1 +pid=1 + +统计指派给为po82的任务数量 >> 研发主管82,1 + +*/ + + +$task = new taskTest(); +r($task->getDataOfTasksPerAssignedToTest()) && p('po82:name,value') && e('研发主管82,1'); //统计指派给为po82的任务数量 diff --git a/test/model/task/getdataoftasksperclosedreason.php b/test/model/task/getdataoftasksperclosedreason.php new file mode 100755 index 0000000000..4c13e5da18 --- /dev/null +++ b/test/model/task/getdataoftasksperclosedreason.php @@ -0,0 +1,19 @@ +#!/usr/bin/env php +getDataOfTasksPerClosedReason(); +cid=1 +pid=1 + +统计没有完成原因的任务数量 >> 0 + +*/ + + +$task = new taskTest(); +r($task->getDataOfTasksPerClosedReasonTest()) && p() && e('0'); //统计没有完成原因的任务数量 diff --git a/test/model/task/getdataoftasksperconsumed.php b/test/model/task/getdataoftasksperconsumed.php new file mode 100755 index 0000000000..f72d5c8155 --- /dev/null +++ b/test/model/task/getdataoftasksperconsumed.php @@ -0,0 +1,31 @@ +#!/usr/bin/env php +getDataOfTasksPerConsumed(); +cid=1 +pid=1 + +统计消耗工时为3的任务数量 >> 3,90 +统计消耗工时为4的任务数量 >> 4,90 +统计消耗工时为5的任务数量 >> 5,90 +统计消耗工时为6的任务数量 >> 6,91 +统计消耗工时为7的任务数量 >> 7,91 +统计消耗工时为8的任务数量 >> 8,91 +统计消耗工时为9的任务数量 >> 9,91 + +*/ + + +$task = new taskTest(); +r($task->getDataOfTasksPerConsumedTest()) && p('3:name,value') && e('3,90'); //统计消耗工时为3的任务数量 +r($task->getDataOfTasksPerConsumedTest()) && p('4:name,value') && e('4,90'); //统计消耗工时为4的任务数量 +r($task->getDataOfTasksPerConsumedTest()) && p('5:name,value') && e('5,90'); //统计消耗工时为5的任务数量 +r($task->getDataOfTasksPerConsumedTest()) && p('6:name,value') && e('6,91'); //统计消耗工时为6的任务数量 +r($task->getDataOfTasksPerConsumedTest()) && p('7:name,value') && e('7,91'); //统计消耗工时为7的任务数量 +r($task->getDataOfTasksPerConsumedTest()) && p('8:name,value') && e('8,91'); //统计消耗工时为8的任务数量 +r($task->getDataOfTasksPerConsumedTest()) && p('9:name,value') && e('9,91'); //统计消耗工时为9的任务数量 diff --git a/test/model/task/getdataoftasksperdeadline.php b/test/model/task/getdataoftasksperdeadline.php new file mode 100755 index 0000000000..be8f71a5ed --- /dev/null +++ b/test/model/task/getdataoftasksperdeadline.php @@ -0,0 +1,32 @@ +#!/usr/bin/env php +getDataOfTasksPerDeadline(); +cid=1 +pid=1 + +统计日期为+1days的任务数量 >> 17 +统计日期为+2days的任务数量 >> 17 +统计日期为+3days的任务数量 >> 18 +统计日期为+4days的任务数量 >> 18 +统计日期为-1days的任务数量 >> 17 +统计日期为-2days的任务数量 >> 17 +统计日期为-3days的任务数量 >> 17 +统计日期为-4days的任务数量 >> 17 + +*/ + +$task = new taskTest(); +r($task->getDataOfTasksPerDeadlineTest(0)) && p("0:value") && e("17"); //统计日期为+1days的任务数量 +r($task->getDataOfTasksPerDeadlineTest(1)) && p("1:value") && e("17"); //统计日期为+2days的任务数量 +r($task->getDataOfTasksPerDeadlineTest(2)) && p("2:value") && e("18"); //统计日期为+3days的任务数量 +r($task->getDataOfTasksPerDeadlineTest(3)) && p("3:value") && e("18"); //统计日期为+4days的任务数量 +r($task->getDataOfTasksPerDeadlineTest(4)) && p("4:value") && e("17"); //统计日期为-1days的任务数量 +r($task->getDataOfTasksPerDeadlineTest(5)) && p("5:value") && e("17"); //统计日期为-2days的任务数量 +r($task->getdataoftasksperdeadlinetest(6)) && p("6:value") && e("17"); //统计日期为-3days的任务数量 +r($task->getdataoftasksperdeadlinetest(7)) && p("7:value") && e("17"); //统计日期为-4days的任务数量 diff --git a/test/model/task/getdataoftasksperestimate.php b/test/model/task/getdataoftasksperestimate.php new file mode 100755 index 0000000000..29d12f01a2 --- /dev/null +++ b/test/model/task/getdataoftasksperestimate.php @@ -0,0 +1,33 @@ +#!/usr/bin/env php +getDataOfTasksPerEstimate(); +cid=1 +pid=1 + +统计预计工时为0的任务数量 >> 0,83 +统计预计工时为1的任务数量 >> 1,83 +统计预计工时为2的任务数量 >> 2,83 +统计预计工时为3的任务数量 >> 3,83 +统计预计工时为4的任务数量 >> 4,83 +统计预计工时为5的任务数量 >> 5,83 +统计预计工时为6的任务数量 >> 6,82 +统计预计工时为7的任务数量 >> 7,82 + +*/ + + +$task = new taskTest(); +r($task->getDataOfTasksPerEstimateTest()) && p('0:name,value') && e('0,83'); //统计预计工时为0的任务数量 +r($task->getDataOfTasksPerEstimateTest()) && p('1:name,value') && e('1,83'); //统计预计工时为1的任务数量 +r($task->getDataOfTasksPerEstimateTest()) && p('2:name,value') && e('2,83'); //统计预计工时为2的任务数量 +r($task->getDataOfTasksPerEstimateTest()) && p('3:name,value') && e('3,83'); //统计预计工时为3的任务数量 +r($task->getDataOfTasksPerEstimateTest()) && p('4:name,value') && e('4,83'); //统计预计工时为4的任务数量 +r($task->getDataOfTasksPerEstimateTest()) && p('5:name,value') && e('5,83'); //统计预计工时为5的任务数量 +r($task->getDataOfTasksPerEstimateTest()) && p('6:name,value') && e('6,82'); //统计预计工时为6的任务数量 +r($task->getDataOfTasksPerEstimateTest()) && p('7:name,value') && e('7,82'); //统计预计工时为7的任务数量 diff --git a/test/model/task/getdataoftasksperexecution.php b/test/model/task/getdataoftasksperexecution.php new file mode 100755 index 0000000000..cb5a4b3627 --- /dev/null +++ b/test/model/task/getdataoftasksperexecution.php @@ -0,0 +1,31 @@ +#!/usr/bin/env php +getDataOfTasksPerExecution(); +cid=1 +pid=1 + +统计executionID为101的执行的任务数量 >> 迭代1,14 +统计executionID为102的执行的任务数量 >> 迭代2,4 +统计executionID为103的执行的任务数量 >> 迭代3,4 +统计executionID为104的执行的任务数量 >> 迭代4,4 +统计executionID为105的执行的任务数量 >> 迭代5,4 +统计executionID为106的执行的任务数量 >> 迭代6,4 +统计executionID为107的执行的任务数量 >> 迭代7,4 + +*/ + + +$task = new taskTest(); +r($task->getDataOfTasksPerExecutionTest()) && p('101:name,value') && e('迭代1,14'); //统计executionID为101的执行的任务数量 +r($task->getDataOfTasksPerExecutionTest()) && p('102:name,value') && e('迭代2,4'); //统计executionID为102的执行的任务数量 +r($task->getDataOfTasksPerExecutionTest()) && p('103:name,value') && e('迭代3,4'); //统计executionID为103的执行的任务数量 +r($task->getDataOfTasksPerExecutionTest()) && p('104:name,value') && e('迭代4,4'); //统计executionID为104的执行的任务数量 +r($task->getDataOfTasksPerExecutionTest()) && p('105:name,value') && e('迭代5,4'); //统计executionID为105的执行的任务数量 +r($task->getDataOfTasksPerExecutionTest()) && p('106:name,value') && e('迭代6,4'); //统计executionID为106的执行的任务数量 +r($task->getDataOfTasksPerExecutionTest()) && p('107:name,value') && e('迭代7,4'); //统计executionID为107的执行的任务数量 diff --git a/test/model/task/getdataoftasksperfinishedby.php b/test/model/task/getdataoftasksperfinishedby.php new file mode 100755 index 0000000000..a2c12873f4 --- /dev/null +++ b/test/model/task/getdataoftasksperfinishedby.php @@ -0,0 +1,19 @@ +#!/usr/bin/env php +getDataOfTasksPerFinishedBy(); +cid=1 +pid=1 + +统计没有完成者的任务数量 >> 0 + +*/ + + +$task = new taskTest(); +r($task->getDataOfTasksPerFinishedByTest()) && p() && e('0'); //统计没有完成者的任务数量 diff --git a/test/model/task/getdataoftasksperleft.php b/test/model/task/getdataoftasksperleft.php new file mode 100755 index 0000000000..9c12e86246 --- /dev/null +++ b/test/model/task/getdataoftasksperleft.php @@ -0,0 +1,33 @@ +#!/usr/bin/env php +getDataOfTasksPerLeft(); +cid=1 +pid=1 + +统计剩余工时为0的任务数量 >> 0,83 +统计剩余工时为1的任务数量 >> 1,83 +统计剩余工时为2的任务数量 >> 2,83 +统计剩余工时为3的任务数量 >> 3,83 +统计剩余工时为4的任务数量 >> 4,83 +统计剩余工时为5的任务数量 >> 5,83 +统计剩余工时为6的任务数量 >> 6,82 +统计剩余工时为7的任务数量 >> 7,82 + +*/ + + +$task = new taskTest(); +r($task->getDataOfTasksPerLeftTest()) && p('0:name,value') && e('0,83'); //统计剩余工时为0的任务数量 +r($task->getDataOfTasksPerLeftTest()) && p('1:name,value') && e('1,83'); //统计剩余工时为1的任务数量 +r($task->getDataOfTasksPerLeftTest()) && p('2:name,value') && e('2,83'); //统计剩余工时为2的任务数量 +r($task->getDataOfTasksPerLeftTest()) && p('3:name,value') && e('3,83'); //统计剩余工时为3的任务数量 +r($task->getDataOfTasksPerLeftTest()) && p('4:name,value') && e('4,83'); //统计剩余工时为4的任务数量 +r($task->getDataOfTasksPerLeftTest()) && p('5:name,value') && e('5,83'); //统计剩余工时为5的任务数量 +r($task->getDataOfTasksPerLeftTest()) && p('6:name,value') && e('6,82'); //统计剩余工时为6的任务数量 +r($task->getDataOfTasksPerLeftTest()) && p('7:name,value') && e('7,82'); //统计剩余工时为7的任务数量 diff --git a/test/model/task/getdataoftaskspermodule.php b/test/model/task/getdataoftaskspermodule.php new file mode 100755 index 0000000000..5d59c2f8f2 --- /dev/null +++ b/test/model/task/getdataoftaskspermodule.php @@ -0,0 +1,24 @@ +#!/usr/bin/env php +getDataOfTasksPerModule(); +cid=1 +pid=1 + + +统计moduleID为21的模块的任务数量 >> /模块1,12 +统计moduleID为615的模块的任务数量 >> /模块595,2 +统计moduleID为504的模块的任务数量 >> /模块484,2 + +*/ + + +$task = new taskTest(); +r($task->getDataOfTasksPerModuleTest()) && p('21:name,value') && e('/模块1,12'); //统计moduleID为21的模块的任务数量 +r($task->getDataOfTasksPerModuleTest()) && p('615:name,value') && e('/模块595,2'); //统计moduleID为615的模块的任务数量 +r($task->getDataOfTasksPerModuleTest()) && p('504:name,value') && e('/模块484,2'); //统计moduleID为504的模块的任务数量 diff --git a/test/model/task/getdataoftasksperpri.php b/test/model/task/getdataoftasksperpri.php new file mode 100755 index 0000000000..a5415a17ec --- /dev/null +++ b/test/model/task/getdataoftasksperpri.php @@ -0,0 +1,25 @@ +#!/usr/bin/env php +getDataOfTasksPerPri(); +cid=1 +pid=1 + +统计优先级为1的任务数量 >> 1,228 +统计优先级为2的任务数量 >> 2,228 +统计优先级为3的任务数量 >> 3,227 +统计优先级为4的任务数量 >> 4,227 + +*/ + + +$task = new taskTest(); +r($task->getDataOfTasksPerPriTest()) && p('1:name,value') && e('1,228'); //统计优先级为1的任务数量 +r($task->getDataOfTasksPerPriTest()) && p('2:name,value') && e('2,228'); //统计优先级为2的任务数量 +r($task->getDataOfTasksPerPriTest()) && p('3:name,value') && e('3,227'); //统计优先级为3的任务数量 +r($task->getDataOfTasksPerPriTest()) && p('4:name,value') && e('4,227'); //统计优先级为4的任务数量 diff --git a/test/model/task/getdataoftasksperstatus.php b/test/model/task/getdataoftasksperstatus.php new file mode 100755 index 0000000000..ac93049e6c --- /dev/null +++ b/test/model/task/getdataoftasksperstatus.php @@ -0,0 +1,29 @@ +#!/usr/bin/env php +getDataOfTasksPerStatus(); +cid=1 +pid=1 + +统计状态为已完成的任务数量 >> 已完成,152 +统计状态为未开始的任务数量 >> 未开始,152 +统计状态为进行中的任务数量 >> 进行中,152 +统计状态为已暂停的任务数量 >> 已暂停,152 +统计状态为已取消的任务数量 >> 已取消,151 +统计状态为已关闭的任务数量 >> 已关闭,151 + +*/ + + +$task = new taskTest(); +r($task->getDataOfTasksPerStatusTest()) && p('done:name,value') && e('已完成,152'); //统计状态为已完成的任务数量 +r($task->getDataOfTasksPerStatusTest()) && p('wait:name,value') && e('未开始,152'); //统计状态为未开始的任务数量 +r($task->getDataOfTasksPerStatusTest()) && p('doing:name,value') && e('进行中,152'); //统计状态为进行中的任务数量 +r($task->getDataOfTasksPerStatusTest()) && p('pause:name,value') && e('已暂停,152'); //统计状态为已暂停的任务数量 +r($task->getDataOfTasksPerStatusTest()) && p('cancel:name,value') && e('已取消,151'); //统计状态为已取消的任务数量 +r($task->getDataOfTasksPerStatusTest()) && p('closed:name,value') && e('已关闭,151'); //统计状态为已关闭的任务数量 diff --git a/test/model/task/getdataoftaskspertype.php b/test/model/task/getdataoftaskspertype.php new file mode 100755 index 0000000000..9010746f89 --- /dev/null +++ b/test/model/task/getdataoftaskspertype.php @@ -0,0 +1,26 @@ +#!/usr/bin/env php +getDataOfTasksPerType(); +cid=1 +pid=1 + +统计类型为devel的任务数量 >> 开发,115 +统计类型为study的任务数量 >> 研究,114 +统计类型为discuss的任务数量 >> 讨论,113 +统计类型为ui的任务数量 >> 界面,113 + +*/ + + +$task = new taskTest(); +r($task->getDataOfTasksPerTypeTest()) && p('devel:name,value') && e('开发,115'); //统计类型为devel的任务数量 +r($task->getDataOfTasksPerTypeTest()) && p('study:name,value') && e('研究,114'); //统计类型为study的任务数量 +r($task->getDataOfTasksPerTypeTest()) && p('discuss:name,value') && e('讨论,113'); //统计类型为discuss的任务数量 +r($task->getDataOfTasksPerTypeTest()) && p('ui:name,value') && e('界面,113'); //统计类型为ui的任务数量 + diff --git a/test/model/task/processdata4report.php b/test/model/task/processdata4report.php new file mode 100755 index 0000000000..1cc90c703a --- /dev/null +++ b/test/model/task/processdata4report.php @@ -0,0 +1,86 @@ +#!/usr/bin/env php +processData4Report(); +cid=1 +pid=1 + +计算executionID为101的执行下按迭代任务数统计的图表数据 101 >> 101,14 +计算executionID为101的执行下按模块任务统计的图表数据 27 >> 27,1 +计算executionID为101的执行下按模块任务统计的图表数据 21 >> 21,12 +计算executionID为101的执行下按指派给统计的图表数据 >> po82,1 +计算executionID为101的执行下按任务类型统计的图表数据 ui >> ui,1 +计算executionID为101的执行下按任务类型统计的图表数据 test >> test,2 +计算executionID为101的执行下按优先级统计的图表数据 1 >> 1,5 +计算executionID为101的执行下按优先级统计的图表数据 2 >> 2,4 +计算executionID为101的执行下按任务状态统计的图表数据 -8day >> 2 +计算executionID为101的执行下按任务状态统计的图表数据 -15day >> 1 +计算executionID为101的执行下按截止时间统计的图表数据 0 >> 0,3 +计算executionID为101的执行下按截止时间统计的图表数据 5 >> 5,1 +计算executionID为101的执行下按预计时间统计的图表数据 0 >> 0,2 +计算executionID为101的执行下按预计时间统计的图表数据 6 >> 6,1 +计算executionID为101的执行下按剩余时间统计的图表数据 3 >> 3,2 +计算executionID为101的执行下按剩余时间统计的图表数据 7 >> 7,1 +计算executionID为101的执行下按消耗时间统计的图表数据 >> ,11 +计算executionID为101的执行下按由谁完成统计的图表数据 >> ,14 +计算executionID为101的执行下按关闭原因统计的图表数据 >> void +计算executionID为101的执行下按每天完成统计的图表数据 wait >> wait,4 +计算executionID为101的执行下按每天完成统计的图表数据 done >> done,3 + +*/ + +$now = helper::now(); + +$tasks = $dao->select('*')->from(TABLE_TASK)->where('`execution`')->eq('101')->andWhere('deleted')->eq(0)->fetchAll('id'); +$parents = array(); +foreach($tasks as $task) +{ + if($task->parent > 0) $parents[$task->parent] = $task->parent; +} +$parents = $dao->select('*')->from(TABLE_TASK)->where('id')->in($parents)->fetchAll('id'); +foreach($tasks as $task) +{ + if($task->parent > 0) + { + if(isset($tasks[$task->parent])) + { + $tasks[$task->parent]->children[$task->id] = $task; + } + else + { + $parent = $parents[$task->parent]; + $task->parentName = $parent->name; + } + } + $task->date = '0000-00-00'; +} + +$children = $tasks[601]->children + $tasks[602]->children + $tasks[603]->children; + +$task = new taskTest(); +r($task->processData4ReportTest($tasks, '', "execution")) && p('101:name,value') && e('101,14'); //计算executionID为101的执行下按迭代任务数统计的图表数据 101 +r($task->processData4ReportTest($tasks, '', 'module')) && p('27:name,value') && e('27,1'); //计算executionID为101的执行下按模块任务统计的图表数据 27 +r($task->processData4ReportTest($tasks, '', 'module')) && p('21:name,value') && e('21,12'); //计算executionID为101的执行下按模块任务统计的图表数据 21 +r($task->processData4ReportTest($tasks, '', 'assignedTo')) && p('po82:name,value') && e('po82,1'); //计算executionID为101的执行下按指派给统计的图表数据 +r($task->processData4ReportTest($tasks, '', 'type')) && p('ui:name,value') && e('ui,1'); //计算executionID为101的执行下按任务类型统计的图表数据 ui +r($task->processData4ReportTest($tasks, '', 'type')) && p('test:name,value') && e('test,2'); //计算executionID为101的执行下按任务类型统计的图表数据 test +r($task->processData4ReportTest($tasks, '', 'pri')) && p('1:name,value') && e('1,5'); //计算executionID为101的执行下按优先级统计的图表数据 1 +r($task->processData4ReportTest($tasks, '', 'pri')) && p('2:name,value') && e('2,4'); //计算executionID为101的执行下按优先级统计的图表数据 2 +r($task->processData4ReportTest($tasks, '', 'deadline')) && p('0:value') && e("2"); //计算executionID为101的执行下按任务状态统计的图表数据 -8day +r($task->processData4ReportTest($tasks, '', 'deadline')) && p('1:value') && e("1"); //计算executionID为101的执行下按任务状态统计的图表数据 -15day +r($task->processData4ReportTest($tasks, '', 'estimate')) && p('0:name,value') && e('0,3'); //计算executionID为101的执行下按截止时间统计的图表数据 0 +r($task->processData4ReportTest($tasks, '', 'estimate')) && p('5:name,value') && e('5,1'); //计算executionID为101的执行下按截止时间统计的图表数据 5 +r($task->processData4ReportTest($tasks, $children, 'left')) && p('0:name,value') && e('0,2'); //计算executionID为101的执行下按预计时间统计的图表数据 0 +r($task->processData4ReportTest($tasks, $children, 'left')) && p('6:name,value') && e('6,1'); //计算executionID为101的执行下按预计时间统计的图表数据 6 +r($task->processData4ReportTest($tasks, $children, 'consumed')) && p('3:name,value') && e('3,2'); //计算executionID为101的执行下按剩余时间统计的图表数据 3 +r($task->processData4ReportTest($tasks, $children, 'consumed')) && p('7:name,value') && e('7,1'); //计算executionID为101的执行下按剩余时间统计的图表数据 7 +r($task->processData4ReportTest($tasks, $children, 'finishedBy')) && p('void:name,value') && e(',11'); //计算executionID为101的执行下按消耗时间统计的图表数据 +r($task->processData4ReportTest($tasks, '', 'closedReason')) && p('void:name,value') && e(',14'); //计算executionID为101的执行下按由谁完成统计的图表数据 +r($task->processData4ReportTest($tasks, '', 'date')) && p('void') && e('void'); //计算executionID为101的执行下按关闭原因统计的图表数据 +r($task->processData4ReportTest($tasks, '', 'status')) && p('wait:name,value') && e('wait,4'); //计算executionID为101的执行下按每天完成统计的图表数据 wait +r($task->processData4ReportTest($tasks, '', 'status')) && p('done:name,value') && e('done,3'); //计算executionID为101的执行下按每天完成统计的图表数据 done diff --git a/test/model/task/processtask.php b/test/model/task/processtask.php index 6d93e472e6..d4c83b4b8a 100755 --- a/test/model/task/processtask.php +++ b/test/model/task/processtask.php @@ -19,11 +19,9 @@ pid=1 */ -$now = helper::now(); - $task1 = new stdclass(); $task1->status = 'wait'; -$task1->deadline = date("Y-m-d",strtotime("+1 day")); +$task1->deadline = '+1day'; $task1->storyStatus = 'draft'; $task1->latestStoryVersion = '1'; $task1->storyVersion = '1'; @@ -34,7 +32,7 @@ $task1->left = '1'; $task2 = new stdclass(); $task2->status = 'doing'; -$task2->deadline = date("Y-m-d",strtotime("-1 day")); +$task2->deadline = '-1day'; $task2->storyStatus = 'draft'; $task2->latestStoryVersion = '1'; $task2->storyVersion = '1'; @@ -45,7 +43,7 @@ $task2->left = '1'; $task3 = new stdclass(); $task3->status = 'doing'; -$task3->deadline = date("Y-m-d",strtotime("-1 day")); +$task3->deadline = '-1day'; $task3->storyStatus = 'draft'; $task3->latestStoryVersion = '1'; $task3->storyVersion = '1'; @@ -56,7 +54,7 @@ $task3->left = '1'; $task4 = new stdclass(); $task4->status = 'doing'; -$task4->deadline = date("Y-m-d",strtotime("+1 day")); +$task4->deadline = '+1day'; $task4->storyStatus = 'draft'; $task4->latestStoryVersion = '1'; $task4->storyVersion = '1'; @@ -67,8 +65,7 @@ $task4->left = '1'; $task5 = new stdclass(); $task5->status = 'done'; -$task5->deadline = date("Y-m-d",strtotime("-1 day")); -$task5->deadline = '2022-03-10'; +$task5->deadline = '-1day'; $task5->storyStatus = 'draft'; $task5->latestStoryVersion = '1'; $task5->storyVersion = '1'; @@ -79,7 +76,7 @@ $task5->left = '0'; $task6 = new stdclass(); $task6->status = 'done'; -$task6->deadline = date("Y-m-d",strtotime("+1 day")); +$task6->deadline = '+1day'; $task6->storyStatus = 'draft'; $task6->latestStoryVersion = '1'; $task6->storyVersion = '1'; diff --git a/test/model/task/processtasks.php b/test/model/task/processtasks.php index 242d752f12..eadf4e9e55 100755 --- a/test/model/task/processtasks.php +++ b/test/model/task/processtasks.php @@ -11,8 +11,8 @@ cid=1 pid=1 根据tasks计算executionID为1的执行下所有任务的进度 任务1 >> ,100 -根据tasks计算executionID为1的执行下所有任务的进度 任务601 >> ,100 -根据tasks计算executionID为1的执行下所有任务的进度 任务602 >> ,80 +根据tasks计算executionID为1的执行下所有任务的进度 任务601 >> 7,100 +根据tasks计算executionID为1的执行下所有任务的进度 任务602 >> 8,80 根据tasks计算executionID为1的执行下所有任务的进度 任务602 >> ,71 根据tasks计算executionID为2的执行下所有任务的进度 任务2 >> ,80 根据tasks计算executionID为2的执行下所有任务的进度 任务602 >> 10,67 @@ -21,62 +21,14 @@ pid=1 */ -$now = helper::now(); - -$tasks1 = $dao->select('*')->from(TABLE_TASK)->where('execution')->eq('101')->andWhere('deleted')->eq(0)->fetchAll('id'); -$parents = array(); -foreach($tasks1 as $task) -{ - if($task->parent > 0) $parents[$task->parent] = $task->parent; -} -$parents = $dao->select('*')->from(TABLE_TASK)->where('id')->in($parents)->fetchAll('id'); -foreach($tasks1 as $task) -{ - if($task->parent > 0) - { - if(isset($tasks[$task->parent])) - { - $tasks[$task->parent]->children[$task->id] = $task; - unset($tasks[$task->id]); - } - else - { - $parent = $parents[$task->parent]; - $task->parentName = $parent->name; - } - } -} - -$tasks2 = $dao->select('*')->from(TABLE_TASK)->where('execution')->eq('102')->andWhere('deleted')->eq(0)->fetchAll('id'); -$parents = array(); -foreach($tasks2 as $task) -{ - if($task->parent > 0) $parents[$task->parent] = $task->parent; -} -$parents = $dao->select('*')->from(TABLE_TASK)->where('id')->in($parents)->fetchAll('id'); -foreach($tasks2 as $task) -{ - if($task->parent > 0) - { - if(isset($tasks[$task->parent])) - { - $tasks[$task->parent]->children[$task->id] = $task; - unset($tasks[$task->id]); - } - else - { - $parent = $parents[$task->parent]; - $task->parentName = $parent->name; - } - } -} +$executionID = array('101', '102'); $task = new taskTest(); -r($task->processTasksTest($tasks1)) && p('1:delay,progress') && e(',100'); //根据tasks计算executionID为1的执行下所有任务的进度 任务1 -r($task->processTasksTest($tasks1)) && p('601:delay,progress') && e(',100'); //根据tasks计算executionID为1的执行下所有任务的进度 任务601 -r($task->processTasksTest($tasks1)) && p('602:delay,progress') && e(',80'); //根据tasks计算executionID为1的执行下所有任务的进度 任务602 -r($task->processTasksTest($tasks1)) && p('603:delay,progress') && e(',71'); //根据tasks计算executionID为1的执行下所有任务的进度 任务603 -r($task->processTasksTest($tasks2)) && p('2:delay,progress') && e(',80'); //根据tasks计算executionID为2的执行下所有任务的进度 任务2 -r($task->processTasksTest($tasks2)) && p('604:delay,progress') && e('10,67'); //根据tasks计算executionID为2的执行下所有任务的进度 任务604 -r($task->processTasksTest($tasks2)) && p('605:delay,progress') && e(',64'); //根据tasks计算executionID为2的执行下所有任务的进度 任务605 -r($task->processTasksTest($tasks2)) && p('606:delay,progress') && e(',62'); //根据tasks计算executionID为2的执行下所有任务的进度 任务606 +r($task->processTasksTest($executionID['0'])) && p('1:delay,progress') && e(',100'); //根据tasks计算executionID为1的执行下所有任务的进度 任务1 +r($task->processTasksTest($executionID['0'])) && p('601:delay,progress') && e('7,100'); //根据tasks计算executionID为1的执行下所有任务的进度 任务601 +r($task->processTasksTest($executionID['0'])) && p('602:delay,progress') && e('8,80'); //根据tasks计算executionID为1的执行下所有任务的进度 任务602 +r($task->processTasksTest($executionID['0'])) && p('603:delay,progress') && e(',71'); //根据tasks计算executionID为1的执行下所有任务的进度 任务603 +r($task->processTasksTest($executionID['1'])) && p('2:delay,progress') && e(',80'); //根据tasks计算executionID为2的执行下所有任务的进度 任务2 +r($task->processTasksTest($executionID['1'])) && p('604:delay,progress') && e('10,67'); //根据tasks计算executionID为2的执行下所有任务的进度 任务604 +r($task->processTasksTest($executionID['1'])) && p('605:delay,progress') && e(',64'); //根据tasks计算executionID为2的执行下所有任务的进度 任务605 +r($task->processTasksTest($executionID['1'])) && p('606:delay,progress') && e(',62'); //根据tasks计算executionID为2的执行下所有任务的进度 任务606 diff --git a/test/model/task/update.php b/test/model/task/update.php index 55c6386334..88c0fa6562 100755 --- a/test/model/task/update.php +++ b/test/model/task/update.php @@ -18,14 +18,14 @@ pid=1 测试修改任务状态 >> status,cancel,doing 测试修改任务优先级 >> pri,2,1 测试修改任务所属执行 >> execution,107,101 -测试修改任务预计开始时间 >> estStarted,2022-03-11,2022-02-27 -测试修改任务截止时间 >> deadline,2022-03-10,2022-03-11 +测试修改任务预计开始时间 >> estStarted,2022-03-14,2022-02-27 +测试修改任务截止时间 >> deadline,2022-03-13,2022-03-29 测试修改任务关闭原因 >> 『关闭原因』必须为空。 */ $estStarted = '2022-02-27'; -$deadline = '2022-03-11'; +$deadline = '2022-03-29'; $taskIDList = array('1','2','3','4','5','6','7','8','9'); $changename = array('name' => '任务名修改','estStarted' => $estStarted,'deadline' => $deadline); @@ -48,8 +48,8 @@ r($task->updateObject($taskIDList[3], $changetype)) && p('0:field,old,new' r($task->updateObject($taskIDList[4], $changestatus)) && p('0:field,old,new') && e('status,cancel,doing'); // 测试修改任务状态 r($task->updateObject($taskIDList[5], $changepri)) && p('0:field,old,new') && e('pri,2,1'); // 测试修改任务优先级 r($task->updateObject($taskIDList[6], $changeexecution)) && p('0:field,old,new') && e('execution,107,101'); // 测试修改任务所属执行 -r($task->updateObject($taskIDList[7], $changeestStarted)) && p('0:field,old,new') && e('estStarted,2022-03-11,2022-02-27'); // 测试修改任务预计开始时间 -r($task->updateObject($taskIDList[8], $changedeadline)) && p('0:field,old,new') && e('deadline,2022-03-10,2022-03-11'); // 测试修改任务截止时间 +r($task->updateObject($taskIDList[7], $changeestStarted)) && p('0:field,old,new') && e('estStarted,2022-03-14,2022-02-27'); // 测试修改任务预计开始时间 +r($task->updateObject($taskIDList[8], $changedeadline)) && p('0:field,old,new') && e('deadline,2022-03-13,2022-03-29'); // 测试修改任务截止时间 r($task->updateObject($taskIDList[0], $ckclosedReason)) && p('closedReason:0') && e(' 『关闭原因』必须为空。'); // 测试修改任务关闭原因 system("./ztest init"); From d32f3d2664cbcc2e44c7c374e6be446e3514b8ad Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Mon, 14 Mar 2022 14:51:03 +0800 Subject: [PATCH 04/10] * Fix bug #19820,20528. --- extension/lite/effort/ext/config/lite.php | 5 +++++ extension/lite/effort/ext/view/edit.lite.html.hook.php | 6 ++++++ module/doc/lang/en.php | 1 + module/doc/lang/zh-cn.php | 1 + module/doc/view/create.html.php | 2 +- 5 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 extension/lite/effort/ext/config/lite.php create mode 100644 extension/lite/effort/ext/view/edit.lite.html.hook.php diff --git a/extension/lite/effort/ext/config/lite.php b/extension/lite/effort/ext/config/lite.php new file mode 100644 index 0000000000..663a777296 --- /dev/null +++ b/extension/lite/effort/ext/config/lite.php @@ -0,0 +1,5 @@ +effort->list->exportFields = 'id,date,dept,account,work,consumed,left,objectType,execution'; +$config->effort->list->defaultFields = 'id,date,account,work,consumed,left,objectType,execution'; + +$config->effort->datatable->defaultField = array('id', 'date', 'account', 'work', 'consumed', 'left', 'objectType', 'execution'); diff --git a/extension/lite/effort/ext/view/edit.lite.html.hook.php b/extension/lite/effort/ext/view/edit.lite.html.hook.php new file mode 100644 index 0000000000..a6c7e77c5b --- /dev/null +++ b/extension/lite/effort/ext/view/edit.lite.html.hook.php @@ -0,0 +1,6 @@ + diff --git a/module/doc/lang/en.php b/module/doc/lang/en.php index 4665996e50..9af7f23758 100644 --- a/module/doc/lang/en.php +++ b/module/doc/lang/en.php @@ -202,6 +202,7 @@ $lang->doc->noCollectedDoc = 'You have not favorited any documents.'; $lang->doc->errorEmptyLib = 'No data in document library.'; $lang->doc->confirmUpdateContent = 'You have a document that is not saved from last time. Do you want to continue editing it?'; $lang->doc->selectLibType = 'Please select a type of doc library.'; +$lang->doc->noLibreOffice = 'You does not have access to office conversion settings!'; $lang->doc->noticeAcl['lib']['product']['default'] = 'Users who can access the selected product can access it.'; $lang->doc->noticeAcl['lib']['product']['custom'] = 'Users who can access the selected product or users in the whiltelist can access it.'; diff --git a/module/doc/lang/zh-cn.php b/module/doc/lang/zh-cn.php index d620c0dcc1..255a1f793f 100644 --- a/module/doc/lang/zh-cn.php +++ b/module/doc/lang/zh-cn.php @@ -202,6 +202,7 @@ $lang->doc->noCollectedDoc = '您还没有收藏任何文档。'; $lang->doc->errorEmptyLib = '文档库暂无数据。'; $lang->doc->confirmUpdateContent = '检查到您有未保存的文档内容,是否继续编辑?'; $lang->doc->selectLibType = '请选择文档库类型'; +$lang->doc->noLibreOffice = '您还没有office转换设置访问权限!'; $lang->doc->noticeAcl['lib']['product']['default'] = '有所选产品访问权限的用户可以访问。'; $lang->doc->noticeAcl['lib']['product']['custom'] = '有所选产品访问权限或白名单里的用户可以访问。'; diff --git a/module/doc/view/create.html.php b/module/doc/view/create.html.php index 59accb6c47..83f3ec807b 100644 --- a/module/doc/view/create.html.php +++ b/module/doc/view/create.html.php @@ -29,7 +29,7 @@ From 976299d506063685355fb6eca98ad77376877bb6 Mon Sep 17 00:00:00 2001 From: zhujinyong Date: Mon, 14 Mar 2022 15:12:32 +0800 Subject: [PATCH 05/10] * Fix type of fields. --- db/standard/zentao16.5.sql | 34 +++++++++++++++++----------------- db/update16.4.sql | 7 +++++++ db/zentao.sql | 2 +- 3 files changed, 25 insertions(+), 18 deletions(-) diff --git a/db/standard/zentao16.5.sql b/db/standard/zentao16.5.sql index 35c0dc6e6f..1fcd1c1952 100644 --- a/db/standard/zentao16.5.sql +++ b/db/standard/zentao16.5.sql @@ -134,7 +134,7 @@ CREATE TABLE `zt_apistruct` ( `lib` int(10) unsigned NOT NULL DEFAULT '0', `name` varchar(30) NOT NULL DEFAULT '', `type` varchar(50) NOT NULL DEFAULT '', - `desc` varchar(255) NOT NULL DEFAULT '', + `desc` text NOT NULL DEFAULT '', `version` smallint(5) unsigned NOT NULL DEFAULT '0', `attribute` text, `addedBy` varchar(30) NOT NULL DEFAULT '0', @@ -3367,61 +3367,61 @@ CREATE TABLE `zt_zoutput` ( /*!40101 SET character_set_client = @saved_cs_client */; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; -/*!50001 CREATE VIEW `ztv_dayactions` AS SELECT +/*!50001 CREATE VIEW `ztv_dayactions` AS SELECT 1 AS `actions`, 1 AS `day`*/; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; -/*!50001 CREATE VIEW `ztv_daybugopen` AS SELECT +/*!50001 CREATE VIEW `ztv_daybugopen` AS SELECT 1 AS `bugopen`, 1 AS `day`*/; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; -/*!50001 CREATE VIEW `ztv_daybugresolve` AS SELECT +/*!50001 CREATE VIEW `ztv_daybugresolve` AS SELECT 1 AS `bugresolve`, 1 AS `day`*/; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; -/*!50001 CREATE VIEW `ztv_dayeffort` AS SELECT +/*!50001 CREATE VIEW `ztv_dayeffort` AS SELECT 1 AS `consumed`, 1 AS `date`*/; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; -/*!50001 CREATE VIEW `ztv_daystoryclose` AS SELECT +/*!50001 CREATE VIEW `ztv_daystoryclose` AS SELECT 1 AS `storyclose`, 1 AS `day`*/; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; -/*!50001 CREATE VIEW `ztv_daystoryopen` AS SELECT +/*!50001 CREATE VIEW `ztv_daystoryopen` AS SELECT 1 AS `storyopen`, 1 AS `day`*/; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; -/*!50001 CREATE VIEW `ztv_daytaskfinish` AS SELECT +/*!50001 CREATE VIEW `ztv_daytaskfinish` AS SELECT 1 AS `taskfinish`, 1 AS `day`*/; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; -/*!50001 CREATE VIEW `ztv_daytaskopen` AS SELECT +/*!50001 CREATE VIEW `ztv_daytaskopen` AS SELECT 1 AS `taskopen`, 1 AS `day`*/; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; -/*!50001 CREATE VIEW `ztv_dayuserlogin` AS SELECT +/*!50001 CREATE VIEW `ztv_dayuserlogin` AS SELECT 1 AS `userlogin`, 1 AS `day`*/; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; -/*!50001 CREATE VIEW `ztv_executionsummary` AS SELECT +/*!50001 CREATE VIEW `ztv_executionsummary` AS SELECT 1 AS `execution`, 1 AS `estimate`, 1 AS `consumed`, @@ -3432,7 +3432,7 @@ SET character_set_client = utf8; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; -/*!50001 CREATE VIEW `ztv_productbugs` AS SELECT +/*!50001 CREATE VIEW `ztv_productbugs` AS SELECT 1 AS `product`, 1 AS `bugs`, 1 AS `resolutions`, @@ -3440,14 +3440,14 @@ SET character_set_client = utf8; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; -/*!50001 CREATE VIEW `ztv_productstories` AS SELECT +/*!50001 CREATE VIEW `ztv_productstories` AS SELECT 1 AS `product`, 1 AS `stories`, 1 AS `undone`*/; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; -/*!50001 CREATE VIEW `ztv_projectbugs` AS SELECT +/*!50001 CREATE VIEW `ztv_projectbugs` AS SELECT 1 AS `execution`, 1 AS `bugs`, 1 AS `resolutions`, @@ -3455,14 +3455,14 @@ SET character_set_client = utf8; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; -/*!50001 CREATE VIEW `ztv_projectstories` AS SELECT +/*!50001 CREATE VIEW `ztv_projectstories` AS SELECT 1 AS `execution`, 1 AS `stories`, 1 AS `undone`*/; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; -/*!50001 CREATE VIEW `ztv_projectsummary` AS SELECT +/*!50001 CREATE VIEW `ztv_projectsummary` AS SELECT 1 AS `project`, 1 AS `estimate`, 1 AS `consumed`, @@ -3473,7 +3473,7 @@ SET character_set_client = utf8; SET character_set_client = @saved_cs_client; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; -/*!50001 CREATE VIEW `ztv_projectteams` AS SELECT +/*!50001 CREATE VIEW `ztv_projectteams` AS SELECT 1 AS `execution`, 1 AS `teams`*/; SET character_set_client = @saved_cs_client; diff --git a/db/update16.4.sql b/db/update16.4.sql index 046064e5cf..4b3b9b21ac 100644 --- a/db/update16.4.sql +++ b/db/update16.4.sql @@ -48,3 +48,10 @@ SELECT `module`, `method`,(SELECT `id` FROM zt_group WHERE `name` = '团队成 ALTER TABLE `zt_productplan` ADD `closedReason` varchar(20) NOT NULL AFTER `order`; update zt_config set `value` = concat(`value`, ',visions') where module = 'user' and `key` = 'requiredFields' and section in ('create', 'edit'); + +ALTER TABLE `zt_kanban` CHANGE `order` `order` mediumint NOT NULL DEFAULT '0' AFTER `status`; +ALTER TABLE `zt_kanbancolumn` CHANGE `group` `group` mediumint NOT NULL DEFAULT '0' AFTER `region`; +ALTER TABLE `zt_kanbancard` CHANGE `order` `order` mediumint NOT NULL DEFAULT '0' AFTER `whitelist`; +ALTER TABLE `zt_kanbanregion` CHANGE `order` `order` mediumint NOT NULL DEFAULT '0' AFTER `name`; +ALTER TABLE `zt_kanbanspace` CHANGE `order` `order` mediumint NOT NULL DEFAULT '0' AFTER `status`; +ALTER TABLE `zt_projectstory` CHANGE `branch` `branch` mediumint unsigned NOT NULL AFTER `product`; diff --git a/db/zentao.sql b/db/zentao.sql index accdf19b9b..c437399460 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -98,7 +98,7 @@ CREATE TABLE `zt_apistruct` ( `lib` int UNSIGNED NOT NULL DEFAULT 0, `name` varchar(30) NOT NULL DEFAULT '', `type` varchar(50) NOT NULL DEFAULT '', - `desc` varchar(255) NOT NULL DEFAULT '', + `desc` text NOT NULL DEFAULT '', `version` smallint unsigned NOT NULL DEFAULT 0, `attribute` text NULL, `addedBy` varchar(30) NOT NULL DEFAULT 0, From aa38fe6ec9b0a1465a3023fb450469442186825a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A1=E6=A0=8B?= Date: Mon, 14 Mar 2022 15:50:57 +0800 Subject: [PATCH 06/10] * adjust for compute burn. --- bin/init.bat | 16 ++++++++-------- bin/init.sh | 20 ++++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/bin/init.bat b/bin/init.bat index 19fc718fbf..33132fbd89 100644 --- a/bin/init.bat +++ b/bin/init.bat @@ -12,23 +12,23 @@ SET pmsRoot=%2 IF "%phpcli%"=="" SET /P phpcli="Please input your php path:(example: c:\windows\php.exe)" if "%phpcli%"=="" ( echo php path is error - goto input_php + goto input_php ) if not exist %phpcli% ( echo php path is error - goto input_php + goto input_php ) :input_url IF "%pmsRoot%"=="" SET /P pmsRoot="Please input zentao url:(example: http://localhost or http://127.0.0.1:88)" IF "%pmsRoot%"=="" ( echo zentao url is error - goto input_url + goto input_url ) :: get pmsRoot if "%pmsRoot:~-1%" == "/" SET pmsRoot=%pmsRoot:~0,-1% :: get requestType -SET requestType= 'PATH_INFO' +SET requestType= 'PATH_INFO' for /f "tokens=3" %%f in ('find /c "'PATH_INFO'" "%baseDir%..\config\my.php"') do set count=%%f if not defined count set count=1 if %count% == 0 SET requestType='GET' @@ -58,18 +58,18 @@ echo dailyreminder.bat ok :: create computeburn.bat if %requestType% == 'PATH_INFO' ( - SET computeburn= %phpcli% %baseDir%ztcli "%pmsRoot%/project-computeburn" + SET computeburn= %phpcli% %baseDir%ztcli "%pmsRoot%/execution-computeburn" )else ( - SET computeburn= %phpcli% %baseDir%ztcli "%pmsRoot%/index.php?m=project&f=computeburn" + SET computeburn= %phpcli% %baseDir%ztcli "%pmsRoot%/index.php?m=execution&f=computeburn" ) echo %computeburn% > %baseDir%computeburn.bat echo computeburn.bat ok :: create computetaskeffort.bat if %requestType% == 'PATH_INFO' ( - SET computetaskeffort= %phpcli% %baseDir%ztcli "%pmsRoot%/project-computetaskeffort" + SET computetaskeffort= %phpcli% %baseDir%ztcli "%pmsRoot%/execution-computetaskeffort" )else ( - SET computetaskeffort= %phpcli% %baseDir%ztcli "%pmsRoot%/index.php?m=project&f=computetaskeffort" + SET computetaskeffort= %phpcli% %baseDir%ztcli "%pmsRoot%/index.php?m=execution&f=computetaskeffort" ) echo %computetaskeffort% > %baseDir%computetaskeffort.bat echo computetaskeffort.bat ok diff --git a/bin/init.sh b/bin/init.sh index ae18cd6aa9..6af39a58a0 100755 --- a/bin/init.sh +++ b/bin/init.sh @@ -7,25 +7,25 @@ basePath=$(cd "$(dirname "$0")"; pwd) if [ ! -n "$1" ]; then while :; do echo "Please input your php path:(example: /usr/bin/php)" - read phpcli - if [ ! -f $phpcli ]; then + read phpcli + if [ ! -f $phpcli ]; then echo "php path is error"; elif [ "$phpcli"x != ""x ]; then break; fi done -fi +fi if [ ! -n "$2" ]; then while :; do echo "Please input zentao url:(example: http://localhost:88/zentao or http://localhost)" - read pmsRoot + read pmsRoot if [ -z "$pmsRoot" ]; then - echo "zentao url is error"; + echo "zentao url is error"; else break; fi done -fi +fi pmsRoot=`echo "$pmsRoot" | sed 's/[/]$//g'` cat $basePath/../config/my.php |awk '$1!~/^\/\//&& $1~/\$config\->requestType/{requestType = $0} END{print requestType}'| grep -c 'PATH_INFO' > ./init.tmp @@ -52,18 +52,18 @@ echo "backup.sh ok" # computeburn if [ $requestType == 'PATH_INFO' ]; then - computeburn="$phpcli $basePath/ztcli '$pmsRoot/project-computeburn'"; + computeburn="$phpcli $basePath/ztcli '$pmsRoot/execution-computeburn'"; else - computeburn="$phpcli $basePath/ztcli '$pmsRoot/index.php?m=project&f=computeburn'"; + computeburn="$phpcli $basePath/ztcli '$pmsRoot/index.php?m=execution&f=computeburn'"; fi echo $computeburn > $basePath/computeburn.sh echo "computeburn.sh ok" # compute task effort. if [ $requestType == 'PATH_INFO' ]; then - computetaskeffort="$phpcli $basePath/ztcli '$pmsRoot/project-computetaskeffort'"; + computetaskeffort="$phpcli $basePath/ztcli '$pmsRoot/execution-computetaskeffort'"; else - computetaskeffort="$phpcli $basePath/ztcli '$pmsRoot/index.php?m=project&f=computetaskeffort'"; + computetaskeffort="$phpcli $basePath/ztcli '$pmsRoot/index.php?m=execution&f=computetaskeffort'"; fi echo $computetaskeffort > $basePath/computetaskeffort.sh echo "computetaskeffort.sh ok" From 531422c8a0b59d1dcb9f73864ec59e0f9d0cba8f Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 14 Mar 2022 16:07:45 +0800 Subject: [PATCH 07/10] * Modify the problem of deleting two out file commands. --- module/upgrade/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/upgrade/model.php b/module/upgrade/model.php index c8ab0aa00e..34e4701090 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -5828,7 +5828,7 @@ class upgradeModel extends model } } - if(empty($customFiles) or $module == 'owt') $encryptModules[] = $module; + if(empty($customFiles) or $module == 'owt') $encryptModules[$module] = $module; } return $encryptModules; } From c1f3258a74313ba6915e1792667fa9c899f892d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A1=E6=A0=8B?= Date: Mon, 14 Mar 2022 16:08:58 +0800 Subject: [PATCH 08/10] * adjust for get dynamic. --- module/action/model.php | 12 ++++++++++++ module/company/control.php | 5 ++--- module/execution/control.php | 3 +-- module/misc/control.php | 2 +- module/my/control.php | 3 +-- module/product/control.php | 3 +-- module/project/control.php | 3 +-- module/user/control.php | 3 +-- 8 files changed, 20 insertions(+), 14 deletions(-) diff --git a/module/action/model.php b/module/action/model.php index 8930772423..338dcc9ecf 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -877,6 +877,17 @@ class actionModel extends model $actionCondition = $this->getActionCondition(); if(!$actionCondition and !$this->app->user->admin and isset($this->app->user->rights['acls']['actions'])) return array(); + /* Restrict query data in this year when no limit for big data. */ + $beginDate = ''; + if($period == 'all') + { + $year = date('Y'); + $beginDate = $year . '-01-01'; + + /* When query all dynamic then query the data of the last two years at most. */ + if($this->app->getMethodName() == 'dynamic') $beginDate = $year - 1 . '-01-01'; + } + /* Get actions. */ $actions = $this->dao->select('*')->from(TABLE_ACTION) ->where('objectType')->notIN('kanbanregion,kanbanlane,kanbancolumn') @@ -885,6 +896,7 @@ class actionModel extends model ->beginIF($period != 'all')->andWhere('date')->lt($end)->fi() ->beginIF($date)->andWhere('date' . ($direction == 'next' ? '<' : '>') . "'{$date}'")->fi() ->beginIF($account != 'all')->andWhere('actor')->eq($account)->fi() + ->beginIF($beginDate)->andWhere('date')->ge($beginDate)->fi() ->beginIF(is_numeric($productID))->andWhere('product')->like("%,$productID,%")->fi() ->andWhere() ->markLeft(1) diff --git a/module/company/control.php b/module/company/control.php index 928951ca2d..6be397edcb 100644 --- a/module/company/control.php +++ b/module/company/control.php @@ -205,7 +205,6 @@ class company extends control /* Append id for secend sort. */ $order = $direction == 'next' ? 'date_desc' : 'date_asc'; - $sort = common::appendOrder($order); $queryID = ($browseType == 'bysearch') ? (int)$param : 0; $date = empty($date) ? '' : date('Y-m-d', $date); @@ -245,11 +244,11 @@ class company extends control if(!$productID) $productID = 'all'; if(!$projectID) $projectID = 'all'; if(!$executionID) $executionID = 'all'; - $actions = $this->action->getDynamic($account, $browseType, $sort, $pager, $productID, $projectID, $executionID, $date, $direction); + $actions = $this->action->getDynamic($account, $browseType, $orderBy, $pager, $productID, $projectID, $executionID, $date, $direction); } else { - $actions = $this->action->getDynamicBySearch($products, $projects, $executions, $queryID, $sort, $pager, $date, $direction); + $actions = $this->action->getDynamicBySearch($products, $projects, $executions, $queryID, $orderBy, $pager, $date, $direction); } /* Build search form. */ diff --git a/module/execution/control.php b/module/execution/control.php index 4fe9be0e98..536f54314c 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2957,7 +2957,6 @@ class execution extends control /* Append id for secend sort. */ $orderBy = $direction == 'next' ? 'date_desc' : 'date_asc'; - $sort = common::appendOrder($orderBy); /* Set the menu. If the executionID = 0, use the indexMenu instead. */ $this->execution->setMenu($executionID); @@ -2975,7 +2974,7 @@ class execution extends control } $period = $type == 'account' ? 'all' : $type; $date = empty($date) ? '' : date('Y-m-d', $date); - $actions = $this->loadModel('action')->getDynamic($account, $period, $sort, $pager, 'all', 'all', $executionID, $date, $direction); + $actions = $this->loadModel('action')->getDynamic($account, $period, $orderBy, $pager, 'all', 'all', $executionID, $date, $direction); /* The header and position. */ $execution = $this->execution->getByID($executionID); diff --git a/module/misc/control.php b/module/misc/control.php index 5806605e9e..e019cd355d 100644 --- a/module/misc/control.php +++ b/module/misc/control.php @@ -74,7 +74,7 @@ class misc extends control $source = isset($this->config->qcVersion) ? 'qucheng' : 'zentao'; $lang = str_replace('-', '_', $this->app->getClientLang()); - $link = $website . "/updater-getLatest-{$this->config->version}-$source-$lang.html"; + $link = $website . "/updater-getLatest-{$this->config->version}-$source-$lang-$sn.html"; $latestVersionList = common::http($link); diff --git a/module/my/control.php b/module/my/control.php index 5d5ab3710d..a8aa2cb476 100644 --- a/module/my/control.php +++ b/module/my/control.php @@ -1236,14 +1236,13 @@ EOF; /* Append id for secend sort. */ $orderBy = $direction == 'next' ? 'date_desc' : 'date_asc'; - $sort = common::appendOrder($orderBy); /* The header and position. */ $this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->dynamic; $this->view->position[] = $this->lang->my->dynamic; $date = empty($date) ? '' : date('Y-m-d', $date); - $actions = $this->loadModel('action')->getDynamic($this->app->user->account, $type, $sort, $pager, 'all', 'all', 'all', $date, $direction); + $actions = $this->loadModel('action')->getDynamic($this->app->user->account, $type, $orderBy, $pager, 'all', 'all', 'all', $date, $direction); if(empty($recTotal)) $originTotal = $pager->recTotal; /* Assign. */ diff --git a/module/product/control.php b/module/product/control.php index 4592341ed0..36c5626427 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -854,7 +854,6 @@ class product extends control /* Append id for secend sort. */ $orderBy = $direction == 'next' ? 'date_desc' : 'date_asc'; - $sort = common::appendOrder($orderBy); /* Load pager. */ $this->app->loadClass('pager', $static = true); @@ -869,7 +868,7 @@ class product extends control } $period = $type == 'account' ? 'all' : $type; $date = empty($date) ? '' : date('Y-m-d', $date); - $actions = $this->loadModel('action')->getDynamic($account, $period, $sort, $pager, $productID, 'all', 'all', $date, $direction); + $actions = $this->loadModel('action')->getDynamic($account, $period, $orderBy, $pager, $productID, 'all', 'all', $date, $direction); /* The header and position. */ $this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->product->dynamic; diff --git a/module/project/control.php b/module/project/control.php index 03a59afece..43ab479db3 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -840,7 +840,6 @@ class project extends control /* Append id for secend sort. */ $orderBy = $direction == 'next' ? 'date_desc' : 'date_asc'; - $sort = common::appendOrder($orderBy); /* Set the pager. */ $this->app->loadClass('pager', $static = true); @@ -855,7 +854,7 @@ class project extends control } $period = $type == 'account' ? 'all' : $type; $date = empty($date) ? '' : date('Y-m-d', $date); - $actions = $this->loadModel('action')->getDynamic($account, $period, $sort, $pager, 'all', $projectID, 'all', $date, $direction); + $actions = $this->loadModel('action')->getDynamic($account, $period, $orderBy, $pager, 'all', $projectID, 'all', $date, $direction); /* The header and position. */ $project = $this->project->getByID($projectID); diff --git a/module/user/control.php b/module/user/control.php index af9a4e1fb3..cc5c85ac23 100644 --- a/module/user/control.php +++ b/module/user/control.php @@ -1110,10 +1110,9 @@ class user extends control /* Append id for secend sort. */ $orderBy = $direction == 'next' ? 'date_desc' : 'date_asc'; - $sort = common::appendOrder($orderBy); $date = empty($date) ? '' : date('Y-m-d', $date); - $actions = $this->loadModel('action')->getDynamic($account, $period, $sort, $pager, 'all', 'all', 'all', $date, $direction); + $actions = $this->loadModel('action')->getDynamic($account, $period, $orderBy, $pager, 'all', 'all', 'all', $date, $direction); $this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->dynamic; $this->view->position[] = $this->lang->user->dynamic; From 37153ad060040897ddfba73eae0db819c93b9ae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B9=BF=E6=98=8E?= Date: Mon, 14 Mar 2022 16:34:49 +0800 Subject: [PATCH 09/10] * Fix bug #20725 --- db/update12.5.3.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/db/update12.5.3.sql b/db/update12.5.3.sql index 68f393fde4..ddf17ef270 100644 --- a/db/update12.5.3.sql +++ b/db/update12.5.3.sql @@ -23,6 +23,9 @@ ALTER TABLE `zt_project` ADD `output` text NOT NULL AFTER `milestone`; ALTER TABLE `zt_project` ADD `lastEditedBy` varchar(30) NOT NULL DEFAULT '' AFTER `openedVersion`; ALTER TABLE `zt_project` ADD `lastEditedDate` datetime NOT NULL AFTER `lastEditedBy`; +ALTER TABLE `zt_case` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`; +ALTER TABLE `zt_case` ADD `execution` mediumint(8) unsigned NOT NULL AFTER `project`; + ALTER TABLE `zt_action` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_bug` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_build` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; @@ -30,7 +33,6 @@ ALTER TABLE `zt_burn` CHANGE `project` `execution` mediumint(8) unsigned NOT NUL ALTER TABLE `zt_doc` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_relation` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_relation` CHANGE `program` `project` mediumint(8) unsigned NOT NULL; -ALTER TABLE `zt_case` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_doclib` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_task` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_testreport` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; @@ -43,7 +45,6 @@ ALTER TABLE `zt_doclib` ADD `project` mediumint(8) unsigned NOT NULL AFTER `prod ALTER TABLE `zt_doc` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`; ALTER TABLE `zt_story` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`; ALTER TABLE `zt_bug` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`; -ALTER TABLE `zt_case` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`; ALTER TABLE `zt_testtask` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`; ALTER TABLE `zt_testreport` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`; ALTER TABLE `zt_testsuite` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`; From dea36cfea3eed2c6f53ca49ae5eb320fc6584138 Mon Sep 17 00:00:00 2001 From: liyang <“liyang@easycorp.ltd”> Date: Mon, 14 Mar 2022 16:45:33 +0800 Subject: [PATCH 10/10] update data and add execution --- test/class/execution.class.php | 112 +++++++++++++++++++++ test/data/effort.yaml | 90 +++++++++++++++++ test/data/executionstory.yaml | 40 ++++++++ test/data/kanbancolumn.yaml | 4 - test/data/kanbancolumnproject.yaml | 4 - test/data/projectstory.yaml | 40 ++++++++ test/data/todo.yaml | 71 ++++++------- test/data/zentao/config.php | 4 + test/data/zt_todo.yaml | 14 ++- test/model/execution/addProjectMembers.php | 33 ++++++ test/model/execution/computeBurn.php | 26 +++++ test/model/execution/fixFirst.php | 31 ++++++ test/model/execution/getBurnDataFlot.php | 28 ++++++ test/model/execution/unlinkMember.php | 32 ++++++ 14 files changed, 478 insertions(+), 51 deletions(-) create mode 100644 test/data/effort.yaml create mode 100644 test/data/executionstory.yaml create mode 100644 test/data/projectstory.yaml create mode 100755 test/model/execution/addProjectMembers.php create mode 100755 test/model/execution/computeBurn.php create mode 100755 test/model/execution/fixFirst.php create mode 100755 test/model/execution/getBurnDataFlot.php create mode 100755 test/model/execution/unlinkMember.php diff --git a/test/class/execution.class.php b/test/class/execution.class.php index 70f5ab4e8b..0bb079d5ac 100644 --- a/test/class/execution.class.php +++ b/test/class/execution.class.php @@ -950,4 +950,116 @@ class executionTest } } } + + public function addProjectMembersTest($projectID = 0, $executionID, $count) + { + global $tester; + $tester->dbh->query("delete from zt_team where root = $projectID"); + $executionMembers = $tester->dao->select('`root`,`account`,`join`,`role`,`days`,`type`,`hours`')->from(TABLE_TEAM)->where('root')->eq($executionID)->fetchAll('account'); + $this->objectModel->addProjectMembers($projectID, $executionMembers); + $object = $tester->dao->select('*')->from(TABLE_TEAM)->where('root')->eq($projectID)->fetchAll(); + if(dao::isError()) + { + $error = dao::getError(); + return $error; + } + elseif($count == "1") + { + return count($object); + } + else + { + return $object; + } + } + + public function unlinkMemberTest($sprintID, $account, $count) + { + global $tester; + $oldObject = $tester->dao->select('*')->from(TABLE_TEAM)->where('root')->eq($sprintID)->fetchAll(); + $this->objectModel->unlinkMember($sprintID, $account); + $object = $tester->dao->select('*')->from(TABLE_TEAM)->where('root')->eq($sprintID)->fetchAll(); + if(dao::isError()) + { + $error = dao::getError(); + return $error; + } + elseif($count == "1") + { + return count($oldObject); + } + else + { + return $object; + } + } + + public function computeBurnTest($count) + { + $object = $this->objectModel->computeBurn(); + if(dao::isError()) + { + $error = dao::getError(); + return $error; + } + elseif($count == "1") + { + return count($object); + } + else + { + return $object; + } + } + + public function fixFirstTest($executionID, $count, $param = array()) + { + global $tester; + $date = date('Y-m-d'); + $createFields = array('estimate' => ''); + foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue; + foreach($param as $key => $value) $_POST[$key] = $value; + $this->objectModel->computeBurn(); + $this->objectModel->fixFirst($executionID); + unset($_POST); + $object = $tester->dao->select('*')->from(TABLE_BURN)->where('execution')->eq($executionID)->andWhere('date')->eq($date)->fetchAll(); + if(dao::isError()) + { + $error = dao::getError(); + return $error; + } + elseif($count == "1") + { + return count($object); + } + else + { + if(empty($object)) + { + return '无数据'; + } + else + { + return $object; + } + } + } + + public function getBurnDataFlotTest($executionID = 0, $count) + { + $object = $this->objectModel->getBurnDataFlot($executionID, $burnBy = 'left'); + if(dao::isError()) + { + $error = dao::getError(); + return $error; + } + elseif($count == "1") + { + return count($object); + } + else + { + return $object; + } + } } diff --git a/test/data/effort.yaml b/test/data/effort.yaml new file mode 100644 index 0000000000..1e458fa1d5 --- /dev/null +++ b/test/data/effort.yaml @@ -0,0 +1,90 @@ +title: table zt_effort +desc: "任务工时记录" +author: automated export +version: "1.0" +fields: + - field: id + note: "ID" + range: "1-10000" + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: objectType + note: "对象类型" + range: "custom" + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: objectID + note: "对象ID" + range: "0" + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: product + note: "产品ID" + range: "0" + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: project + note: "项目ID" + range: "0" + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: account + note: "用户账号" + fields: + - field: account1 + range: admin,user{99} + - field: account2 + range: [],1-99 + format: "" + - field: work + note: "工作内容" + range: "1-10000" + prefix: "这是工作内容" + postfix: "" + loop: 0 + format: "" + - field: date + note: "创建日期" + range: "(M)-(w)" + type: timestamp + prefix: "DateTime" + postfix: "" + format: "YY/MM/DD" + - field: left + note: "剩余" + range: "0" + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: consumed + note: "消耗" + range: 1-100:5 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: begin + note: "开始" + range: 1000-1059:2 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: end + note: "结束" + range: 1400-1459:2 + prefix: "" + postfix: "" + loop: 0 + format: "" diff --git a/test/data/executionstory.yaml b/test/data/executionstory.yaml new file mode 100644 index 0000000000..08136cd670 --- /dev/null +++ b/test/data/executionstory.yaml @@ -0,0 +1,40 @@ +title: table zt_projectstory +desc: "项目需求关系" +author: automated export +version: "1.0" +fields: + - field: project + note: "项目ID" + range: 101-190{2} + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: product + note: "产品ID" + range: 1-10000{2} + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: story + note: "需求ID" + range: 2-400:2 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: version + note: "版本" + range: 1 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: order + note: "排序" + range: 1,2 + prefix: "" + postfix: "" + loop: 0 + format: "" diff --git a/test/data/kanbancolumn.yaml b/test/data/kanbancolumn.yaml index 973e894b3e..ad5cd87243 100644 --- a/test/data/kanbancolumn.yaml +++ b/test/data/kanbancolumn.yaml @@ -3,8 +3,6 @@ desc: "" author: automated export version: "1.0" fields: - - field: lane - range: "0" - field: parent range: "0" - field: type @@ -22,8 +20,6 @@ fields: range: "" - field: order range: 1-4 - - field: cards - range: "" - field: archived range: "0" - field: deleted diff --git a/test/data/kanbancolumnproject.yaml b/test/data/kanbancolumnproject.yaml index f380021651..1ae6f3cd0f 100644 --- a/test/data/kanbancolumnproject.yaml +++ b/test/data/kanbancolumnproject.yaml @@ -5,8 +5,6 @@ version: "1.0" fields: - field: id range: 401-100000 - - field: lane - range: "0" - field: parent range: "0" - field: type @@ -23,8 +21,6 @@ fields: range: "" - field: order range: "0" - - field: cards - range: "" - field: archived range: "0" - field: deleted diff --git a/test/data/projectstory.yaml b/test/data/projectstory.yaml new file mode 100644 index 0000000000..268ffd98be --- /dev/null +++ b/test/data/projectstory.yaml @@ -0,0 +1,40 @@ +title: table zt_projectstory +desc: "项目需求关系" +author: automated export +version: "1.0" +fields: + - field: project + note: "项目ID" + range: 11-100{2} + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: product + note: "产品ID" + range: 1-10000{2} + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: story + note: "需求ID" + range: 2-400:2 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: version + note: "版本" + range: 1 + prefix: "" + postfix: "" + loop: 0 + format: "" + - field: order + note: "排序" + range: 1,2 + prefix: "" + postfix: "" + loop: 0 + format: "" diff --git a/test/data/todo.yaml b/test/data/todo.yaml index 129fab9484..2bc762286c 100644 --- a/test/data/todo.yaml +++ b/test/data/todo.yaml @@ -1,65 +1,64 @@ title: table zt_todo desc: "待办" -author: automated export +author: ly version: "1.0" fields: - field: id note: "ID" - range: "1-10000" + range: 1-10000 prefix: "" postfix: "" loop: 0 format: "" - field: account - note: "用户账号" + note: "用户名" fields: - - field: account1 - range: test,dev - - field: account2 - range: 1-100 + - field: account1 + range: admin,user{99},test{100},dev{100},pm{100},po{100},td{100},pd{100},qd{100},top{100},outside{100} + - field: account2 + range: [],1-99,1-100,1-100,1-100,1-100,1-100,1-100,1-100,1-100,1-100 prefix: "" postfix: "" loop: 0 format: "" - field: date note: "日期" - from: common.date.v1.yaml - use: dateB - prefix: "" + range: "(M)-(w)" + type: timestamp + prefix: "DateTime" postfix: "" - loop: 0 - format: "" + format: "YY/MM/DD" - field: begin note: "开始" - range: "1000-1300:R" + range: "1000-1059:2" prefix: "" postfix: "" loop: 0 format: "" - field: end note: "结束" - range: "1400-2000:R" + range: "1400-1459:2" prefix: "" postfix: "" loop: 0 format: "" - field: type note: "类型" - range: custom{20},bug{20},task{20},story{20},testtask{20} + range: custom,bug,task,story,testtask prefix: "" postfix: "" loop: 0 format: "" - field: idvalue note: "关联编号" - range: 0{20},1-20{20},1-20{20},1-20{20},1-20{20} + range: 0,1-20,1-20,1-20,1-20 prefix: "" postfix: "" loop: 0 format: "" - field: pri note: "优先级" - range: 1-4:R + range: 1-4 prefix: "" postfix: "" loop: 0 @@ -68,11 +67,11 @@ fields: note: "待办名称" fields: - field: name1 - range: "这是一个" + range: 自定义,BUG,任务,需求,测试单 - field: name2 - range: 自定义{20},BUG{20},任务{20},需求{20},测试单{20} + range: 1-200,1-200,1-200,1-200.1-200 prefix: "" - postfix: "的名称" + postfix: "的待办" loop: 0 format: "" - field: desc @@ -84,7 +83,7 @@ fields: format: "" - field: status note: "状态" - range: [wait,doing,done,closed]:R + range: wait,doing,done,closed prefix: "" postfix: "" loop: 0 @@ -98,35 +97,37 @@ fields: format: "" - field: config note: "配置" - range: 1-10000 - prefix: "这里待办json配置" + range: "" + prefix: "" postfix: "" - loop: 0 format: "" - field: assignedTo note: "指派给" - from: common.user.v1.yaml - use: user + fields: + - field: ass1 + range: admin,user{99},test{100},dev{100},pm{100},po{100},td{100},pd{100},qd{100},top{100},outside{100} + - field: ass2 + range: [],1-99,1-100,1-100,1-100,1-100,1-100,1-100,1-100,1-100,1-100 prefix: "" postfix: "" - loop: 0 format: "" - field: assignedBy note: "由谁指派" - from: common.user.v1.yaml - use: user + fields: + - field: ass1 + range: admin,user{99},test{100},dev{100},pm{100},po{100},td{100},pd{100},qd{100},top{100},outside{100} + - field: ass2 + range: [],1-99,1-100,1-100,1-100,1-100,1-100,1-100,1-100,1-100,1-100 prefix: "" postfix: "" - loop: 0 format: "" - field: assignedDate note: "指派日期" - from: common.date.v1.yaml - use: dateA - prefix: "" + range: "(M)-(w):60m" + type: timestamp + prefix: "DateTime" postfix: "" - loop: 0 - format: "" + format: "YY/MM/DD hh:mm:ss" - field: finishedBy note: "由谁完成" from: common.user.v1.yaml diff --git a/test/data/zentao/config.php b/test/data/zentao/config.php index 85994d8220..507db40578 100644 --- a/test/data/zentao/config.php +++ b/test/data/zentao/config.php @@ -3,6 +3,8 @@ $builder = new stdclass(); $builder->company = array('rows' => 1, 'extends' => array('company')); $builder->user = array('rows' => 1000, 'extends' => array('user')); +$builder->todo = array('rows' => 2000, 'extends' => array('todo')); +$builder->effort = array('rows' => 100, 'extends' => array('effort')); $builder->usergroup = array('rows' => 600, 'extends' => array('usergroup')); $builder->dept = array('rows' => 100, 'extends' => array('dept')); $builder->action = array('rows' => 100, 'extends' => array('action')); @@ -28,6 +30,8 @@ $builder->productline = array('rows' => 20, 'extends' => array('module', 'pr $builder->productplan = array('rows' => 30, 'extends' => array('productplan')); $builder->branch = array('rows' => 240, 'extends' => array('branch')); $builder->projectproduct = array('rows' => 200, 'extends' => array('projectproduct')); +$builder->projectstory = array('rows' => 200, 'extends' => array('projectstory')); +$builder->executionstory = array('rows' => 180, 'extends' => array('projectstory','executionstory')); $builder->kanbanspace = array('rows' => 50, 'extends' => array('kanbanspace')); $builder->kanban = array('rows' => 100, 'extends' => array('kanban')); diff --git a/test/data/zt_todo.yaml b/test/data/zt_todo.yaml index 46024752a6..e61da8cbb3 100644 --- a/test/data/zt_todo.yaml +++ b/test/data/zt_todo.yaml @@ -10,14 +10,12 @@ fields: postfix: "" loop: 0 format: "" - - field: account - note: "所有者" - from: common.user.v1.yaml - use: user - prefix: "" - postfix: "" - loop: 0 - format: "" + - field: account + - fields: + - field: account1 + range: admin,user{99},test{100},dev{100},pm{100},po{100},td{100},pd{100},qd{100},top{100},outside{100} + - field: account2 + range: []{2},1-99{2},1-100,1-100,1-100,1-100,1-100,1-100,1-100,1-100,1-100 - field: date note: "日期" from: common.date.v1.yaml diff --git a/test/model/execution/addProjectMembers.php b/test/model/execution/addProjectMembers.php new file mode 100755 index 0000000000..b003ab4286 --- /dev/null +++ b/test/model/execution/addProjectMembers.php @@ -0,0 +1,33 @@ +#!/usr/bin/env php +addProjectMembersTest(); +cid=1 +pid=1 + +敏捷执行关联用例 >> 101,1,1 +瀑布执行关联用例 >> 131,43,169 +看板执行关联用例 >> 161,68,269 +敏捷执行关联用例统计 >> 4 +瀑布执行关联用例统计 >> 4 +看板执行关联用例统计 >> 4 + +*/ + +$projectIDList = array('11', '41', '71'); +$executionIDList = array('101', '131', '161', '1611'); +$count = array('0','1'); + +$execution = new executionTest(); +r($execution->addProjectMembersTest($projectIDList[0], $executionIDList[0], $count[0])) && p('0:account,role') && e('po82,研发'); // 敏捷项目根据执行添加团队信息 +r($execution->addProjectMembersTest($projectIDList[1], $executionIDList[1], $count[0])) && p('0:account,role') && e('test22,测试'); // 瀑布项目根据执行添加团队信息 +r($execution->addProjectMembersTest($projectIDList[2], $executionIDList[2], $count[0])) && p('0:account,role') && e('test52,测试'); // 看板项目根据执行添加团队信息 +r($execution->addProjectMembersTest($projectIDList[0], $executionIDList[0], $count[1])) && p() && e('2'); // 敏捷项目根据执行添加团队信息统计 +r($execution->addProjectMembersTest($projectIDList[1], $executionIDList[1], $count[1])) && p() && e('1'); // 瀑布项目根据执行添加团队信息统计 +r($execution->addProjectMembersTest($projectIDList[2], $executionIDList[2], $count[1])) && p() && e('1'); // 看板项目根据执行添加团队信息统计 +system("./ztest init"); diff --git a/test/model/execution/computeBurn.php b/test/model/execution/computeBurn.php new file mode 100755 index 0000000000..0c4708c18c --- /dev/null +++ b/test/model/execution/computeBurn.php @@ -0,0 +1,26 @@ +#!/usr/bin/env php +computeBurnTest(); +cid=1 +pid=1 + +敏捷执行关联用例 >> 101,1,1 +瀑布执行关联用例 >> 131,43,169 +看板执行关联用例 >> 161,68,269 +敏捷执行关联用例统计 >> 4 +瀑布执行关联用例统计 >> 4 +看板执行关联用例统计 >> 4 + +*/ + +$count = array('0','1'); + +$execution = new executionTest(); +r($execution->computeBurnTest($count[0])) && p('700:executionName') && e('project600'); // 正常初始化 +r($execution->computeBurnTest($count[1])) && p() && e('516'); // 初始化后数据统计 diff --git a/test/model/execution/fixFirst.php b/test/model/execution/fixFirst.php new file mode 100755 index 0000000000..9f83aab0e9 --- /dev/null +++ b/test/model/execution/fixFirst.php @@ -0,0 +1,31 @@ +#!/usr/bin/env php +fixFirstTest(); +cid=1 +pid=1 + +敏捷执行关联用例 >> 101,1,1 +瀑布执行关联用例 >> 131,43,169 +看板执行关联用例 >> 161,68,269 +敏捷执行关联用例统计 >> 4 +瀑布执行关联用例统计 >> 4 +看板执行关联用例统计 >> 4 + +*/ + +$executionIDList = array('101', '131'); + +$scrumEstimate = array('estimate' => '25'); +$withLeft = array('estimate' => '21', 'withLeft' => '1'); +$waterfallEstimate = array('estimate' => '17', 'withLeft' => '1'); + +$execution = new executionTest(); +r($execution->fixFirstTest($executionIDList[0], $scrumEstimate)) && p('0:estimate') && e('26'); // 敏捷执行更新首日工时 +r($execution->fixFirstTest($executionIDList[0], $withLeft)) && p('0:estimate') && e('26'); // 敏捷执行更新首日剩余工时 +r($execution->fixFirstTest($executionIDList[1], $waterfallEstimate)) && p('0:left') && e('17'); // 瀑布执行更新首日剩余工时 diff --git a/test/model/execution/getBurnDataFlot.php b/test/model/execution/getBurnDataFlot.php new file mode 100755 index 0000000000..eb1794d37c --- /dev/null +++ b/test/model/execution/getBurnDataFlot.php @@ -0,0 +1,28 @@ +#!/usr/bin/env php +getBurnDataFlotTest(); +cid=1 +pid=1 + +敏捷执行关联用例 >> 101,1,1 +瀑布执行关联用例 >> 131,43,169 +看板执行关联用例 >> 161,68,269 +敏捷执行关联用例统计 >> 4 +瀑布执行关联用例统计 >> 4 +看板执行关联用例统计 >> 4 + +*/ + +$executionIDList = array('101', '131', '161'); +$count = array('0','1'); + +$execution = new executionTest(); +r($execution->getBurnDataFlotTest($executionIDList[0], $count[1])) && p() && e('2'); // 敏捷执行查询统计 +r($execution->getBurnDataFlotTest($executionIDList[1], $count[1])) && p() && e('2'); // 瀑布执行查询统计 +r($execution->getBurnDataFlotTest($executionIDList[2], $count[1])) && p() && e('1'); // 看板执行查询统计 diff --git a/test/model/execution/unlinkMember.php b/test/model/execution/unlinkMember.php new file mode 100755 index 0000000000..4f3513c639 --- /dev/null +++ b/test/model/execution/unlinkMember.php @@ -0,0 +1,32 @@ +#!/usr/bin/env php +unlinkMemberTest(); +cid=1 +pid=1 + +敏捷执行关联用例 >> 101,1,1 +瀑布执行关联用例 >> 131,43,169 +看板执行关联用例 >> 161,68,269 +敏捷执行关联用例统计 >> 4 +瀑布执行关联用例统计 >> 4 +看板执行关联用例统计 >> 4 + +*/ + +$accountList = array('user92', 'test22', 'test52'); +$executionIDList = array('101', '131', '161'); +$count = array('0','1'); + +$execution = new executionTest(); +r($execution->unlinkMemberTest($executionIDList[0], $accountList[0], $count[0])) && p('0:account,role') && e('po82,研发'); // 敏捷执行解除团队成员 +r($execution->unlinkMemberTest($executionIDList[0], $accountList[0], $count[1])) && p() && e('1'); // 敏捷执行解除团队成员后统计 +r($execution->unlinkMemberTest($executionIDList[1], $accountList[1], $count[0])) && p() && e('0'); // 瀑布执行解除团队成员 +r($execution->unlinkMemberTest($executionIDList[2], $accountList[2], $count[0])) && p('0:account,role') && e('test52,测试'); // 看板执行解除团队成员 +r($execution->unlinkMemberTest($executionIDList[2], $accountList[2], $count[1])) && p() && e('1'); // 看板执行解除团队成员后统计 +system("./ztest init");