diff --git a/Makefile b/Makefile index 6add55dc17..1305157607 100644 --- a/Makefile +++ b/Makefile @@ -143,6 +143,7 @@ zentaoxx: sed -i "s#\$this->app->getModuleRoot() . 'im/apischeme.json'#\$this->app->getExtensionRoot() . 'xuan/im/apischeme.json'#g" zentaoxx/extension/xuan/im/model.php sed -i "s/'..\/..\/common\/view\/header.html.php'/\$$app->getModuleRoot() . 'common\/view\/header.html.php'/g" zentaoxx/extension/xuan/conference/view/admin.html.php sed -i "s/'..\/..\/common\/view\/footer.html.php'/\$$app->getModuleRoot() . 'common\/view\/footer.html.php'/g" zentaoxx/extension/xuan/conference/view/admin.html.php + sed -i "s/\$$this->im->userGetChangedPassword()/array()/" zentaoxx/extension/xuan/im/control.php echo "ALTER TABLE \`zt_user\` ADD \`pinyin\` varchar(255) NOT NULL DEFAULT '' AFTER \`realname\`;" >> zentaoxx/db/xuanxuan.sql mkdir zentaoxx/tools; cp tools/cn2tw.php zentaoxx/tools; cd zentaoxx/tools; php cn2tw.php cp tools/en2other.php zentaoxx/tools; cd zentaoxx/tools; php en2other.php ../ diff --git a/config/zentaopms.php b/config/zentaopms.php index 646f396d0a..baee2227a1 100644 --- a/config/zentaopms.php +++ b/config/zentaopms.php @@ -222,6 +222,7 @@ $config->openMethods[] = 'kanban.deleteobjectcard'; $config->openMethods[] = 'admin.ignore'; $config->openMethods[] = 'personnel.unbindwhitelist'; $config->openMethods[] = 'tree.viewhistory'; +$config->openMethods[] = 'project.createguide'; /* Define the tables. */ define('TABLE_COMPANY', '`' . $config->db->prefix . 'company`'); diff --git a/db/update17.4.sql b/db/update17.4.sql index 36b545f067..022681a6db 100644 --- a/db/update17.4.sql +++ b/db/update17.4.sql @@ -1,2 +1,26 @@ -ALTER TABLE `zt_task` ADD `order` mediumint(8) NOT NULL DEFAULT '0' AFTER `activatedDate`; +ALTER TABLE `zt_task` ADD `order` mediumint(8) NOT NULL DEFAULT 0 AFTER `activatedDate`; ALTER TABLE `zt_task` ADD INDEX `order` (`order`); +ALTER TABLE `zt_story` ADD COLUMN `linkRequirements` varchar(255) NOT NULL AFTER `linkStories`; + +ALTER TABLE `zt_searchindex` ADD FULLTEXT `title_content` (`title`, `content`); +ALTER TABLE `zt_searchindex` DROP INDEX `title`; +ALTER TABLE `zt_searchindex` DROP INDEX `content`; + +ALTER TABLE `zt_productplan` ADD `createdBy` varchar(30) NOT NULL AFTER `closedReason`; +ALTER TABLE `zt_productplan` ADD `createdDate` datetime NOT NULL AFTER `createdBy`; + +ALTER TABLE `zt_release` ADD `createdBy` varchar(30) NOT NULL AFTER `subStatus`; +ALTER TABLE `zt_release` ADD `createdDate` datetime NOT NULL AFTER `createdBy`; + +ALTER TABLE `zt_testtask` ADD `createdBy` varchar(30) NOT NULL AFTER `subStatus`; +ALTER TABLE `zt_testtask` ADD `createdDate` datetime NOT NULL AFTER `createdBy`; + +INSERT IGNORE INTO `zt_workflowfield` (`module`, `field`, `type`, `length`, `name`, `control`, `expression`, `options`, `default`, `rules`, `placeholder`, `order`, `searchOrder`, `exportOrder`, `canExport`, `canSearch`, `isValue`, `readonly`, `buildin`, `role`, `desc`, `createdBy`, `createdDate`, `editedBy`, `editedDate`) VALUES +('testtask', 'createdBy', 'varchar', '30', '由谁创建', 'select', '', 'user', '', '', '', 393, 0, 0, '0', '0', '0', '1', 1, 'buildin', '', '', '2022-08-02 14:49', '', '0000-00-00 00:00:00'), +('testtask', 'createdDate', 'datetime', '', '创建时间', 'datetime', '', '', '', '', '', 394, 0, 0, '0', '0', '0', '1', 1, 'buildin', '', '', '2022-08-02 14:49', '', '0000-00-00 00:00:00'), +('productplan', 'createdBy', 'varchar', '30', '由谁创建', 'select', '', 'user', '', '', '', 11, 0, 0, '0', '0', '0', '1', 1, 'buildin', '', '', '2022-08-02 14:49', '', '0000-00-00 00:00:00'), +('productplan', 'createdDate', 'datetime', '', '创建时间', 'datetime', '', '', '', '', '', 12, 0, 0, '0', '0', '0', '1', 1, 'buildin', '', '', '2022-08-02 14:49', '', '0000-00-00 00:00:00'), +('release', 'createdBy', 'varchar', '30', '由谁创建', 'select', '', 'user', '', '', '', 14, 0, 0, '0', '0', '0', '1', 1, 'buildin', '', '', '2022-08-02 14:49', '', '0000-00-00 00:00:00'), +('release', 'createdDate', 'datetime', '', '创建时间', 'datetime', '', '', '', '', '', 15, 0, 0, '0', '0', '0', '1', 1, 'buildin', '', '', '2022-08-02 14:49', '', '0000-00-00 00:00:00'); + +UPDATE `zt_project` SET `closedDate`='' AND `closedBy`='' WHERE `status` != 'closed'; diff --git a/db/zentao.sql b/db/zentao.sql index eab2fde60b..244863af28 100755 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS `zt_acl` ( `type` char(40) NOT NULL DEFAULT 'whitelist', `source` char(30) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_action`; CREATE TABLE IF NOT EXISTS `zt_action` ( `id` int(9) unsigned NOT NULL auto_increment, @@ -29,9 +29,9 @@ CREATE TABLE IF NOT EXISTS `zt_action` ( KEY `project` (`project`), KEY `action` (`action`), KEY `objectID` (`objectID`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_api_lib_release`; -CREATE TABLE `zt_api_lib_release` ( +CREATE TABLE IF NOT EXISTS `zt_api_lib_release` ( `id` int UNSIGNED NOT NULL AUTO_INCREMENT, `lib` int UNSIGNED NOT NULL DEFAULT 0, `desc` varchar(255) NOT NULL DEFAULT '', @@ -40,9 +40,9 @@ CREATE TABLE `zt_api_lib_release` ( `addedBy` varchar(30) NOT NULL DEFAULT 0, `addedDate` datetime NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_api`; -CREATE TABLE `zt_api` ( +CREATE TABLE IF NOT EXISTS `zt_api` ( `id` int UNSIGNED NOT NULL AUTO_INCREMENT, `product` varchar(255) NOT NULL DEFAULT '', `lib` int UNSIGNED NOT NULL DEFAULT 0, @@ -68,9 +68,9 @@ CREATE TABLE `zt_api` ( `editedDate` datetime NOT NULL, `deleted` enum ('0', '1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_apispec`; -CREATE TABLE `zt_apispec` ( +CREATE TABLE IF NOT EXISTS `zt_apispec` ( `id` int UNSIGNED NOT NULL AUTO_INCREMENT, `doc` int UNSIGNED NOT NULL DEFAULT 0, `module` int UNSIGNED NOT NULL DEFAULT 0, @@ -91,9 +91,9 @@ CREATE TABLE `zt_apispec` ( `addedBy` varchar(30) NOT NULL DEFAULT 0, `addedDate` datetime NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_apistruct`; -CREATE TABLE `zt_apistruct` ( +CREATE TABLE IF NOT EXISTS `zt_apistruct` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `lib` int UNSIGNED NOT NULL DEFAULT 0, `name` varchar(30) NOT NULL DEFAULT '', @@ -107,9 +107,9 @@ CREATE TABLE `zt_apistruct` ( `editedDate` datetime NOT NULL, `deleted` enum ('0', '1') NOT NULL DEFAULT '0', primary key (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_apistruct_spec`; -CREATE TABLE `zt_apistruct_spec` ( +CREATE TABLE IF NOT EXISTS `zt_apistruct_spec` ( `id` int UNSIGNED NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL DEFAULT '', `type` varchar(50) NOT NULL DEFAULT '', @@ -119,9 +119,9 @@ CREATE TABLE `zt_apistruct_spec` ( `addedBy` varchar(30) NOT NULL DEFAULT 0, `addedDate` datetime NOT NULL, primary key (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_approval`; -CREATE TABLE `zt_approval` ( +CREATE TABLE IF NOT EXISTS `zt_approval` ( `id` mediumint(8) NOT NULL AUTO_INCREMENT, `flow` mediumint(8) NOT NULL, `objectType` varchar(30) NOT NULL, @@ -134,9 +134,9 @@ CREATE TABLE `zt_approval` ( `createdDate` datetime NOT NULL, `deleted` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_approvalflow`; -CREATE TABLE `zt_approvalflow` ( +CREATE TABLE IF NOT EXISTS `zt_approvalflow` ( `id` int(8) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `code` varchar(100) NOT NULL, @@ -147,9 +147,9 @@ CREATE TABLE `zt_approvalflow` ( `type` varchar(30) NOT NULL, `deleted` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_approvalflowobject`; -CREATE TABLE `zt_approvalflowobject` ( +CREATE TABLE IF NOT EXISTS `zt_approvalflowobject` ( `id` int(8) NOT NULL AUTO_INCREMENT, `root` int(8) NOT NULL, `flow` int(8) NOT NULL, @@ -157,9 +157,9 @@ CREATE TABLE `zt_approvalflowobject` ( `objectID` mediumint(9) NOT NULL, `extra` varchar(255) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_approvalflowspec`; -CREATE TABLE `zt_approvalflowspec` ( +CREATE TABLE IF NOT EXISTS `zt_approvalflowspec` ( `id` mediumint(8) NOT NULL AUTO_INCREMENT, `flow` mediumint(8) NOT NULL, `version` mediumint(8) NOT NULL, @@ -167,9 +167,9 @@ CREATE TABLE `zt_approvalflowspec` ( `createdBy` varchar(30) NOT NULL, `createdDate` datetime NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_approvalnode`; -CREATE TABLE `zt_approvalnode` ( +CREATE TABLE IF NOT EXISTS `zt_approvalnode` ( `id` mediumint(8) NOT NULL AUTO_INCREMENT, `approval` mediumint(8) NOT NULL, `type` enum('review','cc') NOT NULL, @@ -189,18 +189,18 @@ CREATE TABLE `zt_approvalnode` ( `reviewedDate` datetime NOT NULL, PRIMARY KEY (`id`), KEY `idx_reviewed_date` (`reviewedDate`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_approvalobject`; -CREATE TABLE `zt_approvalobject` ( +CREATE TABLE IF NOT EXISTS `zt_approvalobject` ( `id` int(8) NOT NULL AUTO_INCREMENT, `approval` int(8) NOT NULL, `objectType` char(30) NOT NULL, `objectID` mediumint(8) NOT NULL, `extra` varchar(255) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_approvalrole`; -CREATE TABLE `zt_approvalrole` ( +CREATE TABLE IF NOT EXISTS `zt_approvalrole` ( `id` int(8) NOT NULL AUTO_INCREMENT, `code` char(30) NOT NULL, `name` varchar(255) NOT NULL, @@ -208,7 +208,7 @@ CREATE TABLE `zt_approvalrole` ( `users` longtext NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_block`; CREATE TABLE IF NOT EXISTS `zt_block` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -227,7 +227,7 @@ CREATE TABLE IF NOT EXISTS `zt_block` ( PRIMARY KEY (`id`), UNIQUE KEY `account_vision_module_type_order` (`account`,`vision`,`module`,`type`,`order`), KEY `account` (`account`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_branch`; CREATE TABLE IF NOT EXISTS `zt_branch` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -242,7 +242,7 @@ CREATE TABLE IF NOT EXISTS `zt_branch` ( `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `product` (`product`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_bug`; CREATE TABLE IF NOT EXISTS `zt_bug` ( `id` mediumint(8) NOT NULL auto_increment, @@ -315,7 +315,7 @@ CREATE TABLE IF NOT EXISTS `zt_bug` ( KEY `toStory` (`toStory`), KEY `result` (`result`), KEY `assignedTo` (`assignedTo`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_build`; CREATE TABLE IF NOT EXISTS `zt_build` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -335,7 +335,7 @@ CREATE TABLE IF NOT EXISTS `zt_build` ( PRIMARY KEY (`id`), KEY `product` (`product`), KEY `execution` (`execution`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_burn`; CREATE TABLE IF NOT EXISTS `zt_burn` ( `execution` mediumint(8) unsigned NOT NULL, @@ -347,7 +347,7 @@ CREATE TABLE IF NOT EXISTS `zt_burn` ( `consumed` float NOT NULL, `storyPoint` float NOT NULL, PRIMARY KEY (`execution`,`date`,`task`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_case`; CREATE TABLE IF NOT EXISTS `zt_case` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -398,7 +398,7 @@ CREATE TABLE IF NOT EXISTS `zt_case` ( KEY `story` (`story`), KEY `fromBug` (`fromBug`), KEY `module` (`module`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_casestep`; CREATE TABLE IF NOT EXISTS `zt_casestep` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -411,9 +411,9 @@ CREATE TABLE IF NOT EXISTS `zt_casestep` ( PRIMARY KEY (`id`), KEY `case` (`case`), KEY `version` (`version`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_cfd`; -CREATE TABLE `zt_cfd` ( +CREATE TABLE IF NOT EXISTS `zt_cfd` ( `id` int(8) NOT NULL AUTO_INCREMENT PRIMARY KEY, `execution` int(8) NOT NULL, `type` char(30) NOT NULL, @@ -421,7 +421,7 @@ CREATE TABLE `zt_cfd` ( `count` smallint NOT NULL, `date` date NOT NULL, UNIQUE KEY `execution_type_name_date` (`execution`,`type`,`name`,`date`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_company`; CREATE TABLE IF NOT EXISTS `zt_company` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -436,7 +436,7 @@ CREATE TABLE IF NOT EXISTS `zt_company` ( `admins` char(255) default NULL, `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_compile`; CREATE TABLE IF NOT EXISTS `zt_compile` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -454,7 +454,7 @@ CREATE TABLE IF NOT EXISTS `zt_compile` ( `updateDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_config`; CREATE TABLE IF NOT EXISTS `zt_config` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -466,7 +466,7 @@ CREATE TABLE IF NOT EXISTS `zt_config` ( `value` longtext NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `unique` (`vision`,`owner`,`module`,`section`,`key`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_cron`; CREATE TABLE IF NOT EXISTS `zt_cron` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -483,7 +483,7 @@ CREATE TABLE IF NOT EXISTS `zt_cron` ( `lastTime` datetime NOT NULL, PRIMARY KEY (`id`), KEY `lastTime` (`lastTime`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_dept`; CREATE TABLE IF NOT EXISTS `zt_dept` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -498,7 +498,7 @@ CREATE TABLE IF NOT EXISTS `zt_dept` ( PRIMARY KEY (`id`), KEY `parent` (`parent`), KEY `path` (`path`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_design`; CREATE TABLE IF NOT EXISTS `zt_design` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -522,7 +522,7 @@ CREATE TABLE IF NOT EXISTS `zt_design` ( `version` smallint(6) NOT NULL, `type` char(30) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_designspec`; CREATE TABLE IF NOT EXISTS `zt_designspec` ( `design` mediumint(8) NOT NULL, @@ -531,7 +531,7 @@ CREATE TABLE IF NOT EXISTS `zt_designspec` ( `desc` mediumtext NOT NULL, `files` varchar(255) NOT NULL, UNIQUE KEY `design` (`design`,`version`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_doc`; CREATE TABLE IF NOT EXISTS `zt_doc` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -561,7 +561,7 @@ CREATE TABLE IF NOT EXISTS `zt_doc` ( KEY `product` (`product`), KEY `execution` (`execution`), KEY `lib` (`lib`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_doccontent`; CREATE TABLE IF NOT EXISTS `zt_doccontent` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -574,7 +574,7 @@ CREATE TABLE IF NOT EXISTS `zt_doccontent` ( `version` smallint(5) unsigned NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `doc_version` (`doc`,`version`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_doclib`; CREATE TABLE IF NOT EXISTS `zt_doclib` ( `id` smallint(5) unsigned NOT NULL auto_increment, @@ -596,7 +596,7 @@ CREATE TABLE IF NOT EXISTS `zt_doclib` ( PRIMARY KEY (`id`), KEY `product` (`product`), KEY `execution` (`execution`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_effort`; CREATE TABLE IF NOT EXISTS `zt_effort` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -613,7 +613,7 @@ CREATE TABLE IF NOT EXISTS `zt_effort` ( `status` enum('1','2','3') NOT NULL default '1', PRIMARY KEY (`id`), KEY `user` (`user`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_entry`; CREATE TABLE IF NOT EXISTS `zt_entry` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -631,7 +631,7 @@ CREATE TABLE IF NOT EXISTS `zt_entry` ( `editedDate` datetime NOT NULL, `deleted` enum('0', '1') NOT NULL DEFAULT '0', PRIMARY KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_expect`; CREATE TABLE IF NOT EXISTS `zt_expect` ( `id` mediumint(8) NOT NULL AUTO_INCREMENT PRIMARY KEY, @@ -642,7 +642,7 @@ CREATE TABLE IF NOT EXISTS `zt_expect` ( `createdBy` char(30) NOT NULL, `createdDate` date NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0' -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_extension`; CREATE TABLE IF NOT EXISTS `zt_extension` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -664,7 +664,7 @@ CREATE TABLE IF NOT EXISTS `zt_extension` ( UNIQUE KEY `code` (`code`), KEY `name` (`name`), KEY `installedTime` (`installedTime`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_file`; CREATE TABLE IF NOT EXISTS `zt_file` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -682,7 +682,7 @@ CREATE TABLE IF NOT EXISTS `zt_file` ( PRIMARY KEY (`id`), KEY `objectType` (`objectType`), KEY `objectID` (`objectID`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_group`; CREATE TABLE IF NOT EXISTS `zt_group` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -693,14 +693,14 @@ CREATE TABLE IF NOT EXISTS `zt_group` ( `desc` char(255) NOT NULL default '', `acl` text, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_grouppriv`; CREATE TABLE IF NOT EXISTS `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; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_holiday`; CREATE TABLE IF NOT EXISTS `zt_holiday` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -713,7 +713,7 @@ CREATE TABLE IF NOT EXISTS `zt_holiday` ( PRIMARY KEY (`id`), KEY `year` (`year`), KEY `name` (`name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_history`; CREATE TABLE IF NOT EXISTS `zt_history` ( `id` int(9) unsigned NOT NULL auto_increment, @@ -724,7 +724,7 @@ CREATE TABLE IF NOT EXISTS `zt_history` ( `diff` mediumtext NOT NULL, PRIMARY KEY (`id`), KEY `action` (`action`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_job`; CREATE TABLE IF NOT EXISTS `zt_job` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -752,9 +752,9 @@ CREATE TABLE IF NOT EXISTS `zt_job` ( `lastTag` varchar(255) DEFAULT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_kanbanspace`; -CREATE TABLE `zt_kanbanspace` ( +CREATE TABLE IF NOT EXISTS `zt_kanbanspace` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `type` varchar(50) NOT NULL, @@ -775,9 +775,9 @@ CREATE TABLE `zt_kanbanspace` ( `activatedDate` datetime NOT NULL, `deleted` enum('0', '1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_kanban`; -CREATE TABLE `zt_kanban` ( +CREATE TABLE IF NOT EXISTS `zt_kanban` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, `space` mediumint(8) unsigned NOT NULL, `name` varchar(255) NOT NULL, @@ -805,9 +805,9 @@ CREATE TABLE `zt_kanban` ( `activatedDate` datetime NOT NULL, `deleted` enum('0', '1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_kanbanregion`; -CREATE TABLE `zt_kanbanregion` ( +CREATE TABLE IF NOT EXISTS `zt_kanbanregion` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, `space` mediumint(8) unsigned NOT NULL, `kanban` mediumint(8) unsigned NOT NULL, @@ -819,9 +819,9 @@ CREATE TABLE `zt_kanbanregion` ( `lastEditedDate` datetime NOT NULL, `deleted` enum('0', '1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_kanbancard`; -CREATE TABLE `zt_kanbancard` ( +CREATE TABLE IF NOT EXISTS `zt_kanbancard` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, `kanban` mediumint(8) unsigned NOT NULL, `region` mediumint(8) unsigned NOT NULL, @@ -852,9 +852,9 @@ CREATE TABLE `zt_kanbancard` ( `assignedDate` datetime NOT NULL, `deleted` enum('0', '1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_kanbancell`; -CREATE TABLE `zt_kanbancell` ( +CREATE TABLE IF NOT EXISTS `zt_kanbancell` ( `id` int(8) NOT NULL AUTO_INCREMENT, `kanban` mediumint(8) NOT NULL, `lane` mediumint(8) NOT NULL, @@ -863,15 +863,15 @@ CREATE TABLE `zt_kanbancell` ( `cards` text NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `card_group` (`kanban`,`type`,`lane`,`column`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_kanbangroup`; -CREATE TABLE `zt_kanbangroup` ( +CREATE TABLE IF NOT EXISTS `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; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_kanbanlane`; CREATE TABLE IF NOT EXISTS `zt_kanbanlane` ( `id` int(8) NOT NULL AUTO_INCREMENT, @@ -887,7 +887,7 @@ CREATE TABLE IF NOT EXISTS `zt_kanbanlane` ( `lastEditedTime` datetime NOT NULL, `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_kanbancolumn`; CREATE TABLE IF NOT EXISTS `zt_kanbancolumn` ( `id` int(8) NOT NULL AUTO_INCREMENT, @@ -902,7 +902,7 @@ CREATE TABLE IF NOT EXISTS `zt_kanbancolumn` ( `archived` enum('0', '1') NOT NULL DEFAULT '0', `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_lang`; CREATE TABLE IF NOT EXISTS `zt_lang` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -915,7 +915,7 @@ CREATE TABLE IF NOT EXISTS `zt_lang` ( `vision` varchar(10) NOT NULL DEFAULT 'rnd', PRIMARY KEY (`id`), UNIQUE KEY `lang` (`lang`,`module`,`section`,`key`,`vision`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_log`; CREATE TABLE IF NOT EXISTS `zt_log` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -930,7 +930,7 @@ CREATE TABLE IF NOT EXISTS `zt_log` ( PRIMARY KEY `id` (`id`), KEY `objectType` (`objectType`), KEY `obejctID` (`objectID`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_module`; CREATE TABLE IF NOT EXISTS `zt_module` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -951,7 +951,7 @@ CREATE TABLE IF NOT EXISTS `zt_module` ( KEY `root` (`root`), KEY `type` (`type`), KEY `path` (`path`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_mr`; CREATE TABLE IF NOT EXISTS `zt_mr` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -987,7 +987,7 @@ CREATE TABLE IF NOT EXISTS `zt_mr` ( `hasNoConflict` enum('0','1') COLLATE 'utf8_general_ci' NOT NULL DEFAULT '0', `diffs` longtext COLLATE 'utf8_general_ci' NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_mrapproval`; CREATE TABLE IF NOT EXISTS `zt_mrapproval` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -997,7 +997,7 @@ CREATE TABLE IF NOT EXISTS `zt_mrapproval` ( `action` char(30) NOT NULL, `comment` text NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_notify`; CREATE TABLE IF NOT EXISTS `zt_notify` ( `id` mediumint unsigned NOT NULL AUTO_INCREMENT, @@ -1015,7 +1015,7 @@ CREATE TABLE IF NOT EXISTS `zt_notify` ( `failReason` text NOT NULL, PRIMARY KEY (`id`), KEY `objectType_toList_status` (`objectType`,`toList`,`status`) -) ENGINE='MyISAM' COLLATE 'utf8_general_ci'; +) ENGINE='InnoDB' COLLATE 'utf8_general_ci'; -- DROP TABLE IF EXISTS `zt_oauth`; CREATE TABLE IF NOT EXISTS `zt_oauth` ( `account` varchar(30) NOT NULL, @@ -1025,7 +1025,7 @@ CREATE TABLE IF NOT EXISTS `zt_oauth` ( KEY `account` (`account`), KEY `providerType` (`providerType`), KEY `providerID` (`providerID`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_pipeline`; CREATE TABLE IF NOT EXISTS `zt_pipeline` ( `id` smallint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -1042,14 +1042,14 @@ CREATE TABLE IF NOT EXISTS `zt_pipeline` ( `editedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_planstory`; CREATE TABLE IF NOT EXISTS `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; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_product`; CREATE TABLE IF NOT EXISTS `zt_product` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -1077,7 +1077,7 @@ CREATE TABLE IF NOT EXISTS `zt_product` ( PRIMARY KEY (`id`), KEY `acl` (`acl`), KEY `order` (`order`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_productplan`; CREATE TABLE IF NOT EXISTS `zt_productplan` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -1091,11 +1091,13 @@ CREATE TABLE IF NOT EXISTS `zt_productplan` ( `end` date NOT NULL, `order` text NOT NULL, `closedReason` varchar(20) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`), KEY `product` (`product`), KEY `end` (`end`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_project`; CREATE TABLE IF NOT EXISTS `zt_project` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -1157,9 +1159,9 @@ CREATE TABLE IF NOT EXISTS `zt_project` ( KEY `status` (`status`), KEY `acl` (`acl`), KEY `order` (`order`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_projectadmin`; -CREATE TABLE `zt_projectadmin` ( +CREATE TABLE IF NOT EXISTS `zt_projectadmin` ( `group` smallint(6) NOT NULL, `account` char(30) NOT NULL, `programs` text NOT NULL, @@ -1167,7 +1169,7 @@ CREATE TABLE `zt_projectadmin` ( `products` text NOT NULL, `executions` text NOT NULL, UNIQUE KEY `group_account` (`group`, `account`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_projectcase`; CREATE TABLE IF NOT EXISTS `zt_projectcase` ( `project` mediumint(8) unsigned NOT NULL DEFAULT '0', @@ -1177,7 +1179,7 @@ CREATE TABLE IF NOT EXISTS `zt_projectcase` ( `version` smallint(6) NOT NULL DEFAULT '1', `order` smallint(6) unsigned NOT NULL, UNIQUE KEY `project` (`project`,`case`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_projectproduct`; CREATE TABLE IF NOT EXISTS `zt_projectproduct` ( `project` mediumint(8) unsigned NOT NULL, @@ -1185,7 +1187,7 @@ CREATE TABLE IF NOT EXISTS `zt_projectproduct` ( `branch` mediumint(8) unsigned NOT NULL, `plan` varchar(255) NOT NULL, PRIMARY KEY (`project`, `product`, `branch`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_projectspec`; CREATE TABLE IF NOT EXISTS `zt_projectspec` ( `project` mediumint(8) NOT NULL, @@ -1195,7 +1197,7 @@ CREATE TABLE IF NOT EXISTS `zt_projectspec` ( `begin` date NOT NULL, `end` date NOT NULL, UNIQUE KEY `project` (`project`,`version`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_projectstory`; CREATE TABLE IF NOT EXISTS `zt_projectstory` ( `project` mediumint(8) unsigned NOT NULL default '0', @@ -1206,7 +1208,7 @@ CREATE TABLE IF NOT EXISTS `zt_projectstory` ( `order` smallint(6) unsigned NOT NULL, UNIQUE KEY `project` (`project`,`story`), KEY `story` (`story`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_relation`; CREATE TABLE IF NOT EXISTS `zt_relation` ( `id` int(8) NOT NULL AUTO_INCREMENT, @@ -1223,7 +1225,7 @@ CREATE TABLE IF NOT EXISTS `zt_relation` ( `extra` char(30) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `relation` (`product`,`relation`,`AType`,`BType`, `AID`, `BID`) -) ENGINE='MyISAM' DEFAULT CHARSET=utf8; +) ENGINE='InnoDB' DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_release`; CREATE TABLE IF NOT EXISTS `zt_release` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -1242,11 +1244,13 @@ CREATE TABLE IF NOT EXISTS `zt_release` ( `notify` varchar(255), `status` varchar(20) NOT NULL default 'normal', `subStatus` varchar(30) NOT NULL default '', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`), KEY `product` (`product`), KEY `build` (`build`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_repo`; CREATE TABLE IF NOT EXISTS `zt_repo` ( `id` mediumint(9) NOT NULL AUTO_INCREMENT, @@ -1275,7 +1279,7 @@ CREATE TABLE IF NOT EXISTS `zt_repo` ( `fileServerPassword` varchar(100) NOT NULL default '', `deleted` tinyint(1) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_repobranch`; CREATE TABLE IF NOT EXISTS `zt_repobranch` ( `repo` mediumint(8) unsigned NOT NULL, @@ -1284,7 +1288,7 @@ CREATE TABLE IF NOT EXISTS `zt_repobranch` ( UNIQUE KEY `repo_revision_branch` (`repo`,`revision`,`branch`), KEY `branch` (`branch`), KEY `revision` (`revision`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_repofiles`; CREATE TABLE IF NOT EXISTS `zt_repofiles` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, @@ -1299,7 +1303,7 @@ CREATE TABLE IF NOT EXISTS `zt_repofiles` ( KEY `parent` (`parent`), KEY `repo` (`repo`), KEY `revision` (`revision`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_repohistory`; CREATE TABLE IF NOT EXISTS `zt_repohistory` ( `id` mediumint(9) NOT NULL AUTO_INCREMENT, @@ -1312,7 +1316,7 @@ CREATE TABLE IF NOT EXISTS `zt_repohistory` ( PRIMARY KEY (`id`), KEY `repo` (`repo`), KEY `revision` (`revision`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_score`; CREATE TABLE IF NOT EXISTS `zt_score` ( `id` bigint(12) unsigned NOT NULL AUTO_INCREMENT, @@ -1328,13 +1332,13 @@ CREATE TABLE IF NOT EXISTS `zt_score` ( KEY `account` (`account`), KEY `model` (`module`), KEY `method` (`method`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_searchdict`; CREATE TABLE IF NOT EXISTS `zt_searchdict` ( `key` smallint(5) unsigned NOT NULL, `value` char(3) NOT NULL, PRIMARY KEY (`key`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_searchindex`; CREATE TABLE IF NOT EXISTS `zt_searchindex` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, @@ -1348,9 +1352,8 @@ CREATE TABLE IF NOT EXISTS `zt_searchindex` ( PRIMARY KEY (`id`), UNIQUE KEY `object` (`objectType`,`objectID`), KEY `addedDate` (`addedDate`), - FULLTEXT KEY `content` (`content`), - FULLTEXT KEY `title` (`title`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; + FULLTEXT KEY `title_content` (`title`, `content`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_stage`; CREATE TABLE IF NOT EXISTS `zt_stage` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -1363,7 +1366,7 @@ CREATE TABLE IF NOT EXISTS `zt_stage` ( `editedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_stakeholder`; CREATE TABLE IF NOT EXISTS `zt_stakeholder` ( `id` mediumint(8) NOT NULL AUTO_INCREMENT PRIMARY KEY, @@ -1379,7 +1382,7 @@ CREATE TABLE IF NOT EXISTS `zt_stakeholder` ( `editedDate` date NOT NULL, `deleted` enum('0','1') NOT NULL, KEY `objectID` (`objectID`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_story`; CREATE TABLE IF NOT EXISTS `zt_story` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -1421,6 +1424,7 @@ CREATE TABLE IF NOT EXISTS `zt_story` ( `toBug` mediumint(8) unsigned NOT NULL, `childStories` varchar(255) NOT NULL, `linkStories` varchar(255) NOT NULL, + `linkRequirements` varchar(255) NOT NULL, `duplicateStory` mediumint(8) unsigned NOT NULL, `version` smallint(6) NOT NULL default '1', `feedbackBy` varchar(100) NOT NULL, @@ -1431,7 +1435,7 @@ CREATE TABLE IF NOT EXISTS `zt_story` ( KEY `product` (`product`), KEY `status` (`status`), KEY `assignedTo` (`assignedTo`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_storyreview`; CREATE TABLE IF NOT EXISTS `zt_storyreview` ( `story` mediumint(9) NOT NULL, @@ -1440,7 +1444,7 @@ CREATE TABLE IF NOT EXISTS `zt_storyreview` ( `result` varchar(30) NOT NULL, `reviewDate` datetime NOT NULL, UNIQUE KEY `story` (`story`,`version`,`reviewer`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_storyestimate`; CREATE TABLE IF NOT EXISTS `zt_storyestimate` ( `story` mediumint(9) NOT NULL, @@ -1450,7 +1454,7 @@ CREATE TABLE IF NOT EXISTS `zt_storyestimate` ( `openedBy` varchar(30) NOT NULL, `openedDate` datetime NOT NULL, UNIQUE KEY `story` (`story`,`round`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_storyspec`; CREATE TABLE IF NOT EXISTS `zt_storyspec` ( `story` mediumint(9) NOT NULL, @@ -1459,7 +1463,7 @@ CREATE TABLE IF NOT EXISTS `zt_storyspec` ( `spec` mediumtext NOT NULL, `verify` mediumtext NOT NULL, UNIQUE KEY `story` (`story`,`version`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_storystage`; CREATE TABLE IF NOT EXISTS `zt_storystage` ( `story` mediumint(8) unsigned NOT NULL, @@ -1468,7 +1472,7 @@ CREATE TABLE IF NOT EXISTS `zt_storystage` ( `stagedBy` char(30) NOT NULL, UNIQUE KEY `story_branch` (`story`,`branch`), KEY `story` (`story`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_suitecase`; CREATE TABLE IF NOT EXISTS `zt_suitecase` ( `suite` mediumint(8) unsigned NOT NULL, @@ -1476,7 +1480,7 @@ CREATE TABLE IF NOT EXISTS `zt_suitecase` ( `case` mediumint(8) unsigned NOT NULL, `version` smallint(5) unsigned NOT NULL, UNIQUE KEY `suitecase` (`suite`,`case`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_task`; CREATE TABLE IF NOT EXISTS `zt_task` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -1538,7 +1542,7 @@ CREATE TABLE IF NOT EXISTS `zt_task` ( KEY `parent` (`parent`), KEY `assignedTo` (`assignedTo`) KEY `order` (`order`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_taskestimate`; CREATE TABLE IF NOT EXISTS `zt_taskestimate` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -1550,7 +1554,7 @@ CREATE TABLE IF NOT EXISTS `zt_taskestimate` ( `work` text, PRIMARY KEY (`id`), KEY `task` (`task`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_taskspec`; CREATE TABLE IF NOT EXISTS `zt_taskspec` ( `task` mediumint(8) NOT NULL, @@ -1559,7 +1563,7 @@ CREATE TABLE IF NOT EXISTS `zt_taskspec` ( `estStarted` date NOT NULL, `deadline` date NOT NULL, UNIQUE KEY `task` (`task`,`version`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_team`; CREATE TABLE IF NOT EXISTS `zt_team` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -1577,7 +1581,7 @@ CREATE TABLE IF NOT EXISTS `zt_team` ( `order` TINYINT(3) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `team` (`root`,`type`,`account`) - ) ENGINE=MyISAM DEFAULT CHARSET=utf8; + ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_testreport`; CREATE TABLE IF NOT EXISTS `zt_testreport` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -1601,7 +1605,7 @@ CREATE TABLE IF NOT EXISTS `zt_testreport` ( `createdDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_testresult`; CREATE TABLE IF NOT EXISTS `zt_testresult` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -1620,7 +1624,7 @@ CREATE TABLE IF NOT EXISTS `zt_testresult` ( KEY `case` (`case`), KEY `version` (`version`), KEY `run` (`run`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_testrun`; CREATE TABLE IF NOT EXISTS `zt_testrun` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -1634,7 +1638,7 @@ CREATE TABLE IF NOT EXISTS `zt_testrun` ( `status` char(30) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `task` (`task`,`case`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_testsuite`; CREATE TABLE IF NOT EXISTS `zt_testsuite` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -1650,7 +1654,7 @@ CREATE TABLE IF NOT EXISTS `zt_testsuite` ( `deleted` enum('0','1') NOT NULL, PRIMARY KEY (`id`), KEY `product` (`product`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_testtask`; CREATE TABLE IF NOT EXISTS `zt_testtask` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -1672,11 +1676,13 @@ CREATE TABLE IF NOT EXISTS `zt_testtask` ( `testreport` mediumint(8) unsigned NOT NULL, `auto` varchar(10) NOT NULL DEFAULT 'no', `subStatus` varchar(30) NOT NULL default '', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`), KEY `product` (`product`), KEY `build` (`build`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_todo`; CREATE TABLE IF NOT EXISTS `zt_todo` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -1707,7 +1713,7 @@ CREATE TABLE IF NOT EXISTS `zt_todo` ( KEY `assignedTo` (`assignedTo`), KEY `finishedBy` (`finishedBy`), KEY `date` (`date`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_user`; CREATE TABLE IF NOT EXISTS `zt_user` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -1755,7 +1761,7 @@ CREATE TABLE IF NOT EXISTS `zt_user` ( KEY `email` (`email`), KEY `commiter` (`commiter`), KEY `deleted` (`deleted`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_usercontact`; CREATE TABLE IF NOT EXISTS `zt_usercontact` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -1764,14 +1770,14 @@ CREATE TABLE IF NOT EXISTS `zt_usercontact` ( `userList` text NOT NULL, PRIMARY KEY (`id`), KEY `account` (`account`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_usergroup`; CREATE TABLE IF NOT EXISTS `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; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_userquery`; CREATE TABLE IF NOT EXISTS `zt_userquery` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -1785,7 +1791,7 @@ CREATE TABLE IF NOT EXISTS `zt_userquery` ( PRIMARY KEY (`id`), KEY `account` (`account`), KEY `module` (`module`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_usertpl`; CREATE TABLE IF NOT EXISTS `zt_usertpl` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -1796,7 +1802,7 @@ CREATE TABLE IF NOT EXISTS `zt_usertpl` ( `public` enum('0', '1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `account` (`account`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_userview`; CREATE TABLE IF NOT EXISTS `zt_userview` ( `account` char(30) NOT NULL, @@ -1805,7 +1811,7 @@ CREATE TABLE IF NOT EXISTS `zt_userview` ( `projects` mediumtext NOT NULL, `sprints` mediumtext NOT NULL, UNIQUE KEY `account` (`account`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_weeklyreport`; CREATE TABLE IF NOT EXISTS `zt_weeklyreport`( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -1821,7 +1827,7 @@ CREATE TABLE IF NOT EXISTS `zt_weeklyreport`( `workload` varchar(255) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `week` (`project`,`weekStart`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_webhook`; CREATE TABLE IF NOT EXISTS `zt_webhook` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -1843,7 +1849,7 @@ CREATE TABLE IF NOT EXISTS `zt_webhook` ( `editedDate` datetime NOT NULL, `deleted` enum('0', '1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO `zt_cron` (`m`, `h`, `dom`, `mon`, `dow`, `command`, `remark`, `type`, `buildin`, `status`, `lastTime`) VALUES ('*', '*', '*', '*', '*', '', '监控定时任务', 'zentao', 1, 'normal', '0000-00-00 00:00:00'), @@ -6169,7 +6175,7 @@ CREATE TABLE IF NOT EXISTS `zt_im_chat` ( KEY `public` (`public`), KEY `createdBy` (`createdBy`), KEY `editedBy` (`editedBy`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_im_chatuser`; CREATE TABLE IF NOT EXISTS `zt_im_chatuser` ( @@ -6193,7 +6199,7 @@ CREATE TABLE IF NOT EXISTS `zt_im_chatuser` ( KEY `star` (`star`), KEY `hide` (`hide`), UNIQUE KEY `chatuser` (`cgid`, `user`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_im_client`; CREATE TABLE IF NOT EXISTS `zt_im_client` ( @@ -6209,7 +6215,7 @@ CREATE TABLE IF NOT EXISTS `zt_im_client` ( `editedBy` varchar(30) NOT NULL DEFAULT '', `status` enum('released','wait') NOT NULL DEFAULT 'wait', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_im_message`; CREATE TABLE IF NOT EXISTS `zt_im_message` ( @@ -6229,7 +6235,7 @@ CREATE TABLE IF NOT EXISTS `zt_im_message` ( KEY `mcgid` (`cgid`), KEY `muser` (`user`), KEY `mtype` (`type`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_im_message_backup`; CREATE TABLE IF NOT EXISTS `zt_im_message_backup` ( @@ -6244,7 +6250,7 @@ CREATE TABLE IF NOT EXISTS `zt_im_message_backup` ( `contentType` enum('text', 'plain', 'emotion', 'image', 'file', 'object', 'code') NOT NULL DEFAULT 'text', `data` text NOT NULL DEFAULT '', `deleted` enum('0','1') NOT NULL DEFAULT '0' -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_im_message_index`; CREATE TABLE IF NOT EXISTS `zt_im_message_index` ( @@ -6261,7 +6267,7 @@ CREATE TABLE IF NOT EXISTS `zt_im_message_index` ( KEY `end` (`end`), KEY `startDate` (`startDate`), KEY `endDate` (`endDate`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_im_chat_message_index`; CREATE TABLE IF NOT EXISTS `zt_im_chat_message_index` ( @@ -6283,7 +6289,7 @@ CREATE TABLE IF NOT EXISTS `zt_im_chat_message_index` ( KEY `endDate` (`endDate`), KEY `chatstartindex` (`gid`,`startIndex`), KEY `chatendindex` (`gid`,`endIndex`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_im_messagestatus`; CREATE TABLE IF NOT EXISTS `zt_im_messagestatus` ( @@ -6291,7 +6297,7 @@ CREATE TABLE IF NOT EXISTS `zt_im_messagestatus` ( `message` int(11) unsigned NOT NULL, `status` enum('waiting','sent','readed','deleted') NOT NULL DEFAULT 'waiting', UNIQUE KEY `user` (`user`,`message`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_im_queue`; CREATE TABLE IF NOT EXISTS `zt_im_queue` ( @@ -6303,7 +6309,7 @@ CREATE TABLE IF NOT EXISTS `zt_im_queue` ( `result` text NOT NULL, `status` char(30) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_im_conference`; CREATE TABLE IF NOT EXISTS `zt_im_conference` ( @@ -6316,7 +6322,7 @@ CREATE TABLE IF NOT EXISTS `zt_im_conference` ( `openedBy` mediumint(8) NOT NULL DEFAULT 0, `openedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_im_conferenceaction`; CREATE TABLE IF NOT EXISTS `zt_im_conferenceaction` ( @@ -6328,7 +6334,7 @@ CREATE TABLE IF NOT EXISTS `zt_im_conferenceaction` ( `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `device` char(40) NOT NULL DEFAULT 'default', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_im_userdevice`; CREATE TABLE IF NOT EXISTS `zt_im_userdevice` ( @@ -6345,7 +6351,7 @@ CREATE TABLE IF NOT EXISTS `zt_im_userdevice` ( KEY `lastLogin` (`lastLogin`), KEY `lastLogout` (`lastLogout`), UNIQUE KEY `userdevice` (`user`, `device`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; ALTER TABLE `zt_file` CHANGE `pathname` `pathname` char(100) NOT NULL; ALTER TABLE `zt_user` ADD `clientStatus` enum('online', 'away', 'busy', 'offline', 'meeting') NOT NULL DEFAULT 'offline'; @@ -6822,7 +6828,7 @@ CREATE TABLE IF NOT EXISTS `zt_report` ( `addedDate` datetime NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `code` (`code`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE OR REPLACE VIEW `ztv_executionsummary` AS select `zt_task`.`execution` AS `execution`,sum(if((`zt_task`.`parent` >= '0'),`zt_task`.`estimate`,0)) AS `estimate`,sum(if((`zt_task`.`parent` >= '0'),`zt_task`.`consumed`,0)) AS `consumed`,sum(if(((`zt_task`.`status` <> 'cancel') and (`zt_task`.`status` <> 'closed') and (`zt_task`.`parent` >= '0')),`zt_task`.`left`,0)) AS `left`,count(0) AS `number`,sum(if(((`zt_task`.`status` <> 'done') and (`zt_task`.`status` <> 'closed')),1,0)) AS `undone`,sum((if((`zt_task`.`parent` >= '0'),`zt_task`.`consumed`,0) + if(((`zt_task`.`status` <> 'cancel') and (`zt_task`.`status` <> 'closed') and (`zt_task`.`parent` >= '0')),`zt_task`.`left`,0))) AS `totalReal` from `zt_task` where (`zt_task`.`deleted` = '0') group by `zt_task`.`execution`; CREATE OR REPLACE VIEW `ztv_projectsummary` AS select `zt_task`.`project` AS `project`,sum(if((`zt_task`.`parent` >= '0'),`zt_task`.`estimate`,0)) AS `estimate`,sum(if((`zt_task`.`parent` >= '0'),`zt_task`.`consumed`,0)) AS `consumed`,sum(if(((`zt_task`.`status` <> 'cancel') and (`zt_task`.`status` <> 'closed') and (`zt_task`.`parent` >= '0')),`zt_task`.`left`,0)) AS `left`,count(0) AS `number`,sum(if(((`zt_task`.`status` <> 'done') and (`zt_task`.`status` <> 'closed')),1,0)) AS `undone`,sum((if((`zt_task`.`parent` >= '0'),`zt_task`.`consumed`,0) + if(((`zt_task`.`status` <> 'cancel') and (`zt_task`.`status` <> 'closed') and (`zt_task`.`parent` >= '0')),`zt_task`.`left`,0))) AS `totalReal` from `zt_task` where (`zt_task`.`deleted` = '0') group by `zt_task`.`project`; @@ -6946,7 +6952,7 @@ CREATE TABLE IF NOT EXISTS `zt_feedback` ( `mailto` varchar(255) NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; ALTER TABLE `zt_bug` ADD `feedback` mediumint(8) unsigned NOT NULL DEFAULT '0' AFTER `caseVersion`; ALTER TABLE `zt_story` ADD `feedback` mediumint(8) unsigned NOT NULL DEFAULT '0' AFTER `fromBug`; @@ -6958,7 +6964,7 @@ CREATE TABLE IF NOT EXISTS `zt_feedbackview` ( `account` char(30) NOT NULL, `product` mediumint(8) unsigned NOT NULL, UNIQUE KEY `account_product` (`account`,`product`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_serverroom`; CREATE TABLE IF NOT EXISTS `zt_serverroom` ( @@ -6975,7 +6981,7 @@ CREATE TABLE IF NOT EXISTS `zt_serverroom` ( `editedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_account`; CREATE TABLE IF NOT EXISTS `zt_account` ( @@ -6999,7 +7005,7 @@ CREATE TABLE IF NOT EXISTS `zt_account` ( key `name` (`name`), key `provider` (`provider`), key `status` (`status`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_asset`; CREATE TABLE IF NOT EXISTS `zt_asset` ( @@ -7014,7 +7020,7 @@ CREATE TABLE IF NOT EXISTS `zt_asset` ( `editedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_host`; CREATE TABLE IF NOT EXISTS `zt_host` ( @@ -7061,7 +7067,7 @@ CREATE TABLE IF NOT EXISTS `zt_host` ( `cloudPassword` varchar(255) NOT NULL DEFAULT '', `couldVPC` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_service`; CREATE TABLE IF NOT EXISTS `zt_service` ( @@ -7092,7 +7098,7 @@ CREATE TABLE IF NOT EXISTS `zt_service` ( `order` smallint(5) unsigned NOT NULL default '0', `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (1, 'tree', 'editHost'); @@ -7122,7 +7128,7 @@ CREATE TABLE IF NOT EXISTS `zt_attend` ( KEY `reviewStatus` (`reviewStatus`), KEY `reviewedBy` (`reviewedBy`), UNIQUE KEY `attend` (`date`,`account`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_attendstat`; CREATE TABLE IF NOT EXISTS `zt_attendstat` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -7148,7 +7154,7 @@ CREATE TABLE IF NOT EXISTS `zt_attendstat` ( KEY `month` (`month`), KEY `status` (`status`), UNIQUE KEY `attend` (`month`,`account`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_overtime`; CREATE TABLE IF NOT EXISTS `zt_overtime` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -7172,7 +7178,7 @@ CREATE TABLE IF NOT EXISTS `zt_overtime` ( KEY `type` (`type`), KEY `status` (`status`), KEY `createdBy` (`createdBy`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_holiday`; CREATE TABLE IF NOT EXISTS `zt_holiday` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -7185,7 +7191,7 @@ CREATE TABLE IF NOT EXISTS `zt_holiday` ( PRIMARY KEY (`id`), KEY `year` (`year`), KEY `name` (`name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_leave`; CREATE TABLE IF NOT EXISTS `zt_leave` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -7208,7 +7214,7 @@ CREATE TABLE IF NOT EXISTS `zt_leave` ( KEY `type` (`type`), KEY `status` (`status`), KEY `createdBy` (`createdBy`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_lieu`; CREATE TABLE IF NOT EXISTS `zt_lieu` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -7230,7 +7236,7 @@ CREATE TABLE IF NOT EXISTS `zt_lieu` ( KEY `year` (`year`), KEY `status` (`status`), KEY `createdBy` (`createdBy`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_trip`; CREATE TABLE IF NOT EXISTS `zt_trip` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -7250,7 +7256,7 @@ CREATE TABLE IF NOT EXISTS `zt_trip` ( PRIMARY KEY (`id`), KEY `year` (`year`), KEY `createdBy` (`createdBy`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_deploy`; CREATE TABLE IF NOT EXISTS `zt_deploy` ( @@ -7269,7 +7275,7 @@ CREATE TABLE IF NOT EXISTS `zt_deploy` ( `result` varchar(20) NOT NULL, `deleted` enum('0','1') NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_deployproduct`; CREATE TABLE IF NOT EXISTS `zt_deployproduct` ( `deploy` mediumint(8) unsigned NOT NULL, @@ -7277,7 +7283,7 @@ CREATE TABLE IF NOT EXISTS `zt_deployproduct` ( `release` mediumint(8) unsigned NOT NULL, `package` varchar(255) NOT NULL, UNIQUE KEY `deploy_product_release` (`deploy`,`product`,`release`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_deploystep`; CREATE TABLE IF NOT EXISTS `zt_deploystep` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -7296,7 +7302,7 @@ CREATE TABLE IF NOT EXISTS `zt_deploystep` ( `createdDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; ALTER TABLE `zt_testresult` ADD `deploy` mediumint(8) unsigned NOT NULL; -- DROP TABLE IF EXISTS `zt_deployscope`; CREATE TABLE IF NOT EXISTS `zt_deployscope` ( @@ -7305,7 +7311,7 @@ CREATE TABLE IF NOT EXISTS `zt_deployscope` ( `hosts` text NOT NULL, `remove` text NOT NULL, `add` text NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_vm`; CREATE TABLE IF NOT EXISTS `zt_vm` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, @@ -7337,7 +7343,7 @@ CREATE TABLE IF NOT EXISTS `zt_vm` ( `deleted` enum('0','1') NOT NULL DEFAULT '0', `public` varchar(50) NOT NULL DEFAULT '', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_baseimage`; CREATE TABLE IF NOT EXISTS `zt_baseimage` ( `id` SMALLINT(7) unsigned NOT NULL AUTO_INCREMENT, @@ -7352,7 +7358,7 @@ CREATE TABLE IF NOT EXISTS `zt_baseimage` ( `suggestMemory` mediumint(6) unsigned NOT NULL DEFAULT 0, `suggestVolume` mediumint(6) unsigned NOT NULL DEFAULT 0, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_vmtemplate`; CREATE TABLE IF NOT EXISTS `zt_vmtemplate` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, @@ -7368,7 +7374,7 @@ CREATE TABLE IF NOT EXISTS `zt_vmtemplate` ( `diskSize` int NOT NULL DEFAULT 0, `osArch` varchar(50) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_browser`; CREATE TABLE IF NOT EXISTS `zt_browser` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, @@ -7379,16 +7385,16 @@ CREATE TABLE IF NOT EXISTS `zt_browser` ( `createdBy` varchar(30) NOT NULL, `createdDate` datetime NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_baseimagebrowser`; CREATE TABLE IF NOT EXISTS `zt_baseimagebrowser` ( `vmBackingID` int(10) NOT NULL, `browserID` int(10) NOT NULL, PRIMARY KEY (`vmBackingID`, `browserID`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_traincourse`; -CREATE TABLE `zt_traincourse` ( +CREATE TABLE IF NOT EXISTS `zt_traincourse` ( `id` mediumint(8) NOT NULL AUTO_INCREMENT, `code` varchar(50) NOT NULL, `category` mediumint(8) NOT NULL, @@ -7402,7 +7408,7 @@ CREATE TABLE `zt_traincourse` ( `editedDate` date NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_traincontents`; CREATE TABLE IF NOT EXISTS `zt_traincontents` ( @@ -7421,7 +7427,7 @@ CREATE TABLE IF NOT EXISTS `zt_traincontents` ( `editedDate` datetime NOT NULL, `deleted` tinyint(1) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_traincategory`; CREATE TABLE IF NOT EXISTS `zt_traincategory` ( @@ -7435,7 +7441,7 @@ CREATE TABLE IF NOT EXISTS `zt_traincategory` ( PRIMARY KEY (`id`), KEY `parent` (`parent`), KEY `path` (`path`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_trainrecords`; CREATE TABLE IF NOT EXISTS `zt_trainrecords` ( @@ -7444,7 +7450,7 @@ CREATE TABLE IF NOT EXISTS `zt_trainrecords` ( `objectType` varchar(10) NOT NULL, `status` varchar(10) NOT NULL, PRIMARY KEY (`user`, `objectId`, `objectType`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; ALTER TABLE `zt_doc` ADD `parent` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `type`, @@ -7474,7 +7480,7 @@ CREATE TABLE IF NOT EXISTS `zt_faq` ( `answer` text NOT NULL, `addedtime` datetime NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; ALTER TABLE `zt_task` ADD `feedback` mediumint(8) unsigned NOT NULL AFTER `fromBug`; ALTER TABLE `zt_todo` ADD `feedback` mediumint(8) unsigned NOT NULL AFTER `end`; @@ -7496,7 +7502,7 @@ CREATE TABLE IF NOT EXISTS `zt_domain`( `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`), key `domain` (`domain`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; DROP VIEW IF EXISTS `view_datasource_5`; CREATE VIEW `view_datasource_5` AS select `id`,`name` from `zt_task` where `deleted` = '0' and vision = 'rnd'; @@ -8532,7 +8538,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflow` ( KEY `module` (`module`), KEY `order` (`order`), UNIQUE KEY `unique` (`app`, `module`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_workflowaction`; CREATE TABLE IF NOT EXISTS `zt_workflowaction` ( @@ -8571,7 +8577,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowaction` ( KEY `action` (`action`), KEY `order` (`order`), UNIQUE KEY `unique` (`module`, `action`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_workflowdatasource`; CREATE TABLE IF NOT EXISTS `zt_workflowdatasource` ( @@ -8590,7 +8596,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowdatasource` ( `editedDate` datetime NOT NULL, PRIMARY KEY (`id`), KEY `type` (`type`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_workflowfield`; CREATE TABLE IF NOT EXISTS `zt_workflowfield` ( @@ -8625,7 +8631,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowfield` ( KEY `field` (`field`), KEY `order` (`order`), UNIQUE KEY `unique` (`module`, `field`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_workflowlayout`; CREATE TABLE IF NOT EXISTS `zt_workflowlayout` ( @@ -8646,7 +8652,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowlayout` ( KEY `action` (`action`), KEY `order` (`order`), UNIQUE KEY `unique` (`module`, `action`, `field`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_workflowlabel`; CREATE TABLE IF NOT EXISTS `zt_workflowlabel` ( @@ -8666,7 +8672,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowlabel` ( `editedDate` datetime NOT NULL, PRIMARY KEY (`id`), KEY `module` (`module`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_workflowlinkdata`; CREATE TABLE IF NOT EXISTS `zt_workflowlinkdata` ( @@ -8677,7 +8683,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowlinkdata` ( `createdBy` varchar(30) NOT NULL, `createdDate` datetime NOT NULL, UNIQUE KEY `unique` (`objectType`, `objectID`, `linkedType`, `linkedID`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_workflowrelation`; CREATE TABLE IF NOT EXISTS `zt_workflowrelation` ( @@ -8691,7 +8697,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowrelation` ( `createdBy` char(30) NOT NULL, `createdDate` datetime NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_workflowrelationlayout`; CREATE TABLE IF NOT EXISTS `zt_workflowrelationlayout` ( @@ -8707,7 +8713,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowrelationlayout` ( KEY `action` (`action`), KEY `order` (`order`), UNIQUE KEY `unique` (`prev`, `next`, `action`, `field`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_workflowrule`; CREATE TABLE IF NOT EXISTS `zt_workflowrule` ( @@ -8721,7 +8727,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowrule` ( `editedDate` datetime NOT NULL, PRIMARY KEY (`id`), KEY `type` (`type`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_workflowsql`; CREATE TABLE IF NOT EXISTS `zt_workflowsql` ( @@ -8739,7 +8745,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowsql` ( KEY `module` (`module`), KEY `field` (`field`), KEY `action` (`action`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_workflowversion`; CREATE TABLE IF NOT EXISTS `zt_workflowversion` ( @@ -8757,7 +8763,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowversion` ( UNIQUE KEY `moduleversion` (`module`, `version`), KEY `module` (`module`), KEY `version` (`version`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_workflowreport`; CREATE TABLE IF NOT EXISTS `zt_workflowreport` ( @@ -8773,7 +8779,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowreport` ( `createdBy` varchar(30) NOT NULL, `createdDate` datetime NOT NULL, PRIMARY KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; ALTER TABLE `zt_action` CHANGE `action` `action` varchar(80) NOT NULL DEFAULT ''; ALTER TABLE `zt_action` CHANGE `extra` `extra` text; @@ -8996,7 +9002,7 @@ CREATE TABLE IF NOT EXISTS `zt_durationestimation` ( `editedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_workestimation`; CREATE TABLE IF NOT EXISTS `zt_workestimation` ( @@ -9016,7 +9022,7 @@ CREATE TABLE IF NOT EXISTS `zt_workestimation` ( `deleted` enum('0','1') NOT NULL DEFAULT '0', `dayHour` decimal(10,2) DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_intervention`; CREATE TABLE IF NOT EXISTS `zt_intervention` ( @@ -9033,7 +9039,7 @@ CREATE TABLE IF NOT EXISTS `zt_intervention` ( `deleted` enum('0','1') NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `project` (`project`,`activity`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_activity`; CREATE TABLE IF NOT EXISTS `zt_activity` ( @@ -9054,7 +9060,7 @@ CREATE TABLE IF NOT EXISTS `zt_activity` ( `order` mediumint(8) DEFAULT '0', `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_auditcl`; CREATE TABLE IF NOT EXISTS `zt_auditcl` ( @@ -9075,7 +9081,7 @@ CREATE TABLE IF NOT EXISTS `zt_auditcl` ( `assignedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_auditplan`; CREATE TABLE IF NOT EXISTS `zt_auditplan` ( @@ -9103,7 +9109,7 @@ CREATE TABLE IF NOT EXISTS `zt_auditplan` ( `deleted` enum('0','1') NOT NULL DEFAULT '0', `checkBy` varchar(30) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_auditresult`; CREATE TABLE IF NOT EXISTS `zt_auditresult` ( @@ -9124,7 +9130,7 @@ CREATE TABLE IF NOT EXISTS `zt_auditresult` ( `assignedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_nc`; CREATE TABLE IF NOT EXISTS `zt_nc` ( @@ -9153,7 +9159,7 @@ CREATE TABLE IF NOT EXISTS `zt_nc` ( `editedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_zoutput`; CREATE TABLE IF NOT EXISTS `zt_zoutput` ( @@ -9171,7 +9177,7 @@ CREATE TABLE IF NOT EXISTS `zt_zoutput` ( `order` mediumint(8) DEFAULT '0', `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_process`; CREATE TABLE IF NOT EXISTS `zt_process` ( @@ -9192,7 +9198,7 @@ CREATE TABLE IF NOT EXISTS `zt_process` ( `assignedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_programactivity`; CREATE TABLE IF NOT EXISTS `zt_programactivity` ( @@ -9210,7 +9216,7 @@ CREATE TABLE IF NOT EXISTS `zt_programactivity` ( `createdDate` date NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_programoutput`; CREATE TABLE IF NOT EXISTS `zt_programoutput` ( @@ -9229,7 +9235,7 @@ CREATE TABLE IF NOT EXISTS `zt_programoutput` ( `createdDate` date NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_programprocess`; CREATE TABLE IF NOT EXISTS `zt_programprocess` ( @@ -9246,7 +9252,7 @@ CREATE TABLE IF NOT EXISTS `zt_programprocess` ( `createdDate` date NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_basicmeas`; CREATE TABLE IF NOT EXISTS `zt_basicmeas` ( @@ -9273,7 +9279,7 @@ CREATE TABLE IF NOT EXISTS `zt_basicmeas` ( `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `code` (`code`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_budget`; CREATE TABLE IF NOT EXISTS `zt_budget` ( @@ -9290,7 +9296,7 @@ CREATE TABLE IF NOT EXISTS `zt_budget` ( `lastEditedDate` date NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_researchplan`; CREATE TABLE IF NOT EXISTS `zt_researchplan` ( @@ -9313,7 +9319,7 @@ CREATE TABLE IF NOT EXISTS `zt_researchplan` ( `editedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_researchreport`; CREATE TABLE IF NOT EXISTS `zt_researchreport` ( @@ -9335,7 +9341,7 @@ CREATE TABLE IF NOT EXISTS `zt_researchreport` ( `editedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_meeting`; CREATE TABLE IF NOT EXISTS `zt_meeting` ( @@ -9363,7 +9369,7 @@ CREATE TABLE IF NOT EXISTS `zt_meeting` ( `editedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM CHARSET=utf8; +) ENGINE=InnoDB CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_meetingroom`; CREATE TABLE IF NOT EXISTS `zt_meetingroom` ( @@ -9379,7 +9385,7 @@ CREATE TABLE IF NOT EXISTS `zt_meetingroom` ( `editedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM CHARSET=utf8; +) ENGINE=InnoDB CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_assetlib`; CREATE TABLE IF NOT EXISTS `zt_assetlib` ( @@ -9393,7 +9399,7 @@ CREATE TABLE IF NOT EXISTS `zt_assetlib` ( `editedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM CHARSET=utf8; +) ENGINE=InnoDB CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_meastemplate`; CREATE TABLE IF NOT EXISTS `zt_meastemplate` ( @@ -9405,7 +9411,7 @@ CREATE TABLE IF NOT EXISTS `zt_meastemplate` ( `createdDate` date NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_programreport`; CREATE TABLE IF NOT EXISTS `zt_programreport` ( @@ -9419,7 +9425,7 @@ CREATE TABLE IF NOT EXISTS `zt_programreport` ( `createdDate` date NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_measrecords`; CREATE TABLE IF NOT EXISTS `zt_measrecords` ( @@ -9441,7 +9447,7 @@ CREATE TABLE IF NOT EXISTS `zt_measrecords` ( KEY `product` (`product`), KEY `project` (`project`), KEY `time` (`year`, `month`, `day`, `week`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_object`; CREATE TABLE IF NOT EXISTS `zt_object` ( @@ -9464,7 +9470,7 @@ CREATE TABLE IF NOT EXISTS `zt_object` ( `createdBy` char(30) NOT NULL, `createdDate` date NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0' -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_review`; CREATE TABLE IF NOT EXISTS `zt_review` ( @@ -9491,7 +9497,7 @@ CREATE TABLE IF NOT EXISTS `zt_review` ( `auditResult` char(30) NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM AUTO_INCREMENT=39 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_reviewcl`; CREATE TABLE IF NOT EXISTS `zt_reviewcl` ( @@ -9510,7 +9516,7 @@ CREATE TABLE IF NOT EXISTS `zt_reviewcl` ( `assignedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM AUTO_INCREMENT=30 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_reviewresult`; CREATE TABLE IF NOT EXISTS `zt_reviewresult` ( @@ -9524,7 +9530,7 @@ CREATE TABLE IF NOT EXISTS `zt_reviewresult` ( `createdDate` date NOT NULL, `consumed` float NOT NULL, UNIQUE KEY `reviewer` (`review`,`reviewer`,`type`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_reviewissue`; CREATE TABLE IF NOT EXISTS `zt_reviewissue` ( @@ -9547,7 +9553,7 @@ CREATE TABLE IF NOT EXISTS `zt_reviewissue` ( `createdDate` date NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_reviewlist`; CREATE TABLE IF NOT EXISTS `zt_reviewlist` ( @@ -9564,7 +9570,7 @@ CREATE TABLE IF NOT EXISTS `zt_reviewlist` ( `assignedBy` varchar(30) NOT NULL, `assignedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0' -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_cmcl`; CREATE TABLE IF NOT EXISTS `zt_cmcl` ( @@ -9581,7 +9587,7 @@ CREATE TABLE IF NOT EXISTS `zt_cmcl` ( `editedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_solutions`; CREATE TABLE IF NOT EXISTS `zt_solutions` ( @@ -9598,7 +9604,7 @@ CREATE TABLE IF NOT EXISTS `zt_solutions` ( `editedDate` date NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_measqueue`; CREATE TABLE IF NOT EXISTS `zt_measqueue` ( @@ -9614,7 +9620,7 @@ CREATE TABLE IF NOT EXISTS `zt_measqueue` ( `updateDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_issue`; CREATE TABLE IF NOT EXISTS `zt_issue` ( @@ -9652,7 +9658,7 @@ CREATE TABLE IF NOT EXISTS `zt_issue` ( `approvedDate` date NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_risk`; CREATE TABLE IF NOT EXISTS `zt_risk` ( @@ -9698,14 +9704,14 @@ CREATE TABLE IF NOT EXISTS `zt_risk` ( `approvedDate` date NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_riskissue`; CREATE TABLE IF NOT EXISTS `zt_riskissue` ( `risk` mediumint(8) unsigned NOT NULL, `issue` mediumint(8) unsigned NOT NULL, UNIQUE KEY `risk_issue` (`risk`,`issue`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_opportunity`; CREATE TABLE IF NOT EXISTS `zt_opportunity` ( @@ -9751,7 +9757,7 @@ CREATE TABLE IF NOT EXISTS `zt_opportunity` ( `lastCheckedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_trainplan`; CREATE TABLE IF NOT EXISTS `zt_trainplan` ( @@ -9772,7 +9778,7 @@ CREATE TABLE IF NOT EXISTS `zt_trainplan` ( `editedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_gapanalysis`; CREATE TABLE IF NOT EXISTS `zt_gapanalysis` ( @@ -9789,7 +9795,7 @@ CREATE TABLE IF NOT EXISTS `zt_gapanalysis` ( `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `project_account` (`project`,`account`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; ALTER TABLE `zt_bug` ADD `injection` mediumint(8) unsigned NOT NULL AFTER `product`, @@ -13572,7 +13578,7 @@ CREATE TABLE IF NOT EXISTS `zt_sqlview` ( `editedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET global log_bin_trust_function_creators = 1; SET global sql_mode = ''; USE `__TABLE__`; diff --git a/doc/CHANGELOG b/doc/CHANGELOG index f63c7003af..74446de91a 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -82,6 +82,30 @@ 33530 资产机会库机会列表页面审批字段居左显示 33823 问题指派页面增加备注 34097 修改执行QA不符合项详情页面中解决图标 +34729 QA质量保证计划可以批量编辑 +30071 项目甘特图中增加任务名称的显示 +28556 瀑布项目中计划的甘特图支持按日/周/月维度查看 +29700 项目甘特图中的任务支持点击查看详情 +29944 项目甘特图中支持显示阶段和任务的负责人 +34795 项目甘特图可以在阶段或任务前增加图标显示状态 +34742 项目甘特图中没有起止日期的任务的时间显示为所属阶段时间 +禅道客户端: +34124 XXD可以从XXB主动拉取配置 +34123 喧喧增加禅道的checktable.php以便自动修复数据库 +34122 去掉XXD中无意义的错误日志 +33667 通知中心的信息通知逻辑优化 +33665 修改通知中心的样式 +33464 禅道客户端支持弹窗显示 +33216 禅道客户端重连后不用跳到地盘页面 +33213 喧喧webview中增加加载中的过渡页面 +33196 合并禅道客户端禅道上方导航栏和窗口控制栏 +33187 喧喧一键安装包采用新的控制面板 +33068 实现客户端修改个人信息的功能 +33066 将群的设为公开和白名单设置放入群设置弹窗 +33065 实现只有群主和管理员才能添加群成员的功能 +33063 实现禁用移动端的功能 +33062 实现群主被删除后自动转让的功能 +32013 输出roadrunner相关文档 修复的Bug 24009 內禅任务详情页面上一个下一个切换错误 25389 升级时需要把项目负责人加到团队中 @@ -90,6 +114,7 @@ 23200 多人任务串行,可以操作出负的消耗工时 24357 多人任务填写日志后把日志删除对应的消耗工时仍然存在 25185 内置报表里,执行状态的下拉框里都没有已完成 +25603 修复新版一键安装包中XXD服务可能安装失败的问题。 2022-07-13 17.3 完成的需求 diff --git a/framework/base/model.class.php b/framework/base/model.class.php index 519def4741..37f53b06e5 100644 --- a/framework/base/model.class.php +++ b/framework/base/model.class.php @@ -253,10 +253,15 @@ class baseModel { if(empty($extensionName)) return false; - /* 设置扩展的名字和相应的文件。Set extenson name and extension file. */ $moduleName = $moduleName ? $moduleName : $this->getModuleName(); $moduleName = strtolower($moduleName); $extensionName = strtolower($extensionName); + + /* 设置扩展类的名字。Set the extension class name. */ + $extensionClass = $extensionName . ucfirst($moduleName); + if(isset($this->$extensionClass)) return $this->$extensionClass; + + /* 设置扩展的名字和相应的文件。Set extenson name and extension file. */ $moduleExtPath = $this->app->getModuleExtPath($this->appName, $moduleName, 'model'); if(!empty($moduleExtPath['site'])) $extensionFile = $moduleExtPath['site'] . 'class/' . $extensionName . '.class.php'; if(!isset($extensionFile) or !file_exists($extensionFile)) $extensionFile = $moduleExtPath['custom'] . 'class/' . $extensionName . '.class.php'; @@ -265,10 +270,6 @@ class baseModel if(!isset($extensionFile) or !file_exists($extensionFile)) $extensionFile = $moduleExtPath['xuan'] . 'class/' . $extensionName . '.class.php'; if(!isset($extensionFile) or !file_exists($extensionFile)) $extensionFile = $moduleExtPath['common'] . 'class/' . $extensionName . '.class.php'; - /* 设置扩展类的名字。Set the extension class name. */ - $extensionClass = $extensionName . ucfirst($moduleName); - if(isset($this->$extensionClass)) return $this->$extensionClass; - /* 载入父类。Try to import parent model file auto and then import the extension file. */ if(!class_exists($moduleName . 'Model')) helper::import($this->app->getModulePath($this->appName, $moduleName) . 'model.php'); if(!helper::import($extensionFile)) return false; diff --git a/framework/base/router.class.php b/framework/base/router.class.php index 60ef97b0b1..2e18212575 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -996,14 +996,7 @@ class baseRouter if($writable) { $ztSessionHandler = new ztSessionHandler($_GET['tid']); - session_set_save_handler( - array($ztSessionHandler, "open"), - array($ztSessionHandler, "close"), - array($ztSessionHandler, "read"), - array($ztSessionHandler, "write"), - array($ztSessionHandler, "destroy"), - array($ztSessionHandler, "gc") - ); + session_set_save_handler($ztSessionHandler, true); } } @@ -1532,8 +1525,14 @@ class baseRouter public function checkModuleName($var, $exit = true) { global $filter; - $rule = $filter->default->moduleName; - if(validater::checkByRule($var, $rule)) return true; + static $checkedModule = array(); + if(!isset($checkedModule[$var])) + { + $rule = $filter->default->moduleName; + $result = validater::checkByRule($var, $rule); + $checkedModule[$var] = $result; + } + if($checkedModule[$var]) return true; if(!$exit) return false; $this->triggerError("'$var' illegal. ", __FILE__, __LINE__, $exit = true); } @@ -3107,7 +3106,7 @@ class EndResponseException extends \Exception * * @package framework */ -class ztSessionHandler +class ztSessionHandler implements SessionHandlerInterface { public $sessSavePath; public $tagID; diff --git a/framework/model.class.php b/framework/model.class.php index 3ae6f6d4be..2bd51df082 100644 --- a/framework/model.class.php +++ b/framework/model.class.php @@ -157,6 +157,21 @@ class model extends baseModel } if(empty($relations)) $relations = $this->dao->select('next, actions')->from(TABLE_WORKFLOWRELATION)->where('prev')->eq($moduleName)->fetchPairs(); + $this->loadModel('flow'); + + $approvalProgressMenu = ''; + if($type == 'view' && !empty($this->config->openedApproval) && commonModel::hasPriv('approval', 'progress')) + { + $flow = $this->loadModel('workflow', 'flow')->getByModule($moduleName); + if($flow->approval == 'enabled') + { + $approvalID = isset($data->approval) ? $data->approval : 0; + $extraClass = strpos(',testsuite,build,release,productplan,', ",{$moduleName},") !== false ? 'btn-link' : ''; + $approvalProgressMenu .= "
"; + $approvalProgressMenu .= baseHTML::a(helper::createLink('approval', 'progress', "approvalID={$approvalID}", '', true), $this->lang->flow->approvalProgress, "class='btn {$extraClass} iframe'"); + } + } + $menu = ''; if($show) { @@ -164,8 +179,10 @@ class model extends baseModel { if(strpos($action->position, $type) === false || $action->show != $show) continue; - $menu .= $this->loadModel('flow')->buildActionMenu($moduleName, $action, $data, $type, $relations); + $menu .= $this->flow->buildActionMenu($moduleName, $action, $data, $type, $relations); } + + if($approvalProgressMenu) $menu .= $approvalProgressMenu; } else { @@ -174,10 +191,12 @@ class model extends baseModel { if(strpos($action->position, $type) === false) continue; - if($type == 'view' || $action->show == 'direct') $menu .= $this->loadModel('flow')->buildActionMenu($moduleName, $action, $data, $type, $relations); - if($type == 'browse' && $action->show == 'dropdownlist') $dropdownMenu .= $this->loadModel('flow')->buildActionMenu($moduleName, $action, $data, $type, $relations); + if($type == 'view' || $action->show == 'direct') $menu .= $this->flow->buildActionMenu($moduleName, $action, $data, $type, $relations); + if($type == 'browse' && $action->show == 'dropdownlist') $dropdownMenu .= $this->flow->buildActionMenu($moduleName, $action, $data, $type, $relations); } + if($approvalProgressMenu) $menu .= $approvalProgressMenu; + if($type == 'browse' && $dropdownMenu) { $menu .= " - fetch('block', 'printBlock', "id=$block->id&module=$module")?> +
@@ -94,7 +94,7 @@ $useGuest = $this->app->user->account == 'guest'; - fetch('block', 'printBlock', "id=$block->id&module=$module")?> +
@@ -136,6 +136,11 @@ $(function() }); } setTimeout(checkRemind, 1000); + + $('#dashboard .row .panel').each(function() + { + refreshBlock($(this)); + }) }); getExtViewFile(__FILE__)){include $extView; return helper::cd();}?> diff --git a/module/block/view/executionblock.html.php b/module/block/view/executionblock.html.php index 5f1e4e89d4..1f5d597033 100644 --- a/module/block/view/executionblock.html.php +++ b/module/block/view/executionblock.html.php @@ -41,11 +41,9 @@ children)) continue; - $appid = isset($_GET['entry']) ? "class='app-btn text-center' data-id='{$this->get->entry}'" : "class='text-center'"; $viewLink = $this->createLink('execution', 'task', 'executionID=' . $execution->id); - if($config->systemMode == 'new') $execution->name = zget($projectPairs, $execution->project, '') . ' / ' . $execution->name; + if($config->systemMode == 'new' and isset($projectPairs[$execution->project])) $execution->name = zget($projectPairs, $execution->project, '') . ' / ' . $execution->name; ?> > name, '', "title='$execution->name'");?> diff --git a/module/bug/css/linkbugs.css b/module/bug/css/linkbugs.css index 4054d67ddb..8daa5a760b 100644 --- a/module/bug/css/linkbugs.css +++ b/module/bug/css/linkbugs.css @@ -1,2 +1,2 @@ -.main-table {height: 600px !important} +.main-table {height: 80% !important} #mainContent {min-height: 400px;} diff --git a/module/bug/model.php b/module/bug/model.php index ffaa661385..f4e2b71060 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -401,6 +401,7 @@ class bugModel extends model elseif($browseType == 'bysearch') $bugs = $this->getBySearch($productIDList, $branch, $queryID, $sort, '', $pager, $projectID); elseif($browseType == 'overduebugs') $bugs = $this->getOverdueBugs($productIDList, $branch, $modules, $executions, $sort, $pager, $projectID); elseif($browseType == 'assignedbyme') $bugs = $this->getByAssignedbyme($productIDList, $branch, $modules, $executions, $sort, $pager, $projectID); + elseif($browseType == 'review') $bugs = $this->getReviewBugs($productIDList, $branch, $modules, $executions, $sort, $pager, $projectID); return $this->checkDelayedBugs($bugs); } @@ -740,6 +741,13 @@ class bugModel extends model $this->linkBugToBuild($bugID, $bug->resolvedBuild); } + if($bug->plan != $oldBug->plan) + { + $this->loadModel('action'); + if(!empty($oldBug->plan)) $this->action->create('productplan', $oldBug->plan, 'unlinkbug', '', $bugID); + if(!empty($bug->plan)) $this->action->create('productplan', $bug->plan, 'linkbug', '', $bugID); + } + $linkBugs = explode(',', $bug->linkBug); $oldLinkBugs = explode(',', $oldBug->linkBug); $addBugs = array_diff($linkBugs, $oldLinkBugs); @@ -777,11 +785,13 @@ class bugModel extends model */ public function batchUpdate() { - $bugs = array(); - $allChanges = array(); - $now = helper::now(); - $data = fixer::input('post')->get(); - $bugIDList = $this->post->bugIDList ? $this->post->bugIDList : array(); + $bugs = array(); + $allChanges = array(); + $now = helper::now(); + $data = fixer::input('post')->get(); + $bugIDList = $this->post->bugIDList ? $this->post->bugIDList : array(); + $unlinkPlans = array(); + $link2Plans = array(); if(!empty($bugIDList)) { @@ -861,6 +871,12 @@ class bugModel extends model $bug->{$extendField->field} = htmlSpecialString($bug->{$extendField->field}); } + if($bug->plan != $oldBug->plan) + { + if($bug->plan != $oldBug->plan and !empty($oldBug->plan)) $unlinkPlans[$oldBug->plan] = empty($unlinkPlans[$oldBug->plan]) ? $bugID : "{$unlinkPlans[$oldBug->plan]},$bugID"; + if($bug->plan != $oldBug->plan and !empty($bug->plan)) $link2Plans[$bug->plan] = empty($link2Plans[$bug->plan]) ? $bugID : "{$link2Plans[$bug->plan]},$bugID"; + } + $bugs[$bugID] = $bug; unset($bug); } @@ -902,7 +918,14 @@ class bugModel extends model } } } - if(!dao::isError()) $this->loadModel('score')->create('ajax', 'batchEdit'); + if(!dao::isError()) + { + $this->loadModel('score')->create('ajax', 'batchEdit'); + + $this->loadModel('action'); + foreach($unlinkPlans as $planID => $bugs) $this->action->create('productplan', $planID, 'unlinkbug', '', $bugs); + foreach($link2Plans as $planID => $bugs) $this->action->create('productplan', $planID, 'linkbug', '', $bugs); + } return $allChanges; } @@ -1697,8 +1720,8 @@ class bugModel extends model ->beginIF($type != 'closedBy' and $this->app->moduleName == 'block')->andWhere('t1.status')->ne('closed')->fi() ->beginIF($type != 'all' and $type != 'bySearch')->andWhere("t1.`$type`")->eq($account)->fi() ->beginIF($type == 'bySearch' and $moduleName == 'workBug')->andWhere("t1.assignedTo")->eq($account)->fi() - ->beginIF($type == 'bySearch' and $moduleName == 'contributeBug') ->beginIF($type == 'assignedTo' and $moduleName == 'workBug')->andWhere('t1.status')->ne('closed')->fi() + ->beginIF($type == 'bySearch' and $moduleName == 'contributeBug') ->andWhere('t1.openedBy', 1)->eq($account) ->orWhere('t1.closedBy')->eq($account) ->orWhere('t1.resolvedBy')->eq($account) @@ -2880,6 +2903,38 @@ class bugModel extends model return $bugs; } + /** + * Get bugs to review. + * + * @param array $productIDList + * @param int|string $branch + * @param array $modules + * @param array $executions + * @param string $orderBy + * @param object $pager + * @param int $projectID + * @access public + * @return array + */ + public function getReviewBugs($productIDList, $branch, $modules, $executions, $orderBy, $pager = null, $projectID = 0) + { + $bugs = $this->dao->select('t1.*, t2.title as planTitle')->from(TABLE_BUG)->alias('t1') + ->leftJoin(TABLE_PRODUCTPLAN)->alias('t2')->on('t1.plan = t2.id') + ->where('t1.product')->in($productIDList) + ->andWhere('t1.execution')->in(array_keys($executions)) + ->beginIF($branch !== 'all')->andWhere('t1.branch')->eq($branch)->fi() + ->beginIF($modules)->andWhere('t1.module')->in($modules)->fi() + ->beginIF($projectID)->andWhere('t1.project')->eq($projectID)->fi() + ->andWhere('t1.deleted')->eq(0) + ->andWhere("FIND_IN_SET('{$this->app->user->account}', t1.reviewers)") + ->beginIF(!$this->app->user->admin)->andWhere('t1.project')->in('0,' . $this->app->user->view->projects)->fi() + ->orderBy($orderBy)->page($pager)->fetchAll(); + + $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'bug'); + + return $bugs; + } + /** * Get bug query. * diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php index 8774ed36d9..b3e3e81c65 100644 --- a/module/bug/view/browse.html.php +++ b/module/bug/view/browse.html.php @@ -37,6 +37,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
moduleName, $this->methodName); foreach($menus as $menuItem) { diff --git a/module/build/css/view.css b/module/build/css/view.css index 98af719972..7c6550c08f 100644 --- a/module/build/css/view.css +++ b/module/build/css/view.css @@ -5,3 +5,4 @@ .page-title .text>a {font-weight: 700;} .body-modal #mainContent {min-height: 200px;} +td.article-content{overflow:auto !important;} diff --git a/module/build/lang/de.php b/module/build/lang/de.php index 9ffa1dfda4..d714465ad7 100644 --- a/module/build/lang/de.php +++ b/module/build/lang/de.php @@ -68,3 +68,5 @@ $lang->build->action = new stdclass(); $lang->build->action->buildopened = '$date, erstellt von $actor, Build $extra.' . "\n"; $lang->backhome = 'zurück'; + +$lang->build->featureBar['browse']['all'] = 'Build List'; diff --git a/module/build/lang/en.php b/module/build/lang/en.php index 79cd2f6480..73ec7a1d33 100644 --- a/module/build/lang/en.php +++ b/module/build/lang/en.php @@ -68,3 +68,5 @@ $lang->build->action = new stdclass(); $lang->build->action->buildopened = '$date, created by $actor, Build $extra.' . "\n"; $lang->backhome = 'back'; + +$lang->build->featureBar['browse']['all'] = 'Build List'; diff --git a/module/build/lang/fr.php b/module/build/lang/fr.php index cbf8cc4469..48326670ad 100644 --- a/module/build/lang/fr.php +++ b/module/build/lang/fr.php @@ -68,3 +68,5 @@ $lang->build->action = new stdclass(); $lang->build->action->buildopened = '$date, Build $extra créé par $actor.' . "\n"; $lang->backhome = 'Retour'; + +$lang->build->featureBar['browse']['all'] = 'Build List'; diff --git a/module/build/lang/vi.php b/module/build/lang/vi.php index adf75db272..e0080ba5da 100644 --- a/module/build/lang/vi.php +++ b/module/build/lang/vi.php @@ -64,3 +64,5 @@ $lang->build->action = new stdclass(); $lang->build->action->buildopened = '$date, được tạo bởi $actor, Bản dựng $extra.' . "\n"; $lang->backhome = 'Trở lại'; + +$lang->build->featureBar['browse']['all'] = 'Build List'; diff --git a/module/build/model.php b/module/build/model.php index 599601c50a..11815e9c3c 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -72,6 +72,7 @@ class buildModel extends model ->beginIF($projectID)->andWhere('t1.project')->eq((int)$projectID)->fi() ->beginIF($type == 'product' and $param)->andWhere('t1.product')->eq($param)->fi() ->beginIF($type == 'bysearch')->andWhere($param)->fi() + ->beginIF($type == 'review')->andWhere("FIND_IN_SET('{$this->app->user->account}', t1.reviewers)")->fi() ->orderBy($orderBy) ->page($pager) ->fetchAll('id'); @@ -136,6 +137,7 @@ class buildModel extends model ->beginIF($executionID)->andWhere('t1.execution')->eq((int)$executionID)->fi() ->beginIF($type == 'product' and $param)->andWhere('t1.product')->eq($param)->fi() ->beginIF($type == 'bysearch')->andWhere($param)->fi() + ->beginIF($type == 'review')->andWhere("FIND_IN_SET('{$this->app->user->account}', t1.reviewers)")->fi() ->orderBy($orderBy) ->page($pager) ->fetchAll('id'); diff --git a/module/build/view/view.html.php b/module/build/view/view.html.php index 08b65b6ff4..9dc0536718 100644 --- a/module/build/view/view.html.php +++ b/module/build/view/view.html.php @@ -344,7 +344,7 @@ tbody tr td:first-child input {display: none;} printExtendFields($build, 'table', 'inForm=0');?> build->desc;?> - + desc):?> desc;?> diff --git a/module/caselib/lang/de.php b/module/caselib/lang/de.php index 652875e151..d36368dae3 100644 --- a/module/caselib/lang/de.php +++ b/module/caselib/lang/de.php @@ -44,3 +44,6 @@ $lang->caselib->legendDesc = 'Description'; $lang->caselib->libraryDelete = 'Do you want to delete this library?'; $lang->caselib->noModule = '
You have no modules.
Manage it now.
'; + +$lang->caselib->featureBar['browse']['all'] = 'All'; +$lang->caselib->featureBar['browse']['wait'] = 'Waiting'; diff --git a/module/caselib/lang/en.php b/module/caselib/lang/en.php index 652875e151..d36368dae3 100644 --- a/module/caselib/lang/en.php +++ b/module/caselib/lang/en.php @@ -44,3 +44,6 @@ $lang->caselib->legendDesc = 'Description'; $lang->caselib->libraryDelete = 'Do you want to delete this library?'; $lang->caselib->noModule = '
You have no modules.
Manage it now.
'; + +$lang->caselib->featureBar['browse']['all'] = 'All'; +$lang->caselib->featureBar['browse']['wait'] = 'Waiting'; diff --git a/module/caselib/lang/fr.php b/module/caselib/lang/fr.php index 9f02e7f2e9..0b62e64e5f 100644 --- a/module/caselib/lang/fr.php +++ b/module/caselib/lang/fr.php @@ -44,3 +44,6 @@ $lang->caselib->legendDesc = 'Description'; $lang->caselib->libraryDelete = 'Voulez vous supprimer cette library ?'; $lang->caselib->noModule = "
Vous n'avez aucun modules.
Gérer les modules maintenant.
"; + +$lang->caselib->featureBar['browse']['all'] = 'All'; +$lang->caselib->featureBar['browse']['wait'] = 'Waiting'; diff --git a/module/caselib/lang/vi.php b/module/caselib/lang/vi.php index 48202a34e2..468d4ff3d9 100644 --- a/module/caselib/lang/vi.php +++ b/module/caselib/lang/vi.php @@ -39,3 +39,6 @@ $lang->caselib->legendDesc = 'Mô tả'; $lang->caselib->libraryDelete = 'Bạn có muốn xóa thư viện này?'; $lang->caselib->noModule = '
Chưa có Module.
Quản lý ngay.
'; + +$lang->caselib->featureBar['browse']['all'] = 'All'; +$lang->caselib->featureBar['browse']['wait'] = 'Waiting'; diff --git a/module/caselib/lang/zh-cn.php b/module/caselib/lang/zh-cn.php index e54c946d4e..06c5ee8d67 100644 --- a/module/caselib/lang/zh-cn.php +++ b/module/caselib/lang/zh-cn.php @@ -44,3 +44,6 @@ $lang->caselib->legendDesc = '描述'; $lang->caselib->libraryDelete = '您确认要删除该用例库吗?'; $lang->caselib->noModule = '
您现在还没有模块信息
请维护用例库模块
'; + +$lang->caselib->featureBar['browse']['all'] = '所有'; +$lang->caselib->featureBar['browse']['wait'] = '待评审'; diff --git a/module/caselib/model.php b/module/caselib/model.php index 977bc56463..011c9e1c01 100644 --- a/module/caselib/model.php +++ b/module/caselib/model.php @@ -220,13 +220,14 @@ class caselibModel extends model $browseType = ($browseType == 'bymodule' and $this->session->libBrowseType and $this->session->libBrowseType != 'bysearch') ? $this->session->libBrowseType : $browseType; $cases = array(); - if($browseType == 'bymodule' or $browseType == 'all' or $browseType == 'wait') + if($browseType == 'bymodule' or $browseType == 'all' or $browseType == 'wait' or $browseType == 'review') { $cases = $this->dao->select('*')->from(TABLE_CASE) ->where('lib')->eq((int)$libID) ->andWhere('product')->eq(0) ->beginIF($moduleIdList)->andWhere('module')->in($moduleIdList)->fi() ->beginIF($browseType == 'wait')->andWhere('status')->eq($browseType)->fi() + ->beginIF($browseType == 'review')->andWhere("FIND_IN_SET('{$this->app->user->account}', `reviewers`)")->fi() ->andWhere('deleted')->eq('0') ->orderBy($sort)->page($pager)->fetchAll('id'); } diff --git a/module/caselib/view/browse.html.php b/module/caselib/view/browse.html.php index 20a7880ebc..da0d3bd499 100644 --- a/module/caselib/view/browse.html.php +++ b/module/caselib/view/browse.html.php @@ -40,10 +40,12 @@ js::set('flow', $config->global->flow);
testcase->needReview && empty($config->testcase->forceReview)) unset($lang->caselib->featureBar['browse']['wait']); + foreach($lang->caselib->featureBar['browse'] as $featureType => $label) { - echo html::a($this->inlink('browse', "libID=$libID&browseType=all"), "{$lang->testcase->allCases}", '', "id='allTab' class='btn btn-link'"); - if($config->testcase->needReview or !empty($config->testcase->forceReview)) echo html::a($this->inlink('browse', "libID=$libID&browseType=wait"), "" . $lang->testcase->statusList['wait'] . "", '', "id='waitTab' class='btn btn-link'"); + $activeClass = $browseType == $featureType ? 'btn-active-text' : ''; + echo html::a(inlink('browse', "libID=$libID&browseType=$featureType"), "$label", '',"class='btn btn-link $activeClass' data-app={$app->tab} id=" . $featureType .'Tab'); } ?> testcase->bySearch;?> diff --git a/module/ci/control.php b/module/ci/control.php index 1118fef65f..5c5ea8fdc2 100644 --- a/module/ci/control.php +++ b/module/ci/control.php @@ -149,16 +149,18 @@ class ci extends control ->fetch(); $testtask = new stdclass(); - $testtask->product = $productID; - $testtask->name = !empty($post->name) ? $post->name : sprintf($this->lang->testtask->titleOfAuto, date('Y-m-d H:i:s')); - $testtask->owner = $this->app->user->account; - $testtask->project = $lastProject->project; - $testtask->execution = $lastProject->id; - $testtask->build = 'trunk'; - $testtask->auto = strtolower($testType); - $testtask->begin = date('Y-m-d'); - $testtask->end = date('Y-m-d', time() + 24 * 3600); - $testtask->status = 'done'; + $testtask->product = $productID; + $testtask->name = !empty($post->name) ? $post->name : sprintf($this->lang->testtask->titleOfAuto, date('Y-m-d H:i:s')); + $testtask->owner = $this->app->user->account; + $testtask->project = $lastProject->project; + $testtask->execution = $lastProject->id; + $testtask->build = 'trunk'; + $testtask->auto = strtolower($testType); + $testtask->begin = date('Y-m-d'); + $testtask->end = date('Y-m-d', time() + 24 * 3600); + $testtask->status = 'done'; + $testtask->createdBy = $this->app->user->account; + $testtask->createdDate = helper::now(); $this->dao->insert(TABLE_TESTTASK)->data($testtask)->exec(); $taskID = $this->dao->lastInsertId(); diff --git a/module/common/lang/de.php b/module/common/lang/de.php index 08c98ec4fd..1c6a3786c2 100644 --- a/module/common/lang/de.php +++ b/module/common/lang/de.php @@ -373,6 +373,7 @@ $lang->error->companyNotFound = "The domain %s cannot be found!"; $lang->error->length = array("『%s』Length Error. It should be『%s』", "『%s』length should be <=『%s』and >『%s』."); $lang->error->reg = "『%s』Format Error. It should be『%s』."; $lang->error->unique = "『%s』『%s』existed. Please go to Admin->System->Data->Recycle to restore it, if you are sure it is deleted."; +$lang->error->repeat = "『%s』『%s』exists."; $lang->error->gt = "『%s』should be >『%s』."; $lang->error->ge = "『%s』should be >=『%s』."; $lang->error->lt = "『%s』should be <『%s』。"; diff --git a/module/common/lang/en.php b/module/common/lang/en.php index 66ec104c45..44cd85fe22 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -373,6 +373,7 @@ $lang->error->companyNotFound = "The domain %s cannot be found!"; $lang->error->length = array("『%s』length error. It should be『%s』", "『%s』length should be <=『%s』and >『%s』."); $lang->error->reg = "『%s』format error. It should be『%s』."; $lang->error->unique = "『%s』『%s』exists. Go to Admin->System->Data->Recycle Bin to restore it, if you are sure it is deleted."; +$lang->error->repeat = "『%s』『%s』exists."; $lang->error->gt = "『%s』should be >『%s』."; $lang->error->ge = "『%s』should be >=『%s』."; $lang->error->lt = "『%s』should be <『%s』。"; diff --git a/module/common/lang/fr.php b/module/common/lang/fr.php index 7007d61b66..35aef6f5fc 100644 --- a/module/common/lang/fr.php +++ b/module/common/lang/fr.php @@ -373,6 +373,7 @@ $lang->error->companyNotFound = "Le domaine %s ne peut être trouvé !"; $lang->error->length = array("『 %s 』erreur de longueur. Il devrait être『%s』", "La longueur de 『%s』devrait être <=『%s』et >『%s』."); $lang->error->reg = "『 %s 』erreur de format. Il devrait être『%s』."; $lang->error->unique = "『 %s 』『 %s 』existes. Allez à Admin->System->Data->Recycle Bin pour le restaurer, si vous êtes sûr qu'il est supprimé."; +$lang->error->repeat = "『 %s 』『 %s 』existes."; $lang->error->gt = "『 %s 』devrait être > 『 %s 』."; $lang->error->ge = "『 %s 』devrait être >= 『 %s 』."; $lang->error->lt = "『%s』should be <『%s』。"; diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index e303e4b881..b56b7e3fea 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -373,6 +373,7 @@ $lang->error->companyNotFound = "您访问的域名 %s 没有对应的公司。" $lang->error->length = array("『%s』长度错误,应当为『%s』", "『%s』长度应当不超过『%s』,且大于『%s』。"); $lang->error->reg = "『%s』不符合格式,应当为:『%s』。"; $lang->error->unique = "『%s』已经有『%s』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。"; +$lang->error->repeat = "『%s』已经有『%s』这条记录了。"; $lang->error->gt = "『%s』应当大于『%s』。"; $lang->error->ge = "『%s』应当不小于『%s』。"; $lang->error->lt = "『%s』应当小于『%s』。"; diff --git a/module/common/model.php b/module/common/model.php index 4f68d398e7..b9a4def805 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -3373,6 +3373,45 @@ EOD; return $Parsedown->text($markdown); } + + /** + * Sort featureBar. + * + * @param string $module + * @param string $method + * @static + * @access public + * @return bool + */ + public static function sortFeatureMenu($module = '', $method = '') + { + global $lang, $app; + + $module = $module ? $module : $app->rawModule; + $method = $method ? $method : $app->rawMethod; + + /* It will be sorted according to the workflow in the future */ + if(!empty($lang->featureBarSort[$module][$method])) + { + $featureBar = array(); + if(empty($lang->$module->featureBar[$method])) return false; + foreach($lang->$module->featureBar[$method] as $key => $label) + { + foreach($lang->featureBarSort[$module][$method] as $currentKey => $afterKey) + { + if($key == $currentKey) continue; + $featureBar[$method][$key] = $label; + if($key == $afterKey && !empty($lang->$module->featureBar[$method][$currentKey])) + { + $featureBar[$method][$currentKey] = $lang->$module->featureBar[$method][$currentKey]; + } + } + } + $lang->$module->featureBar = $featureBar; + } + + return true; + } } class common extends commonModel diff --git a/module/convert/converter/redmine1.1.php b/module/convert/converter/redmine1.1.php index 6c2962f9b8..63b665daf5 100644 --- a/module/convert/converter/redmine1.1.php +++ b/module/convert/converter/redmine1.1.php @@ -385,7 +385,9 @@ class redmine11ConvertModel extends redmineConvertModel /* Insert into zentao */ foreach($productPlans as $id => $productPlan) { - $productPlan->product = $this->map['products'][$productPlan->execution_id]; + $productPlan->product = $this->map['products'][$productPlan->execution_id]; + $productPlan->createdBy = $this->app->user->account; + $productPlan->createdDate = helper::now(); unset($productPlan->id); unset($productPlan->execution_id); $this->dao->dbh($this->dbh)->insert(TABLE_PRODUCTPLAN)->data($productPlan)->exec(); @@ -395,7 +397,9 @@ class redmine11ConvertModel extends redmineConvertModel foreach($this->map['products'] as $productID) { $productPlan = $this->dao->dbh($this->dbh)->select("name as title, createdDate as begin")->from(TABLE_PRODUCT)->where('id')->eq($productID)->fetch(); - $productPlan->product = $productID; + $productPlan->product = $productID; + $productPlan->createdBy = $this->app->user->account; + $productPlan->createdDate = helper::now(); $this->dao->dbh($this->dbh)->insert(TABLE_PRODUCTPLAN)->data($productPlan)->exec(); $this->map['planOfProduct'][$productID] = $this->dao->lastinsertID(); } diff --git a/module/convert/model.php b/module/convert/model.php index 8ad71afe3d..152fe6578b 100644 --- a/module/convert/model.php +++ b/module/convert/model.php @@ -989,12 +989,14 @@ class convertModel extends model if(empty($data->RELEASEDATE)) continue; $release = new stdclass(); - $release->product = $build->product; - $release->build = $buildID; - $release->name = $build->name; - $release->date = $build->date; - $release->desc = $data->DESCRIPTION; - $release->status = 'normal'; + $release->product = $build->product; + $release->build = $buildID; + $release->name = $build->name; + $release->date = $build->date; + $release->desc = $data->DESCRIPTION; + $release->status = 'normal'; + $release->createdBy = $this->app->user->account; + $release->createdDate = helper::now(); $this->dao->dbh($this->dbh)->insert(TABLE_RELEASE)->data($release)->exec(); $releaseID = $this->dao->dbh($this->dbh)->lastInsertID(); diff --git a/module/design/js/browse.js b/module/design/js/browse.js index 67aeb16078..472e4d5704 100644 --- a/module/design/js/browse.js +++ b/module/design/js/browse.js @@ -2,4 +2,14 @@ $(function() { $('#subNavbar .nav li').removeClass('active'); $('#subNavbar .nav li[data-id=' + type + ']').addClass('active'); + + $('#subNavbar .nav li > a').each(function() + { + var type = $(this).parent().attr('data-id'); + if(type == 'bysearch') return; + + type = type == 'all' ? type : type.toUpperCase(); + var href = createLink('design', 'browse', 'projectID=' + projectID + '&productID=' + productID + '&type=' + type); + $(this).attr('href', href); + }); }) diff --git a/module/design/view/browse.html.php b/module/design/view/browse.html.php index 700a2b847e..b3433abf73 100644 --- a/module/design/view/browse.html.php +++ b/module/design/view/browse.html.php @@ -13,6 +13,8 @@ + + - -
-
-
-
-

file->inputFileName;?>

-
- title, '.') !== false) - { - /* Fix the file name exe.exe */ - $title = explode('.', $file->title); - $extension = end($title); - if($file->extension == 'txt' && $extension != $file->extension) $file->extension = $extension; - array_pop($title); - $file->title = join('.', $title); - } - ?> -
- - - - - -
-
- title, "class='form-control' size='40'");?> - - .extension;?> -
-
-
-
-
-
- diff --git a/module/file/view/viewfiles.html.php b/module/file/view/viewfiles.html.php index 15990a8c8e..a1534e45d3 100644 --- a/module/file/view/viewfiles.html.php +++ b/module/file/view/viewfiles.html.php @@ -6,19 +6,39 @@
diff --git a/module/gitlab/view/browseproject.html.php b/module/gitlab/view/browseproject.html.php index eed11bfc6d..5dd1948d3f 100644 --- a/module/gitlab/view/browseproject.html.php +++ b/module/gitlab/view/browseproject.html.php @@ -45,7 +45,7 @@ gitlab->project->name);?> gitlab->lastUpdate;?> - actions;?> + actions;?> @@ -60,6 +60,8 @@ last_activity_at, 0, 10);?> id", '', 'list', 'treemap', '', '', false, '', $this->lang->gitlab->browseBranch, 0, $gitlabProject->default_branch); + echo common::buildIconButton('gitlab', 'browseTag', "gitlabID=$gitlabID&projectID=$gitlabProject->id", '', 'list', 'tag', '', '', false, '', $this->lang->gitlab->browseTag, 0, $gitlabProject->default_branch); echo common::buildIconButton('gitlab', 'manageBranchPriv', "gitlabID=$gitlabID&projectID=$gitlabProject->id", '', 'list', 'branch-lock', '', '', false, '', $this->lang->gitlab->browseBranchPriv, 0, ($gitlabProject->isMaintainer and $gitlabProject->default_branch)); echo common::buildIconButton('gitlab', 'manageTagPriv', "gitlabID=$gitlabID&projectID=$gitlabProject->id", '', 'list', 'tag-lock', '', '', false, '', $this->lang->gitlab->browseTagPriv, 0, ($gitlabProject->isMaintainer and $gitlabProject->default_branch)); echo common::buildIconButton('gitlab', 'manageProjectMembers', 'repoID=' . zget($repoPairs, $gitlabProject->id), '', 'list', 'team', '', '', false, '', '', 0, isset($repoPairs[$gitlabProject->id])); diff --git a/module/group/control.php b/module/group/control.php index ffb2052000..e3a4ea2e33 100644 --- a/module/group/control.php +++ b/module/group/control.php @@ -91,6 +91,7 @@ class group extends control if(!empty($_POST)) { $this->group->update($groupID); + if(dao::isError()) return print(js::error(dao::getError())); if(isonlybody()) return print(js::closeModal('parent.parent', 'this')); return print(js::locate($this->createLink('group', 'browse'), 'parent')); } diff --git a/module/group/lang/de.php b/module/group/lang/de.php index 9deaa69598..4c5500747c 100644 --- a/module/group/lang/de.php +++ b/module/group/lang/de.php @@ -46,6 +46,7 @@ $lang->group->group = 'Group'; $lang->group->more = 'More'; $lang->group->allCheck = 'All'; $lang->group->noGroup = 'No group'; +$lang->group->repeat = "『%s』『%s』exists.Please adjust it and try again."; global $config; if($config->systemMode == 'new') $lang->group->noneProject = 'No Project'; diff --git a/module/group/lang/en.php b/module/group/lang/en.php index 86ffacb8fa..70e4659fb5 100644 --- a/module/group/lang/en.php +++ b/module/group/lang/en.php @@ -46,6 +46,7 @@ $lang->group->group = 'Group'; $lang->group->more = 'More'; $lang->group->allCheck = 'All'; $lang->group->noGroup = 'No group'; +$lang->group->repeat = "『%s』『%s』exists.Please adjust it and try again."; global $config; if($config->systemMode == 'new') $lang->group->noneProject = 'No Project'; diff --git a/module/group/lang/fr.php b/module/group/lang/fr.php index 4dcbd75943..f4cdf89881 100644 --- a/module/group/lang/fr.php +++ b/module/group/lang/fr.php @@ -46,6 +46,7 @@ $lang->group->group = 'Group'; $lang->group->more = 'More'; $lang->group->allCheck = 'All'; $lang->group->noGroup = 'Aucun groupe'; +$lang->group->repeat = "『%s』『%s』exists.Please adjust it and try again."; global $config; if($config->systemMode == 'new') $lang->group->noneProject = 'No Project'; diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index c535452c03..6de9b39981 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -264,7 +264,6 @@ if($config->systemMode == 'new') $lang->resource->project->testreport = 'testreport'; $lang->resource->project->execution = 'execution'; $lang->resource->project->export = 'export'; - $lang->resource->project->createGuide = 'createGuide'; $lang->resource->project->updateOrder = 'updateOrder'; $lang->resource->project->team = 'teamAction'; $lang->resource->project->unlinkMember = 'unlinkMember'; @@ -304,10 +303,9 @@ if($config->systemMode == 'new') $lang->project->methodOrder[160] = 'testreport'; $lang->project->methodOrder[165] = 'execution'; $lang->project->methodOrder[170] = 'export'; - $lang->project->methodOrder[175] = 'createGuide'; - $lang->project->methodOrder[180] = 'updateOrder'; - $lang->project->methodOrder[185] = 'team'; - $lang->project->methodOrder[190] = 'unlinkMember'; + $lang->project->methodOrder[175] = 'updateOrder'; + $lang->project->methodOrder[180] = 'team'; + $lang->project->methodOrder[185] = 'unlinkMember'; $lang->resource->projectbuild = new stdclass(); $lang->resource->projectbuild->browse = 'browse'; @@ -513,6 +511,9 @@ $lang->resource->story->batchChangeModule = 'batchChangeModule'; $lang->resource->story->batchToTask = 'batchToTask'; $lang->resource->story->track = 'trackAB'; $lang->resource->story->processStoryChange = 'processStoryChange'; +$lang->resource->story->linkStories = 'linkStoriesAB'; + +if($config->URAndSR) $lang->resource->story->linkRequirements = 'linkRequirementsAB'; $lang->story->methodOrder[5] = 'create'; $lang->story->methodOrder[10] = 'batchCreate'; @@ -542,6 +543,9 @@ $lang->story->methodOrder[125] = 'batchChangeModule'; $lang->story->methodOrder[130] = 'batchToTask'; $lang->story->methodOrder[135] = 'track'; $lang->story->methodOrder[140] = 'processStoryChange'; +$lang->story->methodOrder[145] = 'linkStories'; + +if($config->URAndSR) $lang->story->methodOrder[150] = 'linkRequirements'; /* Product plan. */ $lang->resource->productplan = new stdclass(); @@ -624,6 +628,7 @@ $lang->resource->kanban->activateSpace = 'activateSpace'; $lang->resource->kanban->sortSpace = 'sortSpace'; $lang->resource->kanban->create = 'create'; $lang->resource->kanban->edit = 'edit'; +$lang->resource->kanban->setting = 'setting'; $lang->resource->kanban->view = 'view'; $lang->resource->kanban->activate = 'activate'; $lang->resource->kanban->close = 'close'; diff --git a/module/group/lang/zh-cn.php b/module/group/lang/zh-cn.php index 7f1da7924f..9559c806b7 100644 --- a/module/group/lang/zh-cn.php +++ b/module/group/lang/zh-cn.php @@ -46,6 +46,7 @@ $lang->group->group = '分组'; $lang->group->more = '更多'; $lang->group->allCheck = '全部'; $lang->group->noGroup = '暂时没有分组。'; +$lang->group->repeat = "『%s』已经有『%s』这条记录了,请调整后再试。"; global $config; if($config->systemMode == 'new') $lang->group->noneProject = '暂时没有项目'; diff --git a/module/group/model.php b/module/group/model.php index ca6fcd8ae4..b9cfd0ba1c 100644 --- a/module/group/model.php +++ b/module/group/model.php @@ -27,7 +27,8 @@ class groupModel extends model unset($group->limited); $group->role = 'limited'; } - $this->dao->insert(TABLE_GROUP)->data($group)->batchCheck($this->config->group->create->requiredFields, 'notempty')->exec(); + $this->lang->error->unique = $this->lang->group->repeat; + $this->dao->insert(TABLE_GROUP)->data($group)->batchCheck($this->config->group->create->requiredFields, 'notempty')->check('name', 'unique')->exec(); return $this->dao->lastInsertId(); } @@ -41,7 +42,8 @@ class groupModel extends model public function update($groupID) { $group = fixer::input('post')->get(); - return $this->dao->update(TABLE_GROUP)->data($group)->batchCheck($this->config->group->edit->requiredFields, 'notempty')->where('id')->eq($groupID)->exec(); + $this->lang->error->unique = $this->lang->group->repeat; + return $this->dao->update(TABLE_GROUP)->data($group)->batchCheck($this->config->group->edit->requiredFields, 'notempty')->check('name', 'unique', "id != {$groupID}")->where('id')->eq($groupID)->exec(); } /** @@ -54,6 +56,7 @@ class groupModel extends model public function copy($groupID) { $group = fixer::input('post')->remove('options')->get(); + $this->lang->error->unique = $this->lang->group->repeat; $this->dao->insert(TABLE_GROUP)->data($group)->check('name', 'unique')->check('name', 'notempty')->exec(); if($this->post->options == false) return; if(!dao::isError()) @@ -315,9 +318,9 @@ class groupModel extends model /** * Get admins by object id list. - * - * @param int $idList - * @param string $field + * + * @param int $idList + * @param string $field * @access public * @return void */ diff --git a/module/index/css/index.css b/module/index/css/index.css index 1ae12da38f..bdd0ebe853 100644 --- a/module/index/css/index.css +++ b/module/index/css/index.css @@ -120,3 +120,5 @@ body.menu-hide {padding-left: 0;} { #upgradeContent{width: 85%;} } +#searchbox .dropdown-menu > li.search-type-all{max-width: 250px} +#searchbox .dropdown-menu > li.search-type-all a{width: 100%; overflow: hidden; text-overflow: ellipsis;} diff --git a/module/index/js/index.js b/module/index/js/index.js index 2c8f76f6d9..d1a2c7a9b3 100644 --- a/module/index/js/index.js +++ b/module/index/js/index.js @@ -266,7 +266,7 @@ /* Show page app and update iframe source */ var iframe = app.$iframe[0]; var isSameUrl = iframe && url && iframe.contentWindow.location.href.endsWith(url); - if (url && (!isSameUrl || forceReload)) + if (url && (!isSameUrl || forceReload !== false)) { app.$app.toggleClass('open-from-hidden', app.$app.is(':hidden')) reloadApp(appCode, url, true); diff --git a/module/job/model.php b/module/job/model.php index 582ba3653a..c3d53774e7 100644 --- a/module/job/model.php +++ b/module/job/model.php @@ -182,7 +182,7 @@ class jobModel extends model $repo = $this->loadModel('repo')->getRepoByID($job->repo); $project = zget($repo, 'project'); - $job->server = (int)zget($repo, 'gitlab', 0); + $job->server = (int)zget($repo, 'serviceHost', 0); $job->pipeline = json_encode(array('project' => $project, 'reference' => $this->post->reference)); } @@ -300,7 +300,7 @@ class jobModel extends model $project = zget($repo, 'project'); $job->repo = $job->gitlabRepo; - $job->server = (int)zget($repo, 'gitlab', 0); + $job->server = (int)zget($repo, 'serviceHost', 0); $job->pipeline = json_encode(array('project' => $project, 'reference' => $this->post->reference)); } diff --git a/module/kanban/config.php b/module/kanban/config.php index 27373d5b3f..a7aa8de832 100644 --- a/module/kanban/config.php +++ b/module/kanban/config.php @@ -36,6 +36,10 @@ $config->kanban->splitcolumn->requiredFields = 'name,limit'; $config->kanban->editor = new stdclass(); $config->kanban->editor->closespace = array('id' => 'comment', 'tools' => 'simpleTools'); $config->kanban->editor->activatespace = array('id' => 'comment', 'tools' => 'simpleTools'); +$config->kanban->editor->createspace = array('id' => 'desc', 'tools' => 'simpleTools'); +$config->kanban->editor->editspace = array('id' => 'desc', 'tools' => 'simpleTools'); +$config->kanban->editor->create = array('id' => 'desc', 'tools' => 'simpleTools'); +$config->kanban->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools'); $config->kanban->editor->createcard = array('id' => 'desc', 'tools' => 'simpleTools'); $config->kanban->editor->activate = array('id' => 'comment', 'tools' => 'simpleTools'); $config->kanban->editor->close = array('id' => 'comment', 'tools' => 'simpleTools'); diff --git a/module/kanban/control.php b/module/kanban/control.php index 3b4ac85967..405613deff 100644 --- a/module/kanban/control.php +++ b/module/kanban/control.php @@ -90,7 +90,6 @@ class kanban extends control } $space = $this->kanban->getSpaceById($spaceID); - $space->desc = strip_tags(htmlspecialchars_decode($space->desc)); $typeList = $this->lang->kanbanspace->typeList; if($space->type == 'cooperation' or $space->type == 'public') unset($typeList['private']); @@ -277,8 +276,7 @@ class kanban extends control return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent')); } - $kanban = $this->kanban->getByID($kanbanID); - $kanban->desc = strip_tags(htmlspecialchars_decode($kanban->desc)); + $kanban = $this->kanban->getByID($kanbanID); $space = $this->kanban->getSpaceById($kanban->space); $spaceUsers = trim($space->owner) . ',' . trim($space->team); @@ -291,6 +289,33 @@ class kanban extends control $this->view->kanban = $kanban; $this->view->type = $space->type; + $this->display(); + } + + /** + * Setting kanban. + * + * @param int $kanbanID + * @access public + * @return void + */ + public function setting($kanbanID = 0) + { + if(!empty($_POST)) + { + $changes = $this->kanban->setting($kanbanID); + + if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); + + $actionID = $this->loadModel('action')->create('kanban', $kanbanID, 'edited'); + $this->action->logHistory($actionID, $changes); + + return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent')); + } + + $kanban = $this->kanban->getByID($kanbanID); + + $this->view->kanban = $kanban; $this->view->laneCount = $this->kanban->getLaneCount($kanbanID); $this->view->heightType = $kanban->displayCards > 2 ? 'custom' : 'auto'; $this->view->displayCards = $kanban->displayCards ? $kanban->displayCards : ''; diff --git a/module/kanban/css/edit.css b/module/kanban/css/edit.css index 0c6f74a6be..bef119443d 100644 --- a/module/kanban/css/edit.css +++ b/module/kanban/css/edit.css @@ -1,13 +1,6 @@ #mainContent .table-form>tbody>tr>th {width: 105px;} #mainContent {padding-left: 0px;} #mainContent .laneHeightBox .radio-inline+.radio-inline, #mainContent .importBox .radio-inline+.radio-inline {margin-left: 20px;} -#mainContent .objectBox {padding-top: 2px;} -#mainContent .objectBox .checkbox-primary {display: inline-block;} -#mainContent .objectBox .checkbox-primary:not(:first-child) {margin-left: 10px;} -#mainContent .objectBox .checkbox-primary>label:not(:first-child) {padding-left: 20px;} -#mainContent .laneHeightBox .tip {color: #999;} -#mainContent .objectBox .checkbox-primary>label:before {top: 2px; left: 0px;} -#mainContent .objectBox .checkbox-primary>label:after {width: 14px; height: 14px;} [lang^='en'] .columnWidth {width: 120px;} [lang^='zh-cn'] .columnWidth {width: 80px;} #team ~ #contactListMenu_chosen {vertical-align: top;} diff --git a/module/kanban/css/setting.css b/module/kanban/css/setting.css new file mode 100644 index 0000000000..bb3d26cfcf --- /dev/null +++ b/module/kanban/css/setting.css @@ -0,0 +1,7 @@ +#mainContent .objectBox {padding-top: 2px;} +#mainContent .objectBox .checkbox-primary {display: inline-block;} +#mainContent .objectBox .checkbox-primary:not(:first-child) {margin-left: 10px;} +#mainContent .objectBox .checkbox-primary>label:not(:first-child) {padding-left: 20px;} +#mainContent .laneHeightBox .tip {color: #999;} +#mainContent .objectBox .checkbox-primary>label:before {top: 2px; left: 0px;} +#mainContent .objectBox .checkbox-primary>label:after {width: 14px; height: 14px;} diff --git a/module/kanban/css/view.css b/module/kanban/css/view.css index c5f5935b86..d024f92111 100644 --- a/module/kanban/css/view.css +++ b/module/kanban/css/view.css @@ -155,3 +155,4 @@ .region .kanban-board .kanban-header-parent-col > .kanban-header-col > .title {max-width: 100% !important;} .region .kanban-board .kanban-header-sub-cols .kanban-header-col > .title > span {max-width: calc(100% - 165px) !important;} .region .kanban-board .kanban-header-sub-cols .kanban-header-col.left > .title > span {max-width: calc(100% - 120px) !important;} +.executionName .delayed {margin-right: 10px;} diff --git a/module/kanban/js/edit.js b/module/kanban/js/setting.js similarity index 100% rename from module/kanban/js/edit.js rename to module/kanban/js/setting.js diff --git a/module/kanban/js/view.js b/module/kanban/js/view.js index 7e39e60137..5bec4a50a1 100644 --- a/module/kanban/js/view.js +++ b/module/kanban/js/view.js @@ -407,7 +407,7 @@ function renderKanbanItem(item, $item) $user.html(renderUsersAvatar(assignedTo, item.id)).attr('title', title); } - if(kanban.performable == 1) + if(kanban.performable == 1 && (item.fromType == '' || item.fromType == 'execution')) { var $progress = $item.children('.progress-box'); if(!$progress.length) $progress = $('
' + item.progress + '%
').appendTo($item); @@ -1189,7 +1189,7 @@ function createCardMenu(options) var items = []; if(privs.includes('editCard') && card.fromType == '') items.push({label: kanbanLang.editCard, icon: 'edit', url: createLink('kanban', 'editCard', 'cardID=' + card.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); if(privs.includes('deleteCard')) items.push({label: card.fromType == '' ? kanbanLang.deleteCard : kanbanLang.removeCard, icon: card.fromType == '' ? 'trash' : 'unlink', url: createLink('kanban', 'deleteCard', 'cardID=' + card.id), attrs: {'target': 'hiddenwin'}}); - if(kanban.performable == 1) + if(kanban.performable == 1 && card.fromType == '') { if(card.status == 'done') { diff --git a/module/kanban/lang/de.php b/module/kanban/lang/de.php index 01aefc72bc..9547a2bfeb 100644 --- a/module/kanban/lang/de.php +++ b/module/kanban/lang/de.php @@ -48,6 +48,7 @@ $lang->kanban->removeCard = 'Remove Card'; $lang->kanban->assigntoCard = 'Assign'; $lang->kanban->setting = 'Setting'; $lang->kanban->settingSpace = 'Setting Space'; +$lang->kanban->settingKanban = 'Setting Kanban'; $lang->kanban->activateSpace = 'Activate Space'; $lang->kanban->closeSpace = 'Close Space'; $lang->kanban->deleteSpace = 'Delete Space'; @@ -200,7 +201,6 @@ $lang->kanban->moreAction = 'More Action'; $lang->kanban->noGroup = 'None'; $lang->kanban->limitExceeded = 'Limit Exceeded'; $lang->kanban->fullScreen = 'Full Screen'; -$lang->kanban->setting = 'Setting'; $lang->kanban->my = 'My'; $lang->kanban->other = 'Other'; $lang->kanban->showWIP = 'Show WIP'; @@ -216,8 +216,13 @@ $lang->kanban->error->childLimitNote = 'The sum of products in the child colu $lang->kanban->error->importObjNotEmpty = 'Please select at least one import object.'; $lang->kanban->error->childLimitEmpty = 'Please set the WIP quantity of the sub column before operation.'; -$lang->kanban->orderList['pri_asc'] = 'Story Priority Ascending'; -$lang->kanban->orderList['pri_desc'] = 'Story Priority Descending'; +$lang->kanban->orderList['id_asc'] = 'Story ID Ascending'; +$lang->kanban->orderList['id_desc'] = 'Story ID Descending'; +$lang->kanban->orderList['pri_asc'] = 'Story Priority Ascending'; +$lang->kanban->orderList['pri_desc'] = 'Story Priority Descending'; +$lang->kanban->orderList['stage_asc'] = 'Story Stage Ascending'; +$lang->kanban->orderList['stage_desc'] = 'Story Stage Descending'; +$lang->kanban->orderList['assignedTo_desc'] = 'Assigned To'; $lang->kanban->importList = array(); $lang->kanban->importList['off'] = 'Import is not enabled'; diff --git a/module/kanban/lang/en.php b/module/kanban/lang/en.php index 33b350d8f6..d140547fb2 100644 --- a/module/kanban/lang/en.php +++ b/module/kanban/lang/en.php @@ -48,6 +48,7 @@ $lang->kanban->removeCard = 'Remove Card'; $lang->kanban->assigntoCard = 'Assign'; $lang->kanban->setting = 'Setting'; $lang->kanban->settingSpace = 'Setting Space'; +$lang->kanban->settingKanban = 'Setting Kanban'; $lang->kanban->activateSpace = 'Activate Space'; $lang->kanban->closeSpace = 'Close Space'; $lang->kanban->deleteSpace = 'Delete Space'; @@ -200,7 +201,6 @@ $lang->kanban->moreAction = 'More Action'; $lang->kanban->noGroup = 'None'; $lang->kanban->limitExceeded = 'Limit Exceeded'; $lang->kanban->fullScreen = 'Full Screen'; -$lang->kanban->setting = 'Setting'; $lang->kanban->my = 'My'; $lang->kanban->other = 'Other'; $lang->kanban->showWIP = 'Show WIP'; @@ -216,8 +216,13 @@ $lang->kanban->error->childLimitNote = 'The sum of products in the child colu $lang->kanban->error->importObjNotEmpty = 'Please select at least one import object.'; $lang->kanban->error->childLimitEmpty = 'Please set the WIP quantity of the sub column before operation.'; -$lang->kanban->orderList['pri_asc'] = 'Story Priority Ascending'; -$lang->kanban->orderList['pri_desc'] = 'Story Priority Descending'; +$lang->kanban->orderList['id_asc'] = 'Story ID Ascending'; +$lang->kanban->orderList['id_desc'] = 'Story ID Descending'; +$lang->kanban->orderList['pri_asc'] = 'Story Priority Ascending'; +$lang->kanban->orderList['pri_desc'] = 'Story Priority Descending'; +$lang->kanban->orderList['stage_asc'] = 'Story Stage Ascending'; +$lang->kanban->orderList['stage_desc'] = 'Story Stage Descending'; +$lang->kanban->orderList['assignedTo_desc'] = 'Assigned To'; $lang->kanban->importList = array(); $lang->kanban->importList['off'] = 'Import is not enabled'; diff --git a/module/kanban/lang/fr.php b/module/kanban/lang/fr.php index 98068f4554..c1ae460861 100644 --- a/module/kanban/lang/fr.php +++ b/module/kanban/lang/fr.php @@ -48,6 +48,7 @@ $lang->kanban->removeCard = 'Remove Card'; $lang->kanban->assigntoCard = 'Assign'; $lang->kanban->setting = 'Setting'; $lang->kanban->settingSpace = 'Setting Space'; +$lang->kanban->settingKanban = 'Setting Kanban'; $lang->kanban->activateSpace = 'Activate Space'; $lang->kanban->closeSpace = 'Close Space'; $lang->kanban->deleteSpace = 'Delete Space'; @@ -200,7 +201,6 @@ $lang->kanban->moreAction = 'More Action'; $lang->kanban->noGroup = 'None'; $lang->kanban->limitExceeded = 'Limit Exceeded'; $lang->kanban->fullScreen = 'Full Screen'; -$lang->kanban->setting = 'Setting'; $lang->kanban->my = 'My'; $lang->kanban->other = 'Other'; $lang->kanban->showWIP = 'Show WIP'; @@ -216,8 +216,13 @@ $lang->kanban->error->childLimitNote = 'The sum of products in the child colu $lang->kanban->error->importObjNotEmpty = 'Please select at least one import object.'; $lang->kanban->error->childLimitEmpty = 'Please set the WIP quantity of the sub column before operation.'; -$lang->kanban->orderList['pri_asc'] = 'Story Priorité Ascendante'; -$lang->kanban->orderList['pri_desc'] = 'Story Priorité Descendante'; +$lang->kanban->orderList['id_asc'] = 'Story ID Ascendante'; +$lang->kanban->orderList['id_desc'] = 'Story ID Descendante'; +$lang->kanban->orderList['pri_asc'] = 'Story Priorité Ascendante'; +$lang->kanban->orderList['pri_desc'] = 'Story Priorité Descendante'; +$lang->kanban->orderList['stage_asc'] = 'Story Phase Ascendante'; +$lang->kanban->orderList['stage_desc'] = 'Story Phase Descendante'; +$lang->kanban->orderList['assignedTo_desc'] = 'Assigné à'; $lang->kanban->importList = array(); $lang->kanban->importList['off'] = 'Import is not enabled'; diff --git a/module/kanban/lang/zh-cn.php b/module/kanban/lang/zh-cn.php index 199330b009..4fbf2b77a4 100644 --- a/module/kanban/lang/zh-cn.php +++ b/module/kanban/lang/zh-cn.php @@ -48,6 +48,7 @@ $lang->kanban->removeCard = '移除卡片'; $lang->kanban->assigntoCard = '指派'; $lang->kanban->setting = '设置'; $lang->kanban->settingSpace = '设置空间'; +$lang->kanban->settingKanban = '设置看板'; $lang->kanban->activateSpace = '激活空间'; $lang->kanban->closeSpace = '关闭空间'; $lang->kanban->deleteSpace = '删除空间'; @@ -200,7 +201,6 @@ $lang->kanban->moreAction = '更多操作'; $lang->kanban->noGroup = '无'; $lang->kanban->limitExceeded = '超出在制品限制'; $lang->kanban->fullScreen = '全屏'; -$lang->kanban->setting = '设置'; $lang->kanban->my = '我的看板'; $lang->kanban->other = '其他'; $lang->kanban->showWIP = '显示在制品限制'; @@ -216,8 +216,13 @@ $lang->kanban->error->childLimitNote = '子列在制品数量之和不能大 $lang->kanban->error->importObjNotEmpty = '请至少选择一个导入对象'; $lang->kanban->error->childLimitEmpty = '请先设置子列的在制品数量后再操作'; -$lang->kanban->orderList['pri_asc'] = '需求优先级正序排序'; -$lang->kanban->orderList['pri_desc'] = '需求优先级倒序排序'; +$lang->kanban->orderList['id_asc'] = '需求ID正序'; +$lang->kanban->orderList['id_desc'] = '需求ID倒序'; +$lang->kanban->orderList['pri_asc'] = '需求优先级正序'; +$lang->kanban->orderList['pri_desc'] = '需求优先级倒序'; +$lang->kanban->orderList['stage_asc'] = '需求阶段正序'; +$lang->kanban->orderList['stage_desc'] = '需求阶段倒序'; +$lang->kanban->orderList['assignedTo_desc'] = '指派给'; $lang->kanban->importList = array(); $lang->kanban->importList['off'] = '不启用导入功能'; diff --git a/module/kanban/model.php b/module/kanban/model.php index 7dff2257ac..e159803dae 100644 --- a/module/kanban/model.php +++ b/module/kanban/model.php @@ -1207,6 +1207,10 @@ class kanbanModel extends model ->andWhere('action')->eq('opened') ->fetchPairs(); } + elseif($fromType == 'execution') + { + $executionProgress = $this->loadModel('project')->computerProgress($objects); + } /* Data for constructing the card. */ foreach($objectCards as $objectID => $cardsInfo) @@ -1231,6 +1235,7 @@ class kanbanModel extends model if($delay > 0) $objectCard->delay = $delay; } $objectCard->execType = $object->type; + $objectCard->progress = isset($executionProgress[$objectID]->progress) ? $executionProgress[$objectID]->progress : 0; } $objectCard->desc = strip_tags(htmlspecialchars_decode($object->desc)); @@ -1393,7 +1398,7 @@ class kanbanModel extends model * @access public * @return array */ - public function getExecutionKanban($executionID, $browseType = 'all', $groupBy = 'default', $searchValue = '', $orderBy = 'pri_asc') + public function getExecutionKanban($executionID, $browseType = 'all', $groupBy = 'default', $searchValue = '', $orderBy = 'id_asc') { if($groupBy != 'default') return $this->getKanban4Group($executionID, $browseType, $groupBy, $searchValue, $orderBy); @@ -1521,7 +1526,7 @@ class kanbanModel extends model * @access public * @return array */ - public function getKanban4Group($executionID, $browseType, $groupBy, $searchValue = '', $orderBy = 'pri_asc') + public function getKanban4Group($executionID, $browseType, $groupBy, $searchValue = '', $orderBy = 'id_asc') { /* Get card data. */ $cardList = array(); @@ -1547,7 +1552,7 @@ class kanbanModel extends model if($browseType == 'bug') $bugCardMenu = $this->getKanbanCardMenu($executionID, $cardList, 'bug'); if($browseType == 'task') $taskCardMenu = $this->getKanbanCardMenu($executionID, $cardList, 'task'); - if($groupBy == 'story' and $browseType == 'task' and !isset($this->lang->kanban->orderList[$orderBy])) $orderBy = 'pri_asc'; + if($groupBy == 'story' and $browseType == 'task' and !isset($this->lang->kanban->orderList[$orderBy])) $orderBy = 'id_asc'; $lanes = $this->getLanes4Group($executionID, $browseType, $groupBy, $cardList, $orderBy); if(empty($lanes)) return array(); @@ -1720,7 +1725,7 @@ class kanbanModel extends model * * @return array */ - public function getLanes4Group($executionID, $browseType, $groupBy, $cardList, $orderBy = 'pri_asc') + public function getLanes4Group($executionID, $browseType, $groupBy, $cardList, $orderBy = 'id_asc') { $lanes = array(); $groupByList = array(); @@ -1938,6 +1943,7 @@ class kanbanModel extends model ->join('whitelist', ',') ->join('team', ',') ->trim('name') + ->stripTags($this->config->kanban->editor->createspace['id'], $this->config->allowedTags) ->remove('uid,contactListMenu') ->get(); @@ -1981,6 +1987,7 @@ class kanbanModel extends model ->join('whitelist', ',') ->join('team', ',') ->trim('name') + ->stripTags($this->config->kanban->editor->editspace['id'], $this->config->allowedTags) ->remove('uid,contactListMenu') ->get(); @@ -2193,7 +2200,8 @@ class kanbanModel extends model ->join('whitelist', ',') ->join('team', ',') ->trim('name') - ->remove('contactListMenu,type,import,importObjectList,copyKanbanID,copyRegion') + ->stripTags($this->config->kanban->editor->create['id'], $this->config->allowedTags) + ->remove('contactListMenu,type,import,importObjectList,uid,copyKanbanID,copyRegion') ->get(); if($this->post->import == 'on') $kanban->object = implode(',', $this->post->importObjectList); @@ -2238,7 +2246,7 @@ class kanbanModel extends model if(isset($_POST['team']) or isset($_POST['whitelist'])) { $type = isset($_POST['team']) ? 'team' : 'whitelist'; - $kanbanMembers = empty($kanban->{$type}) ? array() : explode(',', $kanban->{$type}); + $kanbanMembers = empty($kanban->{$type}) ? array() : explode(',', $kanban->{$type}); $this->addSpaceMembers($kanban->space, $type, $kanbanMembers); } @@ -2261,15 +2269,56 @@ class kanbanModel extends model $kanban = fixer::input('post') ->setDefault('lastEditedBy', $account) ->setDefault('lastEditedDate', helper::now()) - ->setDefault('displayCards', 0) ->setDefault('whitelist', '') ->setDefault('team', '') - ->setIF($this->post->import == 'off', 'object', '') - ->setIF($this->post->heightType == 'auto', 'displayCards', 0) ->join('whitelist', ',') ->join('team', ',') ->trim('name') - ->remove('uid,contactListMenu,import,importObjectList,heightType') + ->stripTags($this->config->kanban->editor->edit['id'], $this->config->allowedTags) + ->remove('uid,contactListMenu') + ->get(); + + $this->dao->update(TABLE_KANBAN)->data($kanban) + ->autoCheck() + ->batchCheck($this->config->kanban->edit->requiredFields, 'notempty') + ->where('id')->eq($kanbanID) + ->exec(); + + if(!dao::isError()) + { + $this->loadModel('file')->saveUpload('kanban', $kanbanID); + $this->file->updateObjectID($this->post->uid, $kanbanID, 'kanban'); + + if(isset($_POST['team']) or isset($_POST['whitelist'])) + { + $type = isset($_POST['team']) ? 'team' : 'whitelist'; + $kanbanMembers = empty($kanban->{$type}) ? array() : explode(',', $kanban->{$type}); + $this->addSpaceMembers($kanban->space, $type, $kanbanMembers); + } + + return common::createChanges($oldKanban, $kanban); + } + } + + /** + * Setting kanban. + * + * @param int $kanbanID + * @access public + * @return void + */ + public function setting($kanbanID) + { + $kanbanID = (int)$kanbanID; + $account = $this->app->user->account; + $oldKanban = $this->getByID($kanbanID); + $kanban = fixer::input('post') + ->setDefault('lastEditedBy', $account) + ->setDefault('lastEditedDate', helper::now()) + ->setDefault('displayCards', 0) + ->setIF($this->post->import == 'off', 'object', '') + ->setIF($this->post->heightType == 'auto', 'displayCards', 0) + ->remove('import,importObjectList,heightType') ->get(); if($this->post->import == 'on') $kanban->object = implode(',', $this->post->importObjectList); @@ -2287,18 +2336,10 @@ class kanbanModel extends model if(!dao::isError()) { - $this->loadModel('file')->saveUpload('kanban', $kanbanID); - $this->file->updateObjectID($this->post->uid, $kanbanID, 'kanban'); - - if(isset($_POST['team']) or isset($_POST['whitelist'])) - { - $type = isset($_POST['team']) ? 'team' : 'whitelist'; - $kanbanMembers = empty($kanban->{$type}) ? array() : explode(',', $kanban->{$type}); - $this->addSpaceMembers($kanban->space, $type, $kanbanMembers); - } - return common::createChanges($oldKanban, $kanban); } + + return false; } /** @@ -2595,7 +2636,7 @@ class kanbanModel extends model { $addMembers = implode(',', $addMembers); $members .= ',' . trim($addMembers, ','); - $this->dao->update(TABLE_KANBANSPACE)->set($type)->eq($members)->where('id')->eq($spaceID)->exec(); + $this->dao->update(TABLE_KANBANSPACE)->set($type)->eq($members)->where('id')->eq($spaceID)->exec(); } } @@ -3219,7 +3260,8 @@ class kanbanModel extends model $actions .= $commonActions; $kanbanActions = ''; - if(common::hasPriv('kanban', 'edit')) $kanbanActions .= '
  • ' . html::a(helper::createLink('kanban', 'edit', "kanbanID=$kanban->id", '', true), '' . $this->lang->kanban->edit, '', "class='iframe btn btn-link' data-width='75%'") . '
  • '; + if(common::hasPriv('kanban', 'edit')) $kanbanActions .= '
  • ' . html::a(helper::createLink('kanban', 'edit', "kanbanID=$kanban->id", '', true), '' . $this->lang->kanban->edit, '', "class='iframe btn btn-link' data-width='75%'") . '
  • '; + if(common::hasPriv('kanban', 'setting')) $kanbanActions .= '
  • ' . html::a(helper::createLink('kanban', 'setting', "kanbanID=$kanban->id", '', true), '' . $this->lang->kanban->settingKanban, '', "class='iframe btn btn-link' data-width='60%'") . '
  • '; if(common::hasPriv('kanban', 'close') and $kanban->status == 'active') $kanbanActions .= '
  • ' . html::a(helper::createLink('kanban', 'close', "kanbanID=$kanban->id", '', true), '' . $this->lang->kanban->close, '', "class='iframe btn btn-link'") . '
  • '; if(common::hasPriv('kanban', 'activate') and $kanban->status == 'closed') $kanbanActions .= '
  • ' . html::a(helper::createLink('kanban', 'activate', "kanbanID=$kanban->id", '', true), '' . $this->lang->kanban->activate, '', "class='iframe btn btn-link'") . '
  • '; if(common::hasPriv('kanban', 'delete')) $kanbanActions .= '
  • ' . html::a(helper::createLink('kanban', 'delete', "kanbanID=$kanban->id"), '' . $this->lang->kanban->delete, 'hiddenwin', "class='btn btn-link'") . '
  • '; diff --git a/module/kanban/view/create.html.php b/module/kanban/view/create.html.php index e6f7c996b3..0c9c7f716a 100644 --- a/module/kanban/view/create.html.php +++ b/module/kanban/view/create.html.php @@ -66,7 +66,7 @@ kanban->columnWidth;?> - kanbancolumn->fluidBoardList, isset($copyKanban->fluidBoard) ? $copyKanban->fluidBoard : 0));?> + kanbancolumn->fluidBoardList, isset($copyKanban->fluidBoard) ? $copyKanban->fluidBoard : 0));?> kanban->import?> diff --git a/module/kanban/view/edit.html.php b/module/kanban/view/edit.html.php index 2eb21ae1ca..823ec82911 100644 --- a/module/kanban/view/edit.html.php +++ b/module/kanban/view/edit.html.php @@ -12,7 +12,6 @@ ?> - config->vision);?>
    @@ -24,11 +23,6 @@ kanban->space;?> space, "class='form-control chosen' onchange='loadOwners(this.value)'");?> - - kanban->WIPCount;?> - kanban->showWIPList, $kanban->showWIP);?> - - kanban->name;?> name, "class='form-control'");?> @@ -53,40 +47,6 @@ - - kanban->columnWidth;?> - kanbancolumn->fluidBoardList, $kanban->fluidBoard));?> - - 1):?> - - kanban->laneHeight;?> - kanbanlane->heightTypeList, $heightType, "onclick='setCardCount(this.value);'"));?> - - - kanban->cardCount;?> - kanban->cardCountTip}' autocomplete='off'");?> - - - - kanban->import?> - kanban->importList, $enableImport));?> - - - kanban->importObjectList, $importObjects);?> - - kanban->error->importObjNotEmpty;?> - - kanban->archive;?> - kanban->archiveList, $kanban->archived));?> - - - kanban->manageProgress;?> - kanban->enableList, $kanban->performable));?> - - - kanban->alignment;?> - kanban->alignmentList, $kanban->alignment));?> - kanban->desc;?> diff --git a/module/kanban/view/setting.html.php b/module/kanban/view/setting.html.php new file mode 100644 index 0000000000..3cf0404f90 --- /dev/null +++ b/module/kanban/view/setting.html.php @@ -0,0 +1,70 @@ + + * @package kanban + * @version $Id: edit.html.php 935 2021-12-09 16:15:24Z $ + * @link https://www.zentao.net + */ +?> + + + +config->vision);?> +
    +
    +

    kanban->settingKanban;?>

    +
    +
    + + + + + + + + + + + 1):?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    kanban->WIPCount;?>kanban->showWIPList, $kanban->showWIP);?>
    kanban->columnWidth;?>kanbancolumn->fluidBoardList, $kanban->fluidBoard));?>
    kanban->laneHeight;?>kanbanlane->heightTypeList, $heightType, "onclick='setCardCount(this.value);'"));?>
    kanban->import?>kanban->importList, $enableImport));?>
    kanban->importObjectList, $importObjects);?>
    kanban->archive;?>kanban->archiveList, $kanban->archived));?>
    kanban->manageProgress;?>kanban->enableList, $kanban->performable));?>
    kanban->alignment;?>kanban->alignmentList, $kanban->alignment));?>
    + +
    +
    +
    + diff --git a/module/kanban/view/space.html.php b/module/kanban/view/space.html.php index 5ff85b27bf..f9a27b5392 100644 --- a/module/kanban/view/space.html.php +++ b/module/kanban/view/space.html.php @@ -47,8 +47,8 @@ name;?>

    - desc = empty($space->desc) ? $lang->kanban->emptyDesc : strip_tags(htmlspecialchars_decode($space->desc));?> -

    desc;?>

    + desc) ? $lang->kanban->emptyDesc : str_replace("\n", '', strip_tags($space->desc));?> +

    status == 'closed' ? 'disabled' : '';?> @@ -126,7 +126,8 @@
    -
    desc));?>
    + desc));?> +