convert->jira->importJira;?>
+convert->jira->importJira;?>
-
+
+
diff --git a/VERSION b/VERSION index b0bc340199..d50f97b52d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -16.3 +16.4 diff --git a/config/config.php b/config/config.php index 8dad6352ea..c4ffeac0f1 100644 --- a/config/config.php +++ b/config/config.php @@ -16,7 +16,7 @@ if(!class_exists('config')){class config{}} if(!function_exists('getWebRoot')){function getWebRoot(){}} /* 基本设置。Basic settings. */ -$config->version = '16.3'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it. +$config->version = '16.4'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it. $config->charset = 'UTF-8'; // ZenTaoPHP的编码。 The encoding of ZenTaoPHP. $config->cookieLife = time() + 2592000; // Cookie的生存时间。The cookie life time. $config->timezone = 'Asia/Shanghai'; // 时区设置。 The time zone setting, for more see http://www.php.net/manual/en/timezones.php. diff --git a/config/zentaopms.php b/config/zentaopms.php index 536816e448..04b1f89ca2 100644 --- a/config/zentaopms.php +++ b/config/zentaopms.php @@ -23,6 +23,14 @@ $config->productCommonList['fr'][0] = 'Product'; $config->productCommonList['fr'][1] = 'Project'; $config->productCommonList['vi'][0] = 'Sản phẩm'; $config->productCommonList['vi'][1] = 'Project'; +$config->productCommonList['ru'][0] = 'продукт'; +$config->productCommonList['ru'][1] = 'Проект'; +$config->productCommonList['ja'][0] = '製品'; +$config->productCommonList['ja'][1] = 'プロジェクト'; +$config->productCommonList['es'][0] = 'Productos'; +$config->productCommonList['es'][1] = 'Proyecto'; +$config->productCommonList['pt'][0] = 'produto'; +$config->productCommonList['pt'][1] = 'projecto'; /* Project common list. */ $config->projectCommonList['zh-cn'][0] = '项目'; @@ -49,6 +57,22 @@ $config->projectCommonList['vi'][0] = 'Project'; $config->projectCommonList['vi'][1] = 'Iteration'; $config->projectCommonList['vi'][2] = 'Sprint'; +$config->projectCommonList['ru'][0] = 'Проект'; +$config->projectCommonList['ru'][1] = 'итерация'; +$config->projectCommonList['ru'][2] = 'пробивание'; + +$config->projectCommonList['ja'][0] = 'プロジェクト'; +$config->projectCommonList['ja'][1] = '反復'; +$config->projectCommonList['ja'][2] = 'スパート'; + +$config->projectCommonList['es'][0] = 'Proyecto'; +$config->projectCommonList['es'][1] = 'Iteración'; +$config->projectCommonList['es'][2] = 'Sprint'; + +$config->projectCommonList['pt'][0] = 'Projecto'; +$config->projectCommonList['pt'][1] = 'Iteração'; +$config->projectCommonList['pt'][2] = 'Sprint'; + $config->executionCommonList['zh-cn'][0] = '迭代'; $config->executionCommonList['zh-cn'][1] = '冲刺'; $config->executionCommonList['zh-cn'][2] = '阶段'; @@ -73,6 +97,22 @@ $config->executionCommonList['vi'][0] = 'Lặp lại'; $config->executionCommonList['vi'][1] = 'Sprint'; $config->executionCommonList['vi'][2] = 'Giai đoạn'; +$config->executionCommonList['ru'][0] = 'итерация'; +$config->executionCommonList['ru'][1] = 'пробивание'; +$config->executionCommonList['ru'][2] = ' этап'; + +$config->executionCommonList['ja'][0] = '反復'; +$config->executionCommonList['ja'][1] = 'スパート'; +$config->executionCommonList['ja'][2] = 'ステージ'; + +$config->executionCommonList['es'][0] = 'Iteración'; +$config->executionCommonList['es'][1] = 'Sprint'; +$config->executionCommonList['es'][2] = 'Fase'; + +$config->executionCommonList['pt'][0] = 'Iteração'; +$config->executionCommonList['pt'][1] = 'Sprint'; +$config->executionCommonList['pt'][2] = 'Fase'; + /* Story common list. */ $config->hourPointCommonList['zh-cn'][0] = '工时'; $config->hourPointCommonList['zh-cn'][1] = '故事点'; @@ -98,6 +138,22 @@ $config->hourPointCommonList['vi'][0] = 'giờ'; $config->hourPointCommonList['vi'][1] = 'điểm'; $config->hourPointCommonList['vi'][2] = 'function point'; +$config->hourPointCommonList['ru'][0] = 'продолжительность рабочего времени'; +$config->hourPointCommonList['ru'][1] = 'точка повести'; +$config->hourPointCommonList['ru'][2] = 'функциональная точка'; + +$config->hourPointCommonList['ja'][0] = '工数'; +$config->hourPointCommonList['ja'][1] = 'ストーリーポイント'; +$config->hourPointCommonList['ja'][2] = 'きのうてん'; + +$config->hourPointCommonList['es'][0] = 'Horas de trabajo'; +$config->hourPointCommonList['es'][1] = 'Punto de historia'; +$config->hourPointCommonList['es'][2] = 'Punto de función'; + +$config->hourPointCommonList['pt'][0] = 'horas de trabalho'; +$config->hourPointCommonList['pt'][1] = 'Ponto da história'; +$config->hourPointCommonList['pt'][2] = 'Ponto de função'; + $config->manualUrl['home'] = 'https://www.zentao.net/book/zentaopmshelp.html?fullScreen=zentao'; $config->manualUrl['int'] = 'https://www.zentao.pm/book/zentaomanual/zentao-installation-11.html?fullScreen=zentao'; @@ -114,6 +170,14 @@ $config->charsets['fr']['utf-8'] = 'UTF-8'; $config->charsets['fr']['GBK'] = 'GBK'; $config->charsets['vi']['utf-8'] = 'UTF-8'; $config->charsets['vi']['GBK'] = 'GBK'; +$config->charsets['ru']['utf-8'] = 'UTF-8'; +$config->charsets['ru']['GBK'] = 'GBK'; +$config->charsets['ja']['utf-8'] = 'UTF-8'; +$config->charsets['ja']['GBK'] = 'GBK'; +$config->charsets['es']['utf-8'] = 'UTF-8'; +$config->charsets['es']['GBK'] = 'GBK'; +$config->charsets['pt']['utf-8'] = 'UTF-8'; +$config->charsets['pt']['GBK'] = 'GBK'; $config->openMethods = array(); $config->openMethods[] = 'gitlab.webhook'; diff --git a/db/standard/zentao16.4.sql b/db/standard/zentao16.4.sql new file mode 100644 index 0000000000..b0218f4cae --- /dev/null +++ b/db/standard/zentao16.4.sql @@ -0,0 +1,1615 @@ +CREATE TABLE `zt_acl` ( + `id` mediumint(9) NOT NULL AUTO_INCREMENT, + `account` char(30) NOT NULL, + `objectType` char(30) NOT NULL, + `objectID` mediumint(9) NOT NULL DEFAULT '0', + `type` char(40) NOT NULL DEFAULT 'whitelist', + `source` char(30) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_action` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `objectType` varchar(30) NOT NULL DEFAULT '', + `objectID` mediumint(8) unsigned NOT NULL DEFAULT '0', + `product` varchar(255) NOT NULL, + `project` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `actor` varchar(100) NOT NULL DEFAULT '', + `action` varchar(30) NOT NULL DEFAULT '', + `date` datetime NOT NULL, + `comment` text NOT NULL, + `extra` text NOT NULL, + `read` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `date` (`date`), + KEY `actor` (`actor`), + KEY `project` (`project`), + KEY `action` (`action`), + KEY `objectID` (`objectID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_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 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 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 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 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_block` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `account` char(30) NOT NULL, + `module` varchar(20) NOT NULL, + `type` char(30) NOT NULL, + `title` varchar(100) NOT NULL, + `source` varchar(20) NOT NULL, + `block` varchar(20) NOT NULL, + `params` text NOT NULL, + `order` tinyint(3) unsigned NOT NULL DEFAULT '0', + `grid` tinyint(3) unsigned NOT NULL DEFAULT '0', + `height` smallint(5) unsigned NOT NULL DEFAULT '0', + `hidden` tinyint(1) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `account_module_type_order` (`account`,`module`,`type`,`order`), + KEY `account` (`account`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_branch` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `product` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `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_bug` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL DEFAULT '0', + `branch` mediumint(8) unsigned NOT NULL DEFAULT '0', + `module` mediumint(8) unsigned NOT NULL DEFAULT '0', + `execution` mediumint(8) unsigned NOT NULL DEFAULT '0', + `plan` mediumint(8) unsigned NOT NULL DEFAULT '0', + `story` mediumint(8) unsigned NOT NULL DEFAULT '0', + `storyVersion` smallint(6) NOT NULL DEFAULT '1', + `task` mediumint(8) unsigned NOT NULL DEFAULT '0', + `toTask` mediumint(8) unsigned NOT NULL DEFAULT '0', + `toStory` mediumint(8) NOT NULL DEFAULT '0', + `title` varchar(255) NOT NULL, + `keywords` varchar(255) NOT NULL, + `severity` tinyint(4) NOT NULL DEFAULT '0', + `pri` tinyint(3) unsigned NOT NULL, + `type` varchar(30) NOT NULL DEFAULT '', + `os` varchar(30) NOT NULL DEFAULT '', + `browser` varchar(30) NOT NULL DEFAULT '', + `hardware` varchar(30) NOT NULL, + `found` varchar(30) NOT NULL DEFAULT '', + `steps` text NOT NULL, + `status` enum('active','resolved','closed') NOT NULL DEFAULT 'active', + `subStatus` varchar(30) NOT NULL DEFAULT '', + `color` char(7) NOT NULL, + `confirmed` tinyint(1) NOT NULL DEFAULT '0', + `activatedCount` smallint(6) NOT NULL, + `activatedDate` datetime NOT NULL, + `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', + `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_company` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` char(120) DEFAULT NULL, + `phone` char(20) DEFAULT NULL, + `fax` char(20) DEFAULT NULL, + `address` char(120) DEFAULT NULL, + `zipcode` char(10) DEFAULT NULL, + `website` char(120) DEFAULT NULL, + `backyard` char(120) DEFAULT NULL, + `guest` enum('1','0') NOT NULL DEFAULT '0', + `admins` char(255) DEFAULT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_compile` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(50) NOT NULL, + `job` mediumint(8) unsigned NOT NULL, + `queue` mediumint(8) NOT NULL, + `status` varchar(255) NOT NULL, + `logs` text, + `atTime` varchar(10) NOT NULL, + `testtask` mediumint(8) unsigned NOT NULL, + `tag` varchar(255) NOT NULL, + `times` tinyint(3) unsigned NOT NULL DEFAULT '0', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `updateDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_config` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `owner` char(30) NOT NULL DEFAULT '', + `module` varchar(30) NOT NULL, + `section` char(30) NOT NULL DEFAULT '', + `key` char(30) NOT NULL DEFAULT '', + `value` longtext NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unique` (`owner`,`module`,`section`,`key`) +) ENGINE=MyISAM 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 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, + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `lib` varchar(30) NOT NULL, + `module` varchar(30) NOT NULL, + `title` varchar(255) NOT NULL, + `keywords` varchar(255) NOT NULL, + `type` varchar(30) NOT NULL, + `views` smallint(5) unsigned NOT NULL, + `draft` longtext NOT NULL, + `collector` text NOT NULL, + `addedBy` varchar(30) NOT NULL, + `addedDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `mailto` text, + `acl` varchar(10) NOT NULL DEFAULT 'open', + `groups` varchar(255) NOT NULL, + `users` text NOT NULL, + `version` smallint(5) unsigned NOT NULL DEFAULT '1', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `product` (`product`), + KEY `execution` (`execution`), + KEY `lib` (`lib`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_doccontent` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `doc` mediumint(8) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `digest` varchar(255) NOT NULL, + `content` longtext NOT NULL, + `files` text NOT NULL, + `type` varchar(10) NOT NULL, + `version` smallint(5) unsigned NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `doc_version` (`doc`,`version`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_doclib` ( + `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `type` varchar(30) NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + `project` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `name` varchar(60) NOT NULL, + `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 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_effort` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `user` char(30) NOT NULL DEFAULT '', + `todo` enum('1','0') NOT NULL DEFAULT '1', + `date` date NOT NULL, + `begin` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `end` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `type` enum('1','2','3') NOT NULL DEFAULT '1', + `idvalue` mediumint(8) unsigned NOT NULL DEFAULT '0', + `name` char(30) NOT NULL DEFAULT '', + `desc` char(255) NOT NULL DEFAULT '', + `status` enum('1','2','3') NOT NULL DEFAULT '1', + PRIMARY KEY (`id`), + KEY `user` (`user`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_entry` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(50) NOT NULL, + `account` varchar(30) NOT NULL DEFAULT '', + `code` varchar(20) NOT NULL, + `key` varchar(32) NOT NULL, + `freePasswd` enum('0','1') NOT NULL DEFAULT '0', + `ip` varchar(100) NOT NULL, + `desc` text NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `calledTime` int(10) unsigned NOT NULL DEFAULT '0', + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_expect` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `userID` mediumint(8) NOT NULL, + `project` mediumint(8) NOT NULL DEFAULT '0', + `expect` text NOT NULL, + `progress` text NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_extension` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(150) NOT NULL, + `code` varchar(30) NOT NULL, + `version` varchar(50) NOT NULL, + `author` varchar(100) NOT NULL, + `desc` text NOT NULL, + `license` text NOT NULL, + `type` varchar(20) NOT NULL DEFAULT 'extension', + `site` varchar(150) NOT NULL, + `zentaoCompatible` varchar(100) NOT NULL, + `installedTime` datetime NOT NULL, + `depends` varchar(100) NOT NULL, + `dirs` mediumtext NOT NULL, + `files` mediumtext NOT NULL, + `status` varchar(20) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `code` (`code`), + KEY `name` (`name`), + KEY `installedTime` (`installedTime`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_file` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `pathname` char(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_group` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL DEFAULT '0', + `name` char(30) NOT NULL, + `role` char(30) NOT NULL DEFAULT '', + `desc` char(255) NOT NULL DEFAULT '', + `acl` text, + PRIMARY KEY (`id`) +) ENGINE=MyISAM 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_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, + `lane` mediumint(8) unsigned NOT NULL, + `column` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `status` varchar(30) NOT NULL, + `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, + `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, + `lane` mediumint(8) NOT NULL DEFAULT '0', + `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', + `cards` text, + `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', + PRIMARY KEY (`id`), + UNIQUE KEY `lang` (`lang`,`module`,`section`,`key`) +) 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_module` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `root` mediumint(8) unsigned NOT NULL DEFAULT '0', + `branch` mediumint(8) unsigned NOT NULL DEFAULT '0', + `name` char(60) NOT NULL DEFAULT '', + `parent` mediumint(8) unsigned NOT NULL DEFAULT '0', + `path` char(255) NOT NULL DEFAULT '', + `grade` tinyint(3) unsigned NOT NULL DEFAULT '0', + `order` smallint(5) unsigned NOT NULL DEFAULT '0', + `type` char(30) NOT NULL, + `owner` varchar(30) NOT NULL, + `collector` text NOT NULL, + `short` varchar(30) NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `root` (`root`), + KEY `type` (`type`), + KEY `path` (`path`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_mr` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `gitlabID` mediumint(8) unsigned NOT NULL, + `sourceProject` int(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_notify` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `objectType` varchar(50) NOT NULL, + `objectID` mediumint(8) unsigned NOT NULL, + `action` mediumint(9) NOT NULL, + `toList` varchar(255) NOT NULL, + `ccList` text NOT NULL, + `subject` varchar(255) NOT NULL, + `data` text NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `sendTime` datetime NOT NULL, + `status` varchar(10) NOT NULL DEFAULT 'wait', + `failReason` text NOT NULL, + PRIMARY KEY (`id`), + KEY `objectType_toList_status` (`objectType`,`toList`,`status`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_oauth` ( + `account` varchar(30) NOT NULL, + `openID` varchar(255) NOT NULL, + `providerType` varchar(30) NOT NULL, + `providerID` mediumint(8) unsigned NOT NULL, + KEY `account` (`account`), + KEY `providerType` (`providerType`), + KEY `providerID` (`providerID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_pipeline` ( + `id` smallint(8) unsigned NOT NULL AUTO_INCREMENT, + `type` char(30) NOT NULL, + `name` varchar(50) NOT NULL, + `url` varchar(255) DEFAULT NULL, + `account` varchar(30) DEFAULT NULL, + `password` varchar(255) NOT NULL, + `token` varchar(255) DEFAULT NULL, + `private` char(32) DEFAULT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_planstory` ( + `plan` mediumint(8) unsigned NOT NULL, + `story` mediumint(8) unsigned NOT NULL, + `order` mediumint(9) NOT NULL, + UNIQUE KEY `plan_story` (`plan`,`story`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_product` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `program` mediumint(8) unsigned NOT NULL, + `name` varchar(90) NOT NULL, + `code` varchar(45) NOT NULL, + `bind` enum('0','1') NOT NULL DEFAULT '0', + `line` mediumint(8) NOT NULL, + `type` varchar(30) NOT NULL DEFAULT 'normal', + `status` varchar(30) NOT NULL DEFAULT '', + `subStatus` varchar(30) NOT NULL DEFAULT '', + `desc` text NOT NULL, + `PO` varchar(30) NOT NULL, + `QD` varchar(30) NOT NULL, + `RD` varchar(30) NOT NULL, + `acl` enum('open','private','custom') NOT NULL DEFAULT 'open', + `whitelist` text NOT NULL, + `reviewer` text NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `createdVersion` varchar(20) NOT NULL, + `order` mediumint(8) unsigned NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `acl` (`acl`), + KEY `order` (`order`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_productplan` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `product` mediumint(8) unsigned NOT NULL, + `branch` mediumint(8) unsigned NOT NULL, + `parent` mediumint(9) NOT NULL DEFAULT '0', + `title` varchar(90) NOT NULL, + `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, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `product` (`product`), + KEY `end` (`end`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_project` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) NOT NULL DEFAULT '0', + `model` char(30) NOT NULL, + `type` char(30) NOT NULL DEFAULT 'sprint', + `lifetime` char(30) NOT NULL DEFAULT '', + `budget` varchar(30) NOT NULL DEFAULT '0', + `budgetUnit` char(30) NOT NULL DEFAULT 'CNY', + `attribute` varchar(30) NOT NULL DEFAULT '', + `percent` float unsigned NOT NULL DEFAULT '0', + `milestone` enum('0','1') NOT NULL DEFAULT '0', + `output` text NOT NULL, + `auth` char(30) NOT NULL, + `parent` mediumint(8) unsigned NOT NULL DEFAULT '0', + `path` varchar(255) NOT NULL, + `grade` tinyint(3) unsigned NOT NULL, + `name` varchar(90) NOT NULL, + `code` varchar(45) NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + `realBegan` date NOT NULL, + `realEnd` date NOT NULL, + `days` smallint(5) unsigned NOT NULL, + `status` varchar(10) NOT NULL, + `subStatus` varchar(30) NOT NULL DEFAULT '', + `pri` enum('1','2','3','4') NOT NULL DEFAULT '1', + `desc` text NOT NULL, + `version` smallint(6) NOT NULL, + `parentVersion` smallint(6) NOT NULL, + `planDuration` int(11) NOT NULL, + `realDuration` int(11) NOT NULL, + `openedBy` varchar(30) NOT NULL DEFAULT '', + `openedDate` datetime NOT NULL, + `openedVersion` varchar(20) NOT NULL, + `lastEditedBy` varchar(30) NOT NULL DEFAULT '', + `lastEditedDate` datetime NOT NULL, + `closedBy` varchar(30) NOT NULL DEFAULT '', + `closedDate` datetime NOT NULL, + `canceledBy` varchar(30) NOT NULL DEFAULT '', + `canceledDate` datetime NOT NULL, + `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, + `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`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_relation` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `project` mediumint(8) NOT NULL, + `product` mediumint(8) NOT NULL, + `execution` mediumint(8) NOT NULL, + `AType` char(30) NOT NULL, + `AID` mediumint(8) NOT NULL, + `AVersion` char(30) NOT NULL, + `relation` char(30) NOT NULL, + `BType` char(30) NOT NULL, + `BID` mediumint(8) NOT NULL, + `BVersion` char(30) NOT NULL, + `extra` char(30) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `relation` (`product`,`relation`,`AType`,`BType`,`AID`,`BID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_release` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL DEFAULT '0', + `branch` mediumint(8) unsigned NOT NULL DEFAULT '0', + `build` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL DEFAULT '', + `marker` enum('0','1') NOT NULL DEFAULT '0', + `date` date NOT NULL, + `stories` text NOT NULL, + `bugs` text NOT NULL, + `leftBugs` text NOT NULL, + `desc` text NOT NULL, + `mailto` text, + `notify` varchar(255) 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_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, + `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_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 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_stakeholder` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `objectID` mediumint(8) NOT NULL, + `objectType` char(30) NOT NULL, + `user` char(30) NOT NULL, + `type` char(30) NOT NULL, + `key` enum('0','1') NOT NULL, + `from` char(30) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `editedBy` char(30) NOT NULL, + `editedDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_story` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `parent` mediumint(9) NOT NULL DEFAULT '0', + `product` mediumint(8) unsigned NOT NULL DEFAULT '0', + `branch` mediumint(8) unsigned NOT NULL DEFAULT '0', + `module` mediumint(8) unsigned NOT NULL DEFAULT '0', + `plan` text, + `source` varchar(20) NOT NULL, + `sourceNote` varchar(255) NOT NULL, + `fromBug` mediumint(8) unsigned NOT NULL DEFAULT '0', + `title` varchar(255) NOT NULL, + `keywords` varchar(255) NOT NULL, + `type` varchar(30) NOT NULL DEFAULT 'story', + `category` varchar(30) NOT NULL DEFAULT 'feature', + `pri` tinyint(3) unsigned NOT NULL DEFAULT '3', + `estimate` float unsigned NOT NULL, + `status` enum('','changed','active','draft','closed') NOT NULL DEFAULT '', + `subStatus` varchar(30) NOT NULL DEFAULT '', + `color` char(7) NOT NULL, + `stage` enum('','wait','planned','projected','developing','developed','testing','tested','verified','released','closed') NOT NULL DEFAULT 'wait', + `stagedBy` char(30) NOT NULL, + `mailto` text, + `openedBy` varchar(30) NOT NULL DEFAULT '', + `openedDate` datetime NOT NULL, + `assignedTo` varchar(30) NOT NULL DEFAULT '', + `assignedDate` datetime NOT NULL, + `lastEditedBy` varchar(30) NOT NULL DEFAULT '', + `lastEditedDate` datetime NOT NULL, + `reviewedBy` varchar(255) NOT NULL, + `reviewedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `closedBy` varchar(30) NOT NULL DEFAULT '', + `closedDate` datetime NOT NULL, + `closedReason` varchar(30) NOT NULL, + `toBug` mediumint(8) unsigned NOT NULL, + `childStories` varchar(255) NOT NULL, + `linkStories` varchar(255) NOT NULL, + `duplicateStory` mediumint(8) unsigned NOT NULL, + `version` smallint(6) NOT NULL DEFAULT '1', + `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', + `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` date 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', + 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 '', + `limited` char(8) NOT NULL DEFAULT 'no', + `join` date NOT NULL DEFAULT '0000-00-00', + `days` smallint(5) unsigned NOT NULL, + `hours` float(3,1) unsigned NOT NULL DEFAULT '0.0', + `estimate` decimal(12,2) unsigned NOT NULL DEFAULT '0.00', + `consumed` decimal(12,2) unsigned NOT NULL DEFAULT '0.00', + `left` decimal(12,2) unsigned NOT NULL DEFAULT '0.00', + `order` tinyint(3) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `team` (`root`,`type`,`account`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_testreport` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `tasks` varchar(255) NOT NULL, + `builds` varchar(255) NOT NULL, + `title` varchar(255) NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + `owner` char(30) NOT NULL, + `members` text NOT NULL, + `stories` text NOT NULL, + `bugs` text NOT NULL, + `cases` text NOT NULL, + `report` text NOT NULL, + `objectType` varchar(20) NOT NULL, + `objectID` mediumint(8) unsigned NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_testresult` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `run` mediumint(8) unsigned NOT NULL, + `case` mediumint(8) unsigned NOT NULL, + `version` smallint(5) unsigned NOT NULL, + `job` mediumint(8) unsigned NOT NULL, + `compile` mediumint(8) unsigned NOT NULL, + `caseResult` char(30) NOT NULL, + `stepResults` text NOT NULL, + `lastRunner` varchar(30) NOT NULL, + `date` datetime NOT NULL, + `duration` float NOT NULL, + `xml` text NOT NULL, + PRIMARY KEY (`id`), + KEY `case` (`case`), + KEY `version` (`version`), + KEY `run` (`run`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_testrun` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `task` mediumint(8) unsigned NOT NULL DEFAULT '0', + `case` mediumint(8) unsigned NOT NULL DEFAULT '0', + `version` tinyint(3) unsigned NOT NULL DEFAULT '0', + `assignedTo` char(30) NOT NULL DEFAULT '', + `lastRunner` varchar(30) NOT NULL, + `lastRunDate` datetime NOT NULL, + `lastRunResult` char(30) NOT NULL, + `status` char(30) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `task` (`task`,`case`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_testsuite` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `desc` text NOT NULL, + `type` varchar(20) NOT NULL, + `addedBy` char(30) NOT NULL, + `addedDate` datetime NOT NULL, + `lastEditedBy` char(30) NOT NULL, + `lastEditedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL, + PRIMARY KEY (`id`), + KEY `product` (`product`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_testtask` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + `name` char(90) NOT NULL, + `execution` mediumint(8) unsigned NOT NULL DEFAULT '0', + `build` char(30) NOT NULL, + `type` varchar(255) NOT NULL DEFAULT '', + `owner` varchar(30) NOT NULL, + `pri` tinyint(3) unsigned NOT NULL DEFAULT '0', + `begin` date NOT NULL, + `end` date NOT NULL, + `realFinishedDate` datetime NOT NULL, + `mailto` text, + `desc` text NOT NULL, + `report` text NOT NULL, + `status` enum('blocked','doing','wait','done') NOT NULL DEFAULT 'wait', + `testreport` mediumint(8) unsigned NOT NULL, + `auto` varchar(10) NOT NULL DEFAULT 'no', + `subStatus` varchar(30) NOT NULL DEFAULT '', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `product` (`product`), + KEY `build` (`build`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_todo` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `account` char(30) NOT NULL, + `date` date NOT NULL, + `begin` smallint(4) unsigned zerofill NOT NULL, + `end` smallint(4) unsigned zerofill NOT NULL, + `type` char(10) NOT NULL, + `cycle` tinyint(3) unsigned NOT NULL DEFAULT '0', + `idvalue` mediumint(8) unsigned NOT NULL DEFAULT '0', + `pri` tinyint(3) unsigned NOT NULL, + `name` char(150) NOT NULL, + `desc` text NOT NULL, + `status` enum('wait','doing','done','closed') NOT NULL DEFAULT 'wait', + `private` tinyint(1) NOT NULL, + `config` varchar(255) NOT NULL, + `assignedTo` varchar(30) NOT NULL DEFAULT '', + `assignedBy` varchar(30) NOT NULL DEFAULT '', + `assignedDate` datetime NOT NULL, + `finishedBy` varchar(30) NOT NULL DEFAULT '', + `finishedDate` datetime NOT NULL, + `closedBy` varchar(30) NOT NULL DEFAULT '', + `closedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `account` (`account`), + KEY `assignedTo` (`assignedTo`), + KEY `finishedBy` (`finishedBy`), + KEY `date` (`date`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_user` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `company` mediumint(8) unsigned NOT NULL, + `type` char(30) NOT NULL DEFAULT 'inside', + `dept` mediumint(8) unsigned NOT NULL DEFAULT '0', + `account` char(30) NOT NULL DEFAULT '', + `password` char(32) NOT NULL DEFAULT '', + `role` char(10) NOT NULL DEFAULT '', + `realname` varchar(100) NOT NULL DEFAULT '', + `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', + `ip` char(15) NOT NULL DEFAULT '', + `last` int(10) unsigned NOT NULL DEFAULT '0', + `fails` tinyint(5) NOT NULL DEFAULT '0', + `locked` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `ranzhi` char(30) NOT NULL DEFAULT '', + `score` int(11) NOT NULL DEFAULT '0', + `scoreLevel` int(11) NOT NULL DEFAULT '0', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + `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 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_usercontact` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `account` char(30) NOT NULL, + `listName` varchar(60) NOT NULL, + `userList` text NOT NULL, + PRIMARY KEY (`id`), + KEY `account` (`account`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_usergroup` ( + `account` char(30) NOT NULL DEFAULT '', + `group` mediumint(8) unsigned NOT NULL DEFAULT '0', + `project` text NOT NULL, + UNIQUE KEY `account` (`account`,`group`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_userquery` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `account` char(30) NOT NULL, + `module` varchar(30) NOT NULL, + `title` varchar(90) NOT NULL, + `form` text NOT NULL, + `sql` text NOT NULL, + `shortcut` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `account` (`account`), + KEY `module` (`module`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_usertpl` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `account` char(30) NOT NULL, + `type` char(30) NOT NULL, + `title` varchar(150) NOT NULL, + `content` text NOT NULL, + `public` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `account` (`account`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_userview` ( + `account` char(30) NOT NULL, + `programs` mediumtext NOT NULL, + `products` mediumtext NOT NULL, + `projects` mediumtext NOT NULL, + `sprints` mediumtext NOT NULL, + UNIQUE KEY `account` (`account`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_webhook` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `type` varchar(15) NOT NULL DEFAULT 'default', + `name` varchar(50) NOT NULL, + `url` varchar(255) NOT NULL, + `domain` varchar(255) NOT NULL, + `secret` varchar(255) NOT NULL, + `contentType` varchar(30) NOT NULL DEFAULT 'application/json', + `sendType` enum('sync','async') NOT NULL DEFAULT 'sync', + `products` text NOT NULL, + `executions` text NOT NULL, + `params` varchar(100) NOT NULL, + `actions` text NOT NULL, + `desc` text NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +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; diff --git a/db/update16.0.beta1.sql b/db/update16.0.beta1.sql index af07f7a9eb..e71d9d859d 100644 --- a/db/update16.0.beta1.sql +++ b/db/update16.0.beta1.sql @@ -29,7 +29,7 @@ CREATE TABLE `zt_kanban` ( `desc` text NOT NULL, `acl` char(30) NOT NULL DEFAULT 'open', `whitelist` text NOT NULL, - `archived` enum('0', '1') NOT NULL DEFAULT '1', + `archived` enum('0', '1') NOT NULL DEFAULT '0', `status` enum('active','closed') NOT NULL default 'active', `order` smallint(6) NOT NULL DEFAULT '0', `createdBy` char(30) NOT NULL, diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 53e6f13429..7ed1e08a4b 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -1,3 +1,34 @@ +2022-02-15 16.4 +完成的需求 +30526 实现JIRA数据导入到禅道功能 +30675 优化禅道中SonarQube的扫描结果详情页面 +30583 SonarQube免登录探针需求 +30576 在禅道中当对应的GitLab项目的代码库为空时,隐藏GitLab项目下下关于分支与标签操作的按钮。 +30559 在禅道中设置GitLab项目或群组权限为公开时给予告警提示 +30558 实现GitLab群组URL可点击的功能 +30556 GitLab服务器列表中地址可点击 +30554 修改GitLab服务器列表“GitLab名称”为“GitLab服务器” +30553 在禅道中实现创建GitLab服务器时对当前GitLab版本进行兼容性检查功能 +30552 在禅道中针对无权限用户将合并请求编辑按钮置灰 +30461 实现在禅道中将SonarQube问题转成禅道Bug的功能 +30455 实现SonarQube问题详情页面 +30453 实现SonarQube问题列表页面的搜索功能 +30451 实现SonarQube问题列表页面的返回功能 +30447 在SonarQube扫描报告概要页面添加问题详情列表的入口 +30443 实现在添加/编辑SonarQube服务器时验证填写用户是否为SonarQube管理员的功能 +30183 实现从禅道SonarQube项目列表查看SonarQube代码检查结果的入口 +29859 实现禅道中创建SonarQube项目功能 +29241 实现构建通知发送到喧喧功能 +29228 实现SonarQube项目问题列表页面 +修复的BUG +18816 DevOps-代码中,GitLab类型的版本库代码内容未显示完全 +18382 代码页面版本列版本号显示不一致 +18380 历史记录中重复显示多条记录 +18104 VS Code COMMIT_EDITMSG文件中应只显示未选中的需求/Bug/任务 +18076 VSCode中查看项目/执行下的需求时应跳转到项目/执行下的需求详情页 +17869 VScode中查看需求、任务和Bug提示“请求后端出错” +17851 vscode查看执行下的需求,提示先选择项目 + 2022-01-26 16.3 完成的需求 29706 研发看板相关操作支持平滑刷新方式呈现 diff --git a/module/block/control.php b/module/block/control.php index ab07cd135b..79dbbbd85c 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -321,7 +321,7 @@ class block extends control $pager = new pager(0, 30, 1); $this->view->actions = $this->loadModel('action')->getDynamic('all', 'today', 'date_desc', $pager); - $this->view->users = $this->loadModel('user')->getPairs('noclosed|nodeleted|noletter|all'); + $this->view->users = $this->loadModel('user')->getPairs('nodeleted|noletter|all'); $this->display(); } diff --git a/module/block/view/sprintblock.html.php b/module/block/view/sprintblock.html.php index 791f75d836..c3b79d19ce 100644 --- a/module/block/view/sprintblock.html.php +++ b/module/block/view/sprintblock.html.php @@ -14,7 +14,7 @@
If your Jira uses MySQL database, please choose this way.
'; +$lang->convert->jira->fileDesc = 'Choose this method if your Jira uses a non-MySQL database.
'; +$lang->convert->jira->jiraObject = 'Jira Issues'; +$lang->convert->jira->zentaoObject = 'Zentao Object'; +$lang->convert->jira->jiraLinkType = 'Jira Relates'; +$lang->convert->jira->zentaoLinkType = 'Zentao Link Type'; +$lang->convert->jira->jiraResolution = 'Jira Resolution'; +$lang->convert->jira->zentaoResolution = 'Zentao Resolution'; +$lang->convert->jira->zentaoReason = 'Zentao Story Closed Reason'; +$lang->convert->jira->jiraStatus = 'Jira Issues Status'; +$lang->convert->jira->storyStatus = 'Zentao Story Status'; +$lang->convert->jira->storyStage = 'Zentao Story Stage'; +$lang->convert->jira->bugStatus = 'Zentao Bug Status'; +$lang->convert->jira->taskStatus = 'Zentao Task Status'; +$lang->convert->jira->initJiraUser = 'Init Jira User'; +$lang->convert->jira->importJira = 'Import Jira'; +$lang->convert->jira->start = 'Start'; + +$lang->convert->jira->dbNameEmpty = 'Jira database name cannot be empty!'; +$lang->convert->jira->invalidDB = 'Invalid database name!'; +$lang->convert->jira->invalidTable = 'This database is not a Jira database!'; +$lang->convert->jira->passwordNotice = "Set the default password of Jira users after they are imported into ZenTao. Users can modify the password in ZenTao later."; +$lang->convert->jira->groupNotice = "Set the default permission grouping of Jira users after importing into ZenTao."; +$lang->convert->jira->passwordDifferent = 'Password do not match!'; +$lang->convert->jira->passwordEmpty = 'Password can not be empty!'; +$lang->convert->jira->passwordLess = 'Password must not be less than six characters!'; +$lang->convert->jira->importSuccessfully = 'Done!'; +$lang->convert->jira->importResult = "Import %s data, %s pieces of data processed;"; +$lang->convert->jira->importing = 'Data is being imported, please do not switch to other pages.'; +$lang->convert->jira->importingAB = 'Data Import'; +$lang->convert->jira->imported = 'Data Import Complete'; + +$lang->convert->jira->zentaoObjectList[''] = ''; +$lang->convert->jira->zentaoObjectList['task'] = 'Task'; +$lang->convert->jira->zentaoObjectList['requirement'] = 'Requirement'; +$lang->convert->jira->zentaoObjectList['story'] = 'Story'; +$lang->convert->jira->zentaoObjectList['bug'] = 'Bug'; + +$lang->convert->jira->zentaoLinkTypeList['subTaskLink'] = 'Parent-Child Task'; +$lang->convert->jira->zentaoLinkTypeList['subStoryLink'] = 'Parent-Child Story'; +$lang->convert->jira->zentaoLinkTypeList['duplicate'] = 'Duplicate'; +$lang->convert->jira->zentaoLinkTypeList['relates'] = 'Relates'; + +$lang->convert->jira->steps[1] = 'Objects'; +$lang->convert->jira->steps[2] = 'Relates'; +$lang->convert->jira->steps[3] = 'Resolution'; +$lang->convert->jira->steps[4] = 'Status'; + +$lang->convert->jira->importSteps['db'][1] = 'Backup ZenTao database, backup Jira database.'; +$lang->convert->jira->importSteps['db'][2] = 'Using ZenTao when importing data will cause performance pressure on the server, please try to ensure that no one is using ZenTao when importing data.'; +$lang->convert->jira->importSteps['db'][3] = 'Import the Jira database into the Mysql used by ZenTao, the name is distinguished from the ZenTao database.'; +$lang->convert->jira->importSteps['db'][4] = "Put the Jira attachments directory under %s, Make sure you have enough disk space on the ZenTao server."; +$lang->convert->jira->importSteps['db'][5] = "After the above steps are completed, please enter the Jira database name to proceed to the next step."; + +$lang->convert->jira->importSteps['file'][1] = 'Backup ZenTao database, backup Jira database.'; +$lang->convert->jira->importSteps['file'][2] = 'Using ZenTao when importing data will cause performance pressure on the server, please try to ensure that no one is using ZenTao when importing data.'; +$lang->convert->jira->importSteps['file'][3] = "Put the Jira backup file entities.xml under %s."; +$lang->convert->jira->importSteps['file'][4] = "Put the Jira attachments directory under %s, Make sure you have enough disk space on the ZenTao server."; +$lang->convert->jira->importSteps['file'][5] = "After the above steps are completed, click Next."; + +$lang->convert->jira->objectList['user'] = 'User'; +$lang->convert->jira->objectList['project'] = 'Project'; +$lang->convert->jira->objectList['issue'] = 'Issue'; +$lang->convert->jira->objectList['build'] = 'Build'; +$lang->convert->jira->objectList['issuelink'] = 'Issue Link'; +$lang->convert->jira->objectList['action'] = 'Action'; +$lang->convert->jira->objectList['file'] = 'File'; diff --git a/module/convert/lang/zh-cn.php b/module/convert/lang/zh-cn.php index d3146b2994..f9f12f8a9f 100644 --- a/module/convert/lang/zh-cn.php +++ b/module/convert/lang/zh-cn.php @@ -120,7 +120,7 @@ $lang->convert->jira->method = '选择导入方式'; $lang->convert->jira->next = '下一步'; $lang->convert->jira->importFromDB = '从数据库导入'; $lang->convert->jira->importFromFile = '从文件导入'; -$lang->convert->jira->mapJira2Zentao = '设置对应关系'; +$lang->convert->jira->mapJira2Zentao = '设置Jira与禅道数据对应关系'; $lang->convert->jira->dbNameNotice = '请输入Jira数据库名字'; $lang->convert->jira->importNotice = '注意:导入数据有风险!请务必确保如下操作步骤依次完成,再进行合并。'; $lang->convert->jira->dbDesc = '如果您的Jira使用Mysql数据库, 请选择此方式
'; @@ -143,13 +143,19 @@ $lang->convert->jira->start = '开始导入'; $lang->convert->jira->dbNameEmpty = 'Jira数据库名字不能为空!'; $lang->convert->jira->invalidDB = '无效的数据库名!'; +$lang->convert->jira->invalidTable = '本数据库非Jira数据库!'; $lang->convert->jira->passwordNotice = "设置Jira用户导入到禅道后的默认密码,用户后续可以在禅道中自行修改密码。"; $lang->convert->jira->groupNotice = "设置Jira用户导入到禅道后的默认权限分组。"; $lang->convert->jira->passwordDifferent = '两次密码不一致!'; $lang->convert->jira->passwordEmpty = '密码不能为空!'; +$lang->convert->jira->passwordLess = '密码不能少于六位!'; $lang->convert->jira->importSuccessfully = 'Jira导入完成!'; $lang->convert->jira->importResult = "导入 %s 数据, 已处理 %s 条记录;"; +$lang->convert->jira->importing = '数据导入中,请不要切换其它页面'; +$lang->convert->jira->importingAB = '数据导入中'; +$lang->convert->jira->imported = '数据导入完成'; +$lang->convert->jira->zentaoObjectList[''] = ''; $lang->convert->jira->zentaoObjectList['task'] = '任务'; $lang->convert->jira->zentaoObjectList['requirement'] = '用户需求'; $lang->convert->jira->zentaoObjectList['story'] = '软件需求'; @@ -160,14 +166,20 @@ $lang->convert->jira->zentaoLinkTypeList['subStoryLink'] = '父-子需求'; $lang->convert->jira->zentaoLinkTypeList['duplicate'] = '重复对象'; $lang->convert->jira->zentaoLinkTypeList['relates'] = '互相关联'; +$lang->convert->jira->steps[1] = '对象'; +$lang->convert->jira->steps[2] = '对象关联关系'; +$lang->convert->jira->steps[3] = '解决方案'; +$lang->convert->jira->steps[4] = '状态'; + $lang->convert->jira->importSteps['db'][1] = '备份禅道数据库,备份Jira数据库。'; $lang->convert->jira->importSteps['db'][2] = '导入数据时使用禅道会给服务器造成性能压力,请尽量保证导入数据时无人使用禅道。'; $lang->convert->jira->importSteps['db'][3] = '将Jira数据库导入到禅道使用的Mysql中,名字和禅道数据库区别开来。'; $lang->convert->jira->importSteps['db'][4] = "将Jira附件目录 attachments 放到 %s 下,确保禅道服务器磁盘空间足够。"; + $lang->convert->jira->importSteps['db'][5] = "上述步骤完成后,请输入Jira数据库名字进行下一步。"; $lang->convert->jira->importSteps['file'][1] = '备份禅道数据库,备份Jira数据库。'; $lang->convert->jira->importSteps['file'][2] = '导入数据时使用禅道会给服务器造成性能压力,请尽量保证导入数据时无人使用禅道。'; -$lang->convert->jira->importSteps['file'][3] = "将Jira的备份文件 entities.xml 放到 %s 下。"; +$lang->convert->jira->importSteps['file'][3] = "将Jira的备份文件 entities.xml 放到 %s 下,并给该目录读写权限。"; $lang->convert->jira->importSteps['file'][4] = "将Jira附件目录 attachments 放到 %s 下,确保禅道服务器磁盘空间足够。"; $lang->convert->jira->importSteps['file'][5] = "上述步骤完成后,点击下一步。"; diff --git a/module/convert/model.php b/module/convert/model.php index e36c70652d..288f33263f 100644 --- a/module/convert/model.php +++ b/module/convert/model.php @@ -52,6 +52,7 @@ class convertModel extends model /** * Check table exits or not. * + * @param string $table * @access public * @return bool */ @@ -61,6 +62,21 @@ class convertModel extends model return $this->dbh->query($sql)->fetch(); } + /** + * Check table of jira databases exits or not. + * + * @param string $dbName + * @param string $table + * @access public + * @return bool + */ + public function tableExistsOfJira($dbName, $table) + { + $this->connectDB($dbName); + $sql = "SHOW tables like '$table'"; + return $this->dao->dbh($this->sourceDBH)->query($sql)->fetch(); + } + /** * Save the max id of every table. Thus when we convert again, when can delete id larger then the saved max id. * @@ -95,13 +111,15 @@ class convertModel extends model } /** - * Get jira data. + * Get jira data from db. * - * @param int $module + * @param string $module + * @param int $lastID + * @param int $limit * @access public * @return void */ - public function getJiraData($module = '', $lastID = 0, $limit = 0) + public function getJiraDataFromDB($module = '', $lastID = 0, $limit = 0) { $dataList = array(); if($module == 'user') @@ -165,6 +183,207 @@ class convertModel extends model return $dataList; } + /** + * Get jira data from file. + * + * @param sting $module + * @param int $lastID + * @param int $limit + * @access public + * @return void + */ + public function getJiraDataFromFile($module, $lastID = 0, $limit = 0) + { + $fileName = $module; + if($module == 'build') $filename = 'version'; + if($module == 'file') $filename = 'fileattachment'; + + $filePath = $this->app->getTmpRoot() . 'jirafile/' . $fileName . '.xml'; + if(!file_exists($filePath)) return array(); + + $xmlContent = file_get_contents($filePath); + $xmlContent = preg_replace ('/[^\x{0009}\x{000a}\x{000d}\x{0020}-\x{D7FF}\x{E000}-\x{FFFD}]+/u', ' ', $xmlContent); + $parsedXML = simplexml_load_string($xmlContent, SimpleXMLElement::class, LIBXML_NOCDATA); + + $dataList = array(); + $parsedXML = $this->object2Array($parsedXML); + foreach($parsedXML as $key => $xmlArray) + { + if(strtolower($key) != strtolower($fileName)) continue; + foreach($xmlArray as $key => $attributes) + { + $desc = isset($attributes['description']) ? $attributes['description'] : ''; + $summary = isset($attributes['summary']) ? $attributes['summary'] : ''; + $body = isset($attributes['body']) ? $attributes['body'] : ''; + + if(is_numeric($key)) + { + foreach($attributes as $value) + { + if(!is_array($value)) continue; + if(!empty($desc)) $value['description'] = $desc; + if(!empty($summary)) $value['summary'] = $summary; + if(!empty($body)) $value['body'] = $body; + $dataList[$value['id']] = $value; + } + } + else + { + $dataList[$attributes['id']] = $attributes; + } + } + } + + if($limit) + { + $dataList = array_slice($dataList, $lastID, $limit, true); + if(empty($dataList)) return array(); + } + + foreach($dataList as $key => $data) + { + if($module == 'user') + { + $user = new stdclass(); + $user->account = $data['lowerUserName']; + $user->realname = $data['lowerDisplayName']; + $user->email = $data['emailAddress']; + $user->join = $data['createdDate']; + + $dataList[$key] = $user; + } + elseif($module == 'project') + { + $project = new stdclass(); + $project->ID = $data['id']; + $project->pname = $data['name']; + $project->pkey = $data['key']; + $project->ORIGINALKEY = $data['originalkey']; + $project->DESCRIPTION = $data['description']; + $project->LEAD = $data['lead']; + + $dataList[$key] = $project; + } + elseif($module == 'issue') + { + $issue = new stdclass(); + $issue->ID = $data['id']; + $issue->SUMMARY = $data['summary']; + $issue->PRIORITY = $data['priority']; + $issue->PROJECT = $data['project']; + $issue->issuestatus = $data['status']; + $issue->CREATED = $data['created']; + $issue->CREATOR = $data['creator']; + $issue->issuetype = $data['type']; + $issue->ASSIGNEE = isset($data['assignee']) ? $data['assignee'] : ''; + $issue->RESOLUTION = isset($data['resolution']) ? $data['resolution'] : ''; + $issue->issuenum = $data['number']; + $issue->DESCRIPTION = isset($data['description']) ? $data['description'] : ''; + + $dataList[$key] = $issue; + } + elseif($module == 'build') + { + $build = new stdclass(); + $build->ID = $data['id']; + $build->PROJECT = $data['project']; + $build->vname = $data['name']; + $build->RELEASEDATE = isset($data['releasedate']) ? $data['releasedate'] : ''; + $build->DESCRIPTION = isset($data['description']) ? $data['description'] : ''; + + $dataList[$key] = $build; + } + elseif($module == 'issuelink') + { + $issueLink = new stdclass(); + $issueLink->LINKTYPE = $data['linktype']; + $issueLink->SOURCE = $data['source']; + $issueLink->DESTINATION = $data['destination']; + + $dataList[$key] = $issueLink; + } + elseif($module == 'action') + { + $action = new stdclass(); + $action->issueid = $data['issue']; + $action->actionbody = $data['body']; + $action->AUTHOR = $data['author']; + $action->CREATED = $data['created']; + + $dataList[$key] = $action; + } + elseif($module == 'file') + { + $file = new stdclass(); + $file->issueid = $data['issue']; + $file->ID = $data['id']; + $file->FILENAME = $data['filename']; + $file->MIMETYPE = $data['mimetype']; + $file->FILESIZE = $data['filesize']; + $file->CREATED = $data['created']; + $file->AUTHOR = $data['author']; + + $dataList[$key] = $file; + } + } + + return $dataList; + } + + /** + * Get version group from jira file. + * + * @access public + * @return void + */ + public function getVersionGroup() + { + $xmlContent = file_get_contents($this->app->getTmpRoot() . 'jirafile/nodeassociation.xml'); + $xmlContent = preg_replace ('/[^\x{0009}\x{000a}\x{000d}\x{0020}-\x{D7FF}\x{E000}-\x{FFFD}]+/u', ' ', $xmlContent); + $parsedXML = simplexml_load_string($xmlContent, SimpleXMLElement::class, LIBXML_NOCDATA); + + $dataList = array(); + $parsedXML = $this->object2Array($parsedXML); + foreach($parsedXML as $key => $xmlArray) + { + if(strtolower($key) != 'nodeassociation') continue; + foreach($xmlArray as $key => $attributes) + { + foreach($attributes as $value) + { + if(!is_array($value)) continue; + if($value['sinkNodeEntity'] != 'Version') continue; + $dataList[$value['sinkNodeId']][] = $value['sinkNodeId']; + $dataList[$value['sinkNodeId']][] = $value['sourceNodeId']; + } + } + } + + return $dataList; + } + + /** + * Convert object to array. + * + * @param object $parsedXML + * @access public + * @return void + */ + public function object2Array($parsedXML) + { + if(is_object($parsedXML)) + { + $parsedXML = (array)$parsedXML; + } + + if(is_array($parsedXML)) + { + foreach($parsedXML as $key => $value) $parsedXML[$key] = $this->object2Array($value); + } + + return $parsedXML; + } + /** * Import jira from db. * @@ -190,7 +409,7 @@ class convertModel extends model while(true) { - $dataList = $this->getJiraData($module, $lastID, $limit); + $dataList = $this->getJiraDataFromDB($module, $lastID, $limit); if(empty($dataList)) { @@ -210,17 +429,56 @@ class convertModel extends model } } - /* Set project min start date. */ - $executionProject = $this->dao->dbh($this->dbh)->select('id,project')->from(TABLE_PROJECT)->where('type')->eq('sprint')->andWhere('project')->ne(0)->fetchPairs(); - $minOpenedDateList = $this->dao->dbh($this->dbh)->select('id,execution,min(openedDate) as minOpenedDate')->from(TABLE_TASK)->where('execution')->in(array_keys($executionProject))->groupBy('execution')->fetchPairs('execution', 'minOpenedDate'); + $this->afterExec(); + return array('finished' => true); + } - foreach($minOpenedDateList as $executionID => $minOpenedDate) + /** + * Import jira from file. + * + * @param string $type + * @param int $lastID + * @param bool $createTable + * @access public + * @return void + */ + public function importJiraFromFile($type = '', $lastID = 0, $createTable = false) + { + if($createTable) $this->createTmpTable4Jira(); + + $limit = 1000; + $nextObject = false; + if(empty($type)) $type = key($this->lang->convert->jira->objectList); + + foreach($this->lang->convert->jira->objectList as $module => $moduleName) { - $projectID = $executionProject[$executionID]; - $this->dao->update(TABLE_PROJECT)->set('begin')->eq($minOpenedDate)->where('id')->eq($projectID)->orWhere('id')->eq($executionID)->exec(); + if($module != $type and !$nextObject) continue; + if($module == $type) $nextObject = true; + + while(true) + { + $dataList = $this->getJiraDataFromFile($module, $lastID, $limit); + + if(empty($dataList)) + { + $lastID = 0; + break; + } + + if($module == 'user') $this->importJiraUser($dataList, 'file'); + if($module == 'project') $this->importJiraProject($dataList, 'file'); + if($module == 'issue') $this->importJiraIssue($dataList, 'file'); + if($module == 'build') $this->importJiraBuild($dataList, 'file'); + if($module == 'issuelink') $this->importJiraIssueLink($dataList, 'file'); + if($module == 'action') $this->importJiraAction($dataList, 'file'); + if($module == 'file') $this->importJiraFile($dataList, 'file'); + + $offset = $lastID + $limit; + return array('type' => $module, 'count' => count($dataList), 'lastID' => $offset); + } } - $this->dbh->exec("DROP TABLE" . JIRA_TMPRELATION); + $this->afterExec(); return array('finished' => true); } @@ -228,10 +486,11 @@ class convertModel extends model * Import jira user. * * @param object $dataList + * @param string $method * @access public * @return void */ - public function importJiraUser($dataList) + public function importJiraUser($dataList, $method = 'db') { $localUsers = $this->dao->dbh($this->dbh)->select('account')->from(TABLE_USER)->where('deleted')->eq('0')->fetchPairs(); $userConfig = $this->session->jiraUser; @@ -250,7 +509,7 @@ class convertModel extends model $user->type = 'inside'; $user->join = $data->join; - $this->dao->dbh($this->dbh)->insert(TABLE_USER)->data($user, 'group')->exec(); + $this->dao->dbh($this->dbh)->replace(TABLE_USER)->data($user, 'group')->exec(); if(!dao::isError()) { @@ -267,10 +526,11 @@ class convertModel extends model * Import jira project. * * @param object $dataList + * @param string $method * @access public * @return void */ - public function importJiraProject($dataList) + public function importJiraProject($dataList, $method = 'db') { global $app; $app->loadConfig('execution'); @@ -295,8 +555,8 @@ class convertModel extends model $project->acl = 'open'; $project->end = date('Y-m-d', time() + 24 * 3600); - $project->PM = $this->getJiraAccount($data->LEAD); - $project->openedBy = $this->getJiraAccount($data->LEAD); + $project->PM = $this->getJiraAccount($data->LEAD, $method); + $project->openedBy = $this->getJiraAccount($data->LEAD, $method); $project->openedDate = $now; $project->openedVersion = $this->config->version; @@ -398,15 +658,20 @@ class convertModel extends model $projectRelation['BType'] = 'zproject'; $projectRelation['AID'] = $id; $projectRelation['BID'] = $projectID; - $this->dao->dbh($this->dbh)->insert(JIRA_TMPRELATION)->data($projectRelation)->exec(); $executionRelation['AType'] = 'jproject'; $executionRelation['BType'] = 'zexecution'; $executionRelation['AID'] = $id; $executionRelation['BID'] = $executionID; - $this->dao->dbh($this->dbh)->insert(JIRA_TMPRELATION)->data($executionRelation)->exec(); + + $keyRelation['AType'] = 'joldkey'; + $keyRelation['BType'] = 'jnewkey'; + $keyRelation['AID'] = $data->ORIGINALKEY; + $keyRelation['BID'] = $data->pkey; + $keyRelation['extra'] = $data->ID; + $this->dao->dbh($this->dbh)->insert(JIRA_TMPRELATION)->data($keyRelation)->exec(); } } @@ -414,10 +679,11 @@ class convertModel extends model * Import jira issue. * * @param object $dataList + * @param string $method * @access public * @return void */ - public function importJiraIssue($dataList) + public function importJiraIssue($dataList, $method = 'db') { $relations = $this->session->jiraRelation; @@ -430,6 +696,11 @@ class convertModel extends model ->andWhere('BType')->eq('zproject') ->fetchPairs(); + $projectKeys = $this->dao->dbh($this->dbh)->select('extra as ID, AID as oldKey, BID as newKey')->from(JIRA_TMPRELATION) + ->where('AType')->eq('joldkey') + ->andWhere('BType')->eq('jnewkey') + ->fetchAll('ID'); + $projectProduct = $this->dao->dbh($this->dbh)->select('project,product')->from(TABLE_PROJECTPRODUCT) ->where('project')->in(array_values($projectRelation)) ->fetchPairs(); @@ -452,8 +723,6 @@ class convertModel extends model if(!empty($relations['zentaoResolution'][$id])) $resolutionList[$jiraCode] = $relations['zentaoResolution'][$id]; } - $projectKeys = $this->dao->dbh($this->sourceDBH)->select('ID, ORIGINALKEY as oldKey, pkey as newKey')->from(JIRA_PROJECT)->fetchAll('ID'); - foreach($dataList as $id => $data) { $issueType = isset($issueTypeList[$data->issuetype]) ? $issueTypeList[$data->issuetype] : 'task'; @@ -476,9 +745,9 @@ class convertModel extends model $story->version = 1; $story->stage = $this->convertStage($data->issuestatus); $story->status = $this->convertStatus('story', $data->issuestatus); - $story->openedBy = $this->getJiraAccount($data->CREATOR); + $story->openedBy = $this->getJiraAccount($data->CREATOR, $method); $story->openedDate = substr($data->CREATED, 0, 19); - $story->assignedTo = $this->getJiraAccount($data->ASSIGNEE); + $story->assignedTo = $this->getJiraAccount($data->ASSIGNEE, $method); if($data->RESOLUTION) { @@ -543,9 +812,9 @@ class convertModel extends model $task->pri = $data->PRIORITY; $task->status = $this->convertStatus('task', $data->issuestatus); $task->desc = $data->DESCRIPTION; - $task->openedBy = $this->getJiraAccount($data->CREATOR); + $task->openedBy = $this->getJiraAccount($data->CREATOR, $method); $task->openedDate = substr($data->CREATED, 0, 19); - $task->assignedTo = $this->getJiraAccount($data->ASSIGNEE); + $task->assignedTo = $this->getJiraAccount($data->ASSIGNEE, $method); if($data->RESOLUTION) { $task->closedReason = zget($reasonList, $data->RESOLUTION, ''); @@ -585,10 +854,10 @@ class convertModel extends model $bug->pri = $data->PRIORITY; $bug->status = $this->convertStatus('bug', $data->issuestatus); $bug->steps = $data->DESCRIPTION; - $bug->openedBy = $this->getJiraAccount($data->CREATOR); + $bug->openedBy = $this->getJiraAccount($data->CREATOR, $method); $bug->openedDate = substr($data->CREATED, 0, 19); $bug->openedBuild = 'trunk'; - $bug->assignedTo = $this->getJiraAccount($data->ASSIGNEE); + $bug->assignedTo = $this->getJiraAccount($data->ASSIGNEE, $method); if($data->RESOLUTION) { @@ -638,10 +907,11 @@ class convertModel extends model * Import jira build. * * @param object $dataList + * @param string $method * @access public * @return void */ - public function importJiraBuild($dataList) + public function importJiraBuild($dataList, $method = 'db') { $issueObjectType = $this->dao->dbh($this->dbh)->select('AID,extra')->from(JIRA_TMPRELATION) ->where('AType')->eq('jissueid') @@ -667,7 +937,7 @@ class convertModel extends model ->where('project')->in(array_values($projectRelation)) ->fetchPairs(); - $versionGroup = $this->dao->dbh($this->sourceDBH)->select('SINK_NODE_ID as versionID, SOURCE_NODE_ID as issueID')->from(JIRA_NODEASSOCIATION)->where('SINK_NODE_ENTITY')->eq('Version')->fetchGroup('versionID'); + $versionGroup = $method == 'db' ? $this->dao->dbh($this->sourceDBH)->select('SINK_NODE_ID as versionID, SOURCE_NODE_ID as issueID')->from(JIRA_NODEASSOCIATION)->where('SINK_NODE_ENTITY')->eq('Version')->fetchGroup('versionID') : $this->getVersionGroup(); foreach($dataList as $data) { @@ -704,9 +974,10 @@ class convertModel extends model { foreach($versionGroup[$versionID] as $issue) { - $issueType = zget($issueObjectType, $issue->issueID, ''); + $issueID = $method == 'db' ? $issue->issueID : $issue; + $issueType = zget($issueObjectType, $issueID, ''); if(!$issueType || ($issueType != 'story' and $issueType != 'bug')) continue; - $objectID = $issueType == 'bug' ? zget($issueBugs, $issue->issueID) : zget($issueStories, $issue->issueID); + $objectID = $issueType == 'bug' ? zget($issueBugs, $issueID) : zget($issueStories, $issueID); $field = $issueType == 'story' ? 'stories' : 'bugs'; if($issueType == 'story') @@ -726,10 +997,11 @@ class convertModel extends model * Import jira issue link. * * @param object $dataList + * @param string $method * @access public * @return void */ - public function importJiraIssueLink($dataList) + public function importJiraIssueLink($dataList, $method = 'db') { $issueLinkTypeList = array(); $relations = $this->session->jiraRelation; @@ -849,10 +1121,11 @@ class convertModel extends model * Import jira action. * * @param object $dataList + * @param string $method * @access public * @return void */ - public function importJiraAction($dataList) + public function importJiraAction($dataList, $method = 'db') { $issueStories = $this->dao->dbh($this->dbh)->select('AID,BID')->from(JIRA_TMPRELATION) ->where('AType')->eq('jstory') @@ -891,6 +1164,8 @@ class convertModel extends model $comment = $data->actionbody; if(empty($comment)) continue; + if(!isset($issueObjectType[$issueID])) continue; + $objectType = $issueObjectType[$issueID]; if($objectType == 'task') $objectID = $issueTasks[$issueID]; if($objectType == 'bug') $objectID = $issueBugs[$issueID]; @@ -901,7 +1176,7 @@ class convertModel extends model $action = new stdclass(); $action->objectType = $objectType; $action->objectID = $objectID; - $action->actor = $this->getJiraAccount($data->AUTHOR); + $action->actor = $this->getJiraAccount($data->AUTHOR, $method); $action->action = 'commented'; $action->date = substr($data->CREATED, 0, 19); $action->comment = $comment; @@ -913,10 +1188,11 @@ class convertModel extends model * Import jira file. * * @param object $dataList + * @param string $method * @access public * @return void */ - public function importJiraFile($dataList) + public function importJiraFile($dataList, $method = 'db') { $this->loadModel('file'); @@ -948,6 +1224,8 @@ class convertModel extends model foreach($dataList as $fileAttachment) { $issueID = $fileAttachment->issueid; + if(!isset($issueObjectType[$issueID])) continue; + $objectType = $issueObjectType[$issueID]; if($objectType != 'bug' and $objectType != 'task' and $objectType != 'story') continue; @@ -967,7 +1245,7 @@ class convertModel extends model $file->size = $fileAttachment->FILESIZE; $file->objectType = $objectType; $file->objectID = $objectID; - $file->addedBy = $this->getJiraAccount($fileAttachment->AUTHOR); + $file->addedBy = $this->getJiraAccount($fileAttachment->AUTHOR, $method); $file->addedDate = substr($fileAttachment->CREATED, 0, 19); $this->dao->dbh($this->dbh)->insert(TABLE_FILE)->data($file)->exec(); @@ -1023,25 +1301,135 @@ class convertModel extends model * Get jira account. * * @param string $userKey + * @param string $method * @access public * @return void */ - public function getJiraAccount($userKey) + public function getJiraAccount($userKey, $method = 'db') { if(strpos($userKey, 'JIRAUSER') === false) return $userKey; - return $this->dao->dbh($this->sourceDBH)->select('lower_user_name')->from(JIRA_USER)->where('user_key')->eq($userKey)->fetch('lower_user_name'); + if($method == 'db') + { + return $this->dao->dbh($this->sourceDBH)->select('lower_user_name')->from(JIRA_USER)->where('user_key')->eq($userKey)->fetch('lower_user_name'); + } + else + { + $appUsers = $this->getJiraAppUser(); + return zget($appUsers, $userKey, $userKey); + } } + /** + * Get jira app user pairs. + * + * @access public + * @return void + */ + public function getJiraAppUser() + { + $xmlContent = file_get_contents($this->app->getTmpRoot() . 'jirafile/applicationuser.xml'); + $xmlContent = preg_replace ('/[^\x{0009}\x{000a}\x{000d}\x{0020}-\x{D7FF}\x{E000}-\x{FFFD}]+/u', ' ', $xmlContent); + $parsedXML = simplexml_load_string($xmlContent, SimpleXMLElement::class, LIBXML_NOCDATA); + + $pairs = array(); + $parsedXML = $this->object2Array($parsedXML); + foreach($parsedXML as $key => $xmlArray) + { + if(strtolower($key) != 'applicationuser') continue; + foreach($xmlArray as $key => $attributes) + { + if(is_numeric($key)) + { + foreach($attributes as $value) + { + if(!is_array($value)) continue; + if(!isset($value['userKey'])) continue; + $pairs[$value['userKey']] = $value['lowerUserName']; + } + } + else + { + $pairs[$attributes['userKey']] = $attributes['lowerUserName']; + } + } + } + + return $pairs; + } + + /** + * Split jira file. + * + * @access public + * @return void + */ + public function splitFile() + { + $filePath = $this->app->getTmpRoot() . 'jirafile/'; + $fileName = 'entities.xml'; + $file = $filePath . $fileName; + $handle = fopen($file, "r"); + + $usingData = array(); + $headerList = array('