Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into sprint/181_tianshujie_kanban

This commit is contained in:
tianshujie
2021-12-29 08:43:34 +08:00
30 changed files with 589 additions and 72 deletions
+507
View File
@@ -0,0 +1,507 @@
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
CREATE TABLE IF NOT EXISTS `zt_action` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`company` mediumint(8) unsigned NOT NULL default '0',
`objectType` varchar(30) NOT NULL default '',
`objectID` mediumint(8) unsigned NOT NULL default '0',
`actor` varchar(30) NOT NULL default '',
`action` varchar(30) NOT NULL default '',
`date` int(10) unsigned NOT NULL default '0',
`comment` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_bug` (
`id` mediumint(8) NOT NULL auto_increment,
`product` mediumint(8) unsigned NOT NULL default '0',
`module` mediumint(8) unsigned NOT NULL default '0',
`project` mediumint(8) unsigned NOT NULL default '0',
`story` mediumint(8) unsigned NOT NULL default '0',
`task` mediumint(8) unsigned NOT NULL default '0',
`title` varchar(150) NOT NULL default '',
`severity` tinyint(4) NOT NULL default '0',
`type` varchar(30) NOT NULL default '',
`os` varchar(30) NOT NULL default '',
`browser` varchar(30) NOT NULL default '',
`hardware` varchar(30) NOT NULL,
`found` varchar(30) NOT NULL default '',
`steps` text NOT NULL,
`status` enum('active','resolved','closed') NOT NULL default 'active',
`mailto` varchar(255) NOT NULL default '',
`openedBy` varchar(30) NOT NULL default '',
`openedDate` datetime NOT NULL,
`openedBuild` varchar(30) NOT NULL default '',
`assignedTo` varchar(30) NOT NULL default '',
`assignedDate` datetime NOT NULL,
`resolvedBy` varchar(30) NOT NULL default '',
`resolution` varchar(30) NOT NULL default '',
`resolvedBuild` varchar(30) NOT NULL default '',
`resolvedDate` datetime NOT NULL,
`closedBy` varchar(30) NOT NULL default '',
`closedDate` datetime NOT NULL,
`lastEditedBy` varchar(30) NOT NULL default '',
`lastEditedDate` datetime NOT NULL,
`field1` varchar(255) NOT NULL default '',
`field2` varchar(255) NOT NULL default '',
`feild3` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_build` (
`id` mediumint(8) unsigned NOT NULL default '0',
`product` mediumint(8) unsigned NOT NULL default '0',
`sprintprj` mediumint(8) unsigned NOT NULL default '0',
`name` char(30) NOT NULL default '',
`scmPath` char(255) NOT NULL default '',
`buildDate` int(10) unsigned NOT NULL default '0',
`builder` char(30) NOT NULL default '',
`tasks` char(255) NOT NULL default '',
`desc` char(255) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_burn` (
`project` mediumint(8) unsigned NOT NULL,
`date` date NOT NULL,
`left` float NOT NULL,
`consumed` float NOT NULL,
PRIMARY KEY (`project`,`date`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `zt_case` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`product` mediumint(8) unsigned NOT NULL default '0',
`module` mediumint(8) unsigned NOT NULL default '0',
`path` mediumint(8) unsigned NOT NULL default '0',
`story` mediumint(30) unsigned NOT NULL default '0',
`title` char(30) NOT NULL default '',
`pri` tinyint(3) unsigned NOT NULL default '0',
`type` char(30) NOT NULL default '1',
`status` char(30) NOT NULL default '1',
`steps` text NOT NULL,
`frequency` enum('1','2','3') NOT NULL default '1',
`order` tinyint(30) unsigned NOT NULL default '0',
`openedBy` char(30) NOT NULL default '',
`openedDate` datetime NOT NULL,
`lastEditedBy` char(30) NOT NULL default '',
`lastEditedDate` datetime NOT NULL,
`field1` char(30) NOT NULL default '',
`field2` char(30) NOT NULL default '',
`feidl3` char(30) NOT NULL default '',
`version` tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_caseResult` (
`id` mediumint(8) unsigned NOT NULL default '0',
`plan` mediumint(30) unsigned NOT NULL default '0',
`build` mediumint(30) unsigned NOT NULL default '0',
`case` mediumint(30) unsigned NOT NULL default '0',
`result` enum('pass','fail','skip') NOT NULL default 'pass',
`status` enum('finished','blocked') NOT NULL default 'finished',
`executedBy` char(30) NOT NULL default '',
`executedDate` int(30) unsigned NOT NULL default '0',
`os` char(30) NOT NULL default '',
`browser` char(30) NOT NULL default '',
`hardware` char(30) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_caseStep` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`case` mediumint(8) unsigned NOT NULL default '0',
`caseVersion` tinyint(3) unsigned NOT NULL default '0',
`step` char(255) NOT NULL default '',
`expect` char(255) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_company` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`name` char(120) NOT NULL default '',
`phone` char(20) NOT NULL,
`fax` char(20) NOT NULL default '',
`address` char(120) NOT NULL default '',
`zipcode` char(10) NOT NULL default '',
`website` char(120) NOT NULL default '',
`backyard` char(120) NOT NULL default '',
`pms` char(120) NOT NULL default '',
`guest` enum('1','0') NOT NULL default '0',
`admins` char(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_config` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`company` mediumint(8) unsigned NOT NULL default '0',
`owner` char(30) NOT NULL default '',
`section` char(30) NOT NULL default '',
`key` char(30) NOT NULL default '',
`value` char(255) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_division` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`company` mediumint(8) unsigned NOT NULL default '0',
`name` char(30) NOT NULL default '',
`parent` mediumint(8) unsigned NOT NULL default '0',
`path` char(255) NOT NULL default '',
`grade` tinyint(3) unsigned NOT NULL default '0',
`order` tinyint(3) unsigned NOT NULL default '0',
`position` char(30) NOT NULL default '',
`function` char(255) NOT NULL default '',
`manager` char(30) NOT NULL default '',
PRIMARY KEY (`id`),
KEY `company` (`company`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_effort` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`user` char(30) NOT NULL default '',
`todo` enum('1','0') NOT NULL default '1',
`date` date NOT NULL default '0000-00-00',
`begin` datetime NOT NULL default '0000-00-00 00:00:00',
`end` datetime NOT NULL default '0000-00-00 00:00:00',
`type` enum('1','2','3') NOT NULL default '1',
`idvalue` mediumint(8) unsigned NOT NULL default '0',
`name` char(30) NOT NULL default '',
`desc` char(255) NOT NULL default '',
`status` enum('1','2','3') NOT NULL default '1',
PRIMARY KEY (`id`),
KEY `user` (`user`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_file` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`company` mediumint(8) unsigned NOT NULL default '0',
`file` char(50) NOT NULL,
`type` char(30) NOT NULL,
`size` mediumint(8) unsigned NOT NULL default '0',
`addedBy` char(30) NOT NULL default '',
`addedDate` datetime NOT NULL,
`downloads` mediumint(8) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_group` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`company` mediumint(8) unsigned NOT NULL,
`name` char(30) NOT NULL,
`desc` char(255) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
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;
CREATE TABLE IF NOT EXISTS `zt_history` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`action` mediumint(8) unsigned NOT NULL default '0',
`field` varchar(30) NOT NULL default '',
`old` text NOT NULL,
`new` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_module` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`product` mediumint(8) unsigned NOT NULL default '0',
`name` char(30) NOT NULL default '',
`parent` mediumint(8) unsigned NOT NULL default '0',
`path` char(255) NOT NULL default '',
`grade` tinyint(3) unsigned NOT NULL default '0',
`order` tinyint(3) unsigned NOT NULL default '0',
`view` char(30) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_planCase` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`plan` mediumint(8) unsigned NOT NULL default '0',
`case` mediumint(8) unsigned NOT NULL default '0',
`caseVersion` tinyint(3) unsigned NOT NULL default '0',
`assignedTo` char(30) NOT NULL default '',
`assignedDate` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_product` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`company` mediumint(8) unsigned NOT NULL default '0',
`name` varchar(30) NOT NULL default '',
`code` varchar(10) NOT NULL default '',
`order` tinyint(3) unsigned NOT NULL default '0',
`status` varchar(30) NOT NULL default '',
`desc` text NOT NULL,
PRIMARY KEY (`id`),
KEY `company` (`company`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_project` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`company` mediumint(8) unsigned NOT NULL default '0',
`isCat` enum('1','0') NOT NULL default '0',
`catID` mediumint(8) unsigned NOT NULL,
`type` enum('sprint','project') NOT NULL default 'sprint',
`parent` mediumint(8) unsigned NOT NULL default '0',
`name` varchar(30) NOT NULL default '',
`code` varchar(20) NOT NULL,
`begin` date NOT NULL,
`end` date NOT NULL,
`status` varchar(10) NOT NULL,
`statge` enum('1','2','3','4','5') NOT NULL default '1',
`pri` enum('1','2','3','4') NOT NULL default '1',
`desc` text NOT NULL,
`goal` text NOT NULL,
`openedBy` varchar(30) NOT NULL default '',
`openedDate` int(10) unsigned NOT NULL default '0',
`closedBy` varchar(30) NOT NULL default '',
`closedDate` int(10) unsigned NOT NULL default '0',
`canceledBy` varchar(30) NOT NULL default '',
`canceledDate` int(10) unsigned NOT NULL default '0',
`PO` varchar(30) NOT NULL default '',
`PM` varchar(30) NOT NULL default '',
`QM` varchar(30) NOT NULL default '',
`team` varchar(30) NOT NULL,
PRIMARY KEY (`id`),
KEY `company` (`company`,`type`,`parent`,`begin`,`end`,`status`,`statge`,`pri`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_projectProduct` (
`project` mediumint(8) unsigned NOT NULL,
`product` mediumint(8) unsigned NOT NULL,
PRIMARY KEY (`project`,`product`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `zt_projectStory` (
`project` mediumint(8) unsigned NOT NULL default '0',
`product` mediumint(8) unsigned NOT NULL,
`story` mediumint(8) unsigned NOT NULL default '0',
UNIQUE KEY `project` (`project`,`story`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_release` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`product` mediumint(8) unsigned NOT NULL default '0',
`name` varchar(30) NOT NULL default '',
`desc` text NOT NULL,
`status` varchar(30) NOT NULL default '',
`planDate` date NOT NULL default '0000-00-00',
`releaseDate` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`id`),
KEY `product` (`product`,`status`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_releation` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`type` char(30) NOT NULL default '',
`id1` mediumint(8) unsigned NOT NULL default '0',
`id2` mediumint(8) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_resultStep` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`result` mediumint(8) unsigned NOT NULL default '0',
`step` mediumint(8) unsigned NOT NULL default '0',
`stepResult` enum('pass','fail','block','n/a') NOT NULL default 'pass',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_story` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`product` mediumint(8) unsigned NOT NULL default '0',
`module` mediumint(8) unsigned NOT NULL default '0',
`replease` mediumint(8) unsigned NOT NULL default '0',
`bug` mediumint(8) unsigned NOT NULL default '0',
`title` varchar(90) NOT NULL default '',
`spec` text NOT NULL,
`type` varchar(30) NOT NULL default '',
`pri` tinyint(3) unsigned NOT NULL default '3',
`estimate` float unsigned NOT NULL,
`status` varchar(30) NOT NULL default '',
`mailto` varchar(255) NOT NULL default '',
`openedBy` varchar(30) NOT NULL default '',
`openedDate` datetime NOT NULL,
`assignedTo` varchar(30) NOT NULL default '',
`assignedDate` datetime NOT NULL,
`lastEditedBy` varchar(30) NOT NULL default '',
`lastEditedDate` datetime NOT NULL,
`closedBy` varchar(30) NOT NULL default '',
`closedDate` datetime NOT NULL,
`version` float(4,1) NOT NULL default '0.0',
`attatchment` varchar(30) NOT NULL default '',
PRIMARY KEY (`id`),
KEY `product` (`product`,`module`,`replease`,`type`,`pri`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_task` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`project` mediumint(8) unsigned NOT NULL default '0',
`story` mediumint(8) unsigned NOT NULL default '0',
`name` varchar(90) NOT NULL,
`pri` tinyint(3) unsigned NOT NULL default '0',
`owner` char(30) NOT NULL default '',
`estimate` float unsigned NOT NULL,
`consumed` float unsigned NOT NULL,
`status` enum('wait','doing','done','cancel') NOT NULL default 'wait',
`desc` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_taskEstimate` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`task` mediumint(8) unsigned NOT NULL default '0',
`date` int(10) unsigned NOT NULL default '0',
`estimate` tinyint(3) unsigned NOT NULL default '0',
`estimater` char(30) NOT NULL default '',
PRIMARY KEY (`id`),
KEY `task` (`task`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_team` (
`project` mediumint(8) unsigned NOT NULL default '0',
`account` char(30) NOT NULL default '',
`role` char(30) NOT NULL default '',
`joinDate` date NOT NULL default '0000-00-00',
`workingHour` tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (`project`,`account`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_testPlan` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`name` char(30) NOT NULL default '',
`sprintprj` mediumint(8) unsigned NOT NULL default '0',
`planBegin` int(10) unsigned NOT NULL default '0',
`planEnd` int(10) unsigned NOT NULL default '0',
`realBegin` int(10) unsigned NOT NULL default '0',
`realEnd` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_todo` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`account` char(30) NOT NULL,
`date` date NOT NULL default '0000-00-00',
`begin` smallint(4) unsigned zerofill NOT NULL,
`end` smallint(4) unsigned zerofill NOT NULL,
`type` char(10) NOT NULL,
`idvalue` mediumint(8) unsigned NOT NULL default '0',
`pri` tinyint(3) unsigned NOT NULL,
`name` char(150) NOT NULL,
`desc` text NOT NULL,
`status` enum('wait','doing','done') NOT NULL default 'wait',
PRIMARY KEY (`id`),
KEY `user` (`account`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_user` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`company` mediumint(8) unsigned NOT NULL default '0',
`division` mediumint(8) unsigned NOT NULL default '0',
`account` char(30) NOT NULL default '',
`password` char(32) NOT NULL default '',
`realname` char(30) NOT NULL default '',
`nickname` char(60) NOT NULL default '',
`avatar` char(30) NOT NULL default '',
`birthyear` smallint(5) unsigned NOT NULL default '0',
`birthday` date NOT NULL default '0000-00-00',
`gendar` enum('f','m') NOT NULL default 'f',
`email` char(90) NOT NULL default '',
`msn` char(90) NOT NULL default '',
`qq` char(20) NOT NULL default '',
`yahoo` char(90) NOT NULL default '',
`gtalk` char(90) NOT NULL default '',
`wangwang` char(90) NOT NULL default '',
`mobile` char(11) NOT NULL default '',
`phone` char(20) NOT NULL default '',
`address` char(120) NOT NULL default '',
`zipcode` char(10) NOT NULL default '',
`join` date NOT NULL default '0000-00-00',
`visits` mediumint(8) unsigned NOT NULL default '0',
`ip` char(15) NOT NULL,
`last` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `company` (`company`,`division`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_userGroup` (
`account` char(30) NOT NULL default '',
`group` mediumint(8) unsigned NOT NULL default '0',
UNIQUE KEY `account` (`account`,`group`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+31 -31
View File
@@ -1,21 +1,21 @@
-- story优先级的默认值。
ALTER TABLE `zt_story` CHANGE `pri` `pri` TINYINT( 3 ) UNSIGNED NOT NULL DEFAULT '3'
ALTER TABLE `zt_story` CHANGE `pri` `pri` TINYINT( 3 ) UNSIGNED NOT NULL DEFAULT '3';
-- 修改project code字段的长度。
ALTER TABLE `zt_project` CHANGE `code` `code` VARCHAR( 20 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL
ALTER TABLE `zt_project` CHANGE `code` `code` VARCHAR( 20 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
-- task 暂时增加left字段:
ALTER TABLE `zt_task` ADD `left` tinyINT(3) NOT NULL AFTER `consumed`
ALTER TABLE `zt_task` ADD `left` tinyINT(3) NOT NULL AFTER `consumed`;
-- 修改日期字段
ALTER TABLE `zt_bug` CHANGE `openedDate` `openedDate` DATETIME NOT NULL ,
CHANGE `assignedDate` `assignedDate` DATETIME NOT NULL ,
CHANGE `resolvedDate` `resolvedDate` DATETIME NOT NULL ,
CHANGE `closedDate` `closedDate` DATETIME NOT NULL ,
CHANGE `lastEditedDate` `lastEditedDate` DATETIME NOT NULL
CHANGE `lastEditedDate` `lastEditedDate` DATETIME NOT NULL;
RENAME TABLE `zentao`.`zt_division` TO `zentao`.`zt_dept` ;
ALTER TABLE `zt_user` CHANGE `division` `dept` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0'
RENAME TABLE `zt_division` TO `zt_dept` ;
ALTER TABLE `zt_user` CHANGE `division` `dept` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0';
-- 0.2版本:
@@ -24,7 +24,7 @@ ALTER TABLE `zt_user` CHANGE `division` `dept` MEDIUMINT( 8 ) UNSIGNED NOT NULL
-- 修改task表的时间的类型,可以是浮点数。
ALTER TABLE `zt_task` CHANGE `estimate` `estimate` FLOAT UNSIGNED NOT NULL ,
CHANGE `consumed` `consumed` FLOAT UNSIGNED NOT NULL ,
CHANGE `left` `left` FLOAT UNSIGNED NOT NULL
CHANGE `left` `left` FLOAT UNSIGNED NOT NULL;
-- todo表
@@ -49,28 +49,28 @@ update zt_product set company = 1;
update zt_project set company = 1;
-- 更新story字段里面的estimate字段:
ALTER TABLE `zt_story` CHANGE `estimate` `estimate` FLOAT UNSIGNED NOT NULL
ALTER TABLE `zt_story` CHANGE `estimate` `estimate` FLOAT UNSIGNED NOT NULL;
-- 还是使用datetime字段。
ALTER TABLE `zt_story` CHANGE `openedDate` `openedDate` DATETIME NOT NULL ,
CHANGE `assignedDate` `assignedDate` DATETIME NOT NULL ,
CHANGE `lastEditedDate` `lastEditedDate` DATETIME NOT NULL ,
CHANGE `closedDate` `closedDate` DATETIME NOT NULL
CHANGE `closedDate` `closedDate` DATETIME NOT NULL;
-- 增加diff字段。
ALTER TABLE `zt_history` ADD `diff` TEXT NOT NULL
-- 增加diff字段。
ALTER TABLE `zt_history` ADD `diff` TEXT NOT NULL;
-- 10.27
ALTER TABLE `zt_todo` CHANGE `desc` `desc` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL
ALTER TABLE `zt_task` CHANGE `name` `name` VARCHAR( 90 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL
ALTER TABLE `zt_todo` CHANGE `desc` `desc` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `zt_task` CHANGE `name` `name` VARCHAR( 90 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `zt_task` CHANGE `estimate` `estimate` FLOAT UNSIGNED NOT NULL ,
CHANGE `consumed` `consumed` FLOAT UNSIGNED NOT NULL ,
CHANGE `left` `left` FLOAT UNSIGNED NOT NULL
CHANGE `left` `left` FLOAT UNSIGNED NOT NULL;
-- 11.2 todo表增加private字段:
ALTER TABLE `zt_todo` ADD `private` BOOL NOT NULL
ALTER TABLE `zt_todo` ADD `private` BOOL NOT NULL;
-- 11.4 增加消耗表。
CREATE TABLE IF NOT EXISTS `zt_burn` (
@@ -82,7 +82,7 @@ CREATE TABLE IF NOT EXISTS `zt_burn` (
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- 11.5 project status字段更改。
ALTER TABLE `zt_project` CHANGE `status` `status` VARCHAR( 10 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL
ALTER TABLE `zt_project` CHANGE `status` `status` VARCHAR( 10 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
-- 11.10.
@@ -90,18 +90,18 @@ ALTER TABLE `zt_bug` CHANGE `openedDate` `openedDate` DATETIME NOT NULL ,
CHANGE `assignedDate` `assignedDate` DATETIME NOT NULL ,
CHANGE `resolvedDate` `resolvedDate` DATETIME NOT NULL ,
CHANGE `closedDate` `closedDate` DATETIME NOT NULL ,
CHANGE `lastEditedDate` `lastEditedDate` DATETIME NOT NULL
CHANGE `lastEditedDate` `lastEditedDate` DATETIME NOT NULL;
-- 11.12
-- 11.12
ALTER TABLE `zt_bug` ADD `duplicateBug` MEDIUMINT UNSIGNED NOT NULL AFTER `closedDate` ,
ADD `linkBug` VARCHAR( 255 ) NOT NULL AFTER `duplicateBug` ,
ADD `case` MEDIUMINT UNSIGNED NOT NULL AFTER `linkBug` ,
ADD `result` MEDIUMINT UNSIGNED NOT NULL AFTER `case`
ADD `result` MEDIUMINT UNSIGNED NOT NULL AFTER `case`;
-- 11.13
ALTER TABLE `zt_case` CHANGE `openedDate` `openedDate` DATETIME NOT NULL ,
CHANGE `lastEditedDate` `lastEditedDate` DATETIME NOT NULL
CHANGE `lastEditedDate` `lastEditedDate` DATETIME NOT NULL;
-- 11.16
ALTER TABLE `zt_file` CHANGE `addedDate` `addedDate` DATETIME NOT NULL;
@@ -112,41 +112,41 @@ ADD `objectID` MEDIUMINT NOT NULL AFTER `objectType` ;
ALTER TABLE `zt_file` CHANGE `file` `pathname` CHAR( 50 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `zt_file` CHANGE `type` `extension` CHAR( 30 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `zt_task` CHANGE `status` `status` ENUM( 'wait', 'doing', 'done', 'cancel' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'wait'
ALTER TABLE `zt_task` CHANGE `status` `status` ENUM( 'wait', 'doing', 'done', 'cancel' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'wait';
ALTER TABLE `zt_todo` CHANGE `name` `name` CHAR( 150 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL
ALTER TABLE `zt_todo` CHANGE `name` `name` CHAR( 150 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
-- 12.10 新增productPlan表。
CREATE TABLE `zentao`.`zt_productPlan` (
CREATE TABLE `zt_productPlan` (
`id` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`product` MEDIUMINT UNSIGNED NOT NULL ,
`title` VARCHAR( 90 ) NOT NULL ,
`desc` VARCHAR( 255 ) NOT NULL ,
`begin` DATE NOT NULL ,
`end` DATE NOT NULL
`end` DATE NOT NULL
) ENGINE = MYISAM ;
-- 将zt_story中的release改为plan。
ALTER TABLE `zt_story` CHANGE `replease` `plan` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0'
-- 将zt_story中的release改为plan。
ALTER TABLE `zt_story` CHANGE `replease` `plan` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0';
-- 12.11 修改case表。
ALTER TABLE `zt_case` CHANGE `type` `type` CHAR( 30 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '1',
CHANGE `status` `status` CHAR( 30 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '1',
CHANGE `openedDate` `openedDate` DATETIME NOT NULL ,
CHANGE `lastEditedDate` `lastEditedDate` DATETIME NOT NULL
CHANGE `lastEditedDate` `lastEditedDate` DATETIME NOT NULL;
ALTER TABLE `zt_case` CHANGE `title` `title` CHAR( 90 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL
ALTER TABLE `zt_case` CHANGE `title` `title` CHAR( 90 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
-- 12.28 zt_task字段增加自定义排序字段。
ALTER TABLE `zt_task` ADD `statusCustom` TINYINT UNSIGNED NOT NULL AFTER `status` ,
ADD INDEX ( statusCustom );
update zt_task set statusCustom = locate(status, 'wait,doing,done,cancel')
update zt_task set statusCustom = locate(status, 'wait,doing,done,cancel');
-- 增加类型字段。--
ALTER TABLE `zt_task` ADD `type` VARCHAR( 20 ) NOT NULL AFTER `name` ,
ADD INDEX ( TYPE )
ADD INDEX ( TYPE );
-- todo 增加状态--
ALTER TABLE `zt_todo` CHANGE `status` `status` CHAR( 20 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'wait'
ALTER TABLE `zt_todo` CHANGE `status` `status` CHAR( 20 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'wait';
+2 -2
View File
@@ -26,10 +26,10 @@ CREATE TABLE IF NOT EXISTS `zt_release` (
UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- 20100115: fix bug 14
-- 20100115: fix bug 14
ALTER TABLE `zt_productPlan` CHANGE `title` `title` VARCHAR( 90 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
CHANGE `desc` `desc` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
-- 20100125 user表增加status字段。
ALTER TABLE `zt_user` ADD `status` VARCHAR( 30 ) NOT NULL DEFAULT 'active',
ADD INDEX ( STATUS )
ADD INDEX ( STATUS );
+3 -3
View File
@@ -104,10 +104,10 @@ DROP TABLE `zt_releation`;
ALTER TABLE `zt_action` ADD `extra` VARCHAR( 255 ) NOT NULL;
UPDATE zt_action SET extra = substr( ACTION , 13 ) , ACTION = 'Resolved' WHERE ACTION LIKE 'Resolved%';
--20100210 adjust the reviewedDate
ALTER TABLE `zt_story` CHANGE `reviewedDate` `reviewedDate` DATE NOT NULL;
-- 20100210 adjust the reviewedDate
ALTER TABLE `zt_story` CHANGE `reviewedDate` `reviewedDate` DATE NOT NULL;
--20100220 action: convert the date from timestamp to datetime
-- 20100220 action: convert the date from timestamp to datetime
ALTER TABLE `zt_action` ADD `datetmp` VARCHAR( 255 ) NOT NULL AFTER `date`;
UPDATE zt_action SET datetmp = FROM_UNIXTIME( date ) ;
ALTER TABLE `zt_action` DROP `date`;
+1 -1
View File
@@ -1,7 +1,7 @@
-- 2010-07-01 task table.
ALTER TABLE `zt_task` ADD `mailto` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' AFTER `statusCustom`;
--2010-07-05 userquery table.
-- 2010-07-05 userquery table.
CREATE TABLE IF NOT EXISTS `zt_userQuery` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`company` mediumint(8) unsigned NOT NULL default '0',
-1
View File
@@ -1 +0,0 @@
ALTER TABLE zt_productplan ADD `status` enum('wait','doing','done','closed') NOT NULL default 'wait' AFTER `title`;
-1
View File
@@ -950,7 +950,6 @@ CREATE TABLE IF NOT EXISTS `zt_productplan` (
`branch` mediumint(8) unsigned NOT NULL,
`parent` mediumint(9) NOT NULL DEFAULT '0',
`title` varchar(90) NOT NULL,
`status` enum('wait','doing','done','closed') NOT NULL default 'wait',
`desc` text NOT NULL,
`begin` date NOT NULL,
`end` date NOT NULL,
+5
View File
@@ -82,11 +82,16 @@ class api extends router
$this->httpMethod = strtolower($_SERVER['REQUEST_METHOD']);
/*
$documentRoot = zget($_SERVER, 'CONTEXT_DOCUMENT_ROOT', $_SERVER['DOCUMENT_ROOT']);
$fileName = ltrim(substr($_SERVER['SCRIPT_FILENAME'], strlen($documentRoot)), '/');
$webRoot = ltrim($this->config->webRoot, '/');
$this->path = substr(ltrim($_SERVER['REQUEST_URI'], '/'), strlen($webRoot . $fileName) + 1);
if(strpos($this->path, '?') > 0) $this->path = strstr($this->path, '?', true);
*/
$this->path = trim(substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], 'api.php') + 7), '/');
$subPos = $this->path ? strpos($this->path, '/') : false;
$this->version = $subPos !== false ? substr($this->path, 0, $subPos) : '';
+1 -1
View File
@@ -840,7 +840,7 @@ class baseControl
* Call the method and use ob function to get the output.
*/
ob_start();
call_user_func_array(array($module, $methodName), $params);
call_user_func_array(array($module, $methodName), array_values($params));
$output = ob_get_contents();
ob_end_clean();
+1 -1
View File
@@ -2792,7 +2792,7 @@ class EndResponseException extends \Exception
/**
* @param string $content
*
*
* @return sellf
*/
public static function create($content = '')
+1 -1
View File
@@ -205,7 +205,7 @@ class branch extends control
* @access public
* @return void
*/
public function ajaxGetDropMenu($productID, $branch = 0, $module, $method, $extra = '')
public function ajaxGetDropMenu($productID, $branch, $module, $method, $extra = '')
{
parse_str($extra, $output);
$branches = $this->branch->getPairs($productID, 'all', isset($output['projectID']) ? $output['projectID'] : 0);
+1 -1
View File
@@ -46,7 +46,7 @@ $lang->branch->confirmClose = 'Do you want to close this @branch@';
$lang->branch->confirmActivate = 'Do you want to activate this @branch@';
$lang->branch->existName = '@branch@ name already exists.';
$lang->branch->mergedMain = 'Trunk does not support being merged.';
$lang->branch->mergeTips = 'After the branch is merged, the corresponding releases, plans, modules, requirements, bugs, and cases under the branch will be merged into the new branch.';
$lang->branch->mergeTips = 'After the branch is merged, the corresponding releases, plans, builds, modules, requirements, bugs, and cases under the branch will be merged into the new branch.';
$lang->branch->targetBranchTips = 'You can merge it into an existing branch, merge it into the trunk, or create a new branch.';
$lang->branch->confirmMerge = 'The data of "mergedBranch" will be merged into "targetBranch", please confirm whether you want to perform the branch merge operation, the data will not be restored after the merge!';
+1 -1
View File
@@ -46,7 +46,7 @@ $lang->branch->confirmClose = '是否关闭该@branch@';
$lang->branch->confirmActivate = '是否激活该@branch@';
$lang->branch->existName = '@branch@名称已存在';
$lang->branch->mergedMain = '主干不支持被合并。';
$lang->branch->mergeTips = '合并@branch@后,会将@branch@下面对应的发布、计划、模块、需求、Bug、用例都合并到新的@branch@下。';
$lang->branch->mergeTips = '合并@branch@后,会将@branch@下面对应的发布、计划、版本、模块、需求、Bug、用例都合并到新的@branch@下。';
$lang->branch->targetBranchTips = '您可以将其合并到已有的一个@branch@,也可以合并到主干,也可以新创建一个@branch@。';
$lang->branch->confirmMerge = '"mergedBranch"的数据将被合并到"targetBranch",请确认是否要执行分支合并操作,合并后数据将不可再恢复!';
+3
View File
@@ -618,6 +618,9 @@ class branchModel extends model
/* Release. */
$this->dao->update(TABLE_RELEASE)->set('branch')->eq($targetBranch)->where('branch')->in($mergedBranches)->exec();
/* Build. */
$this->dao->update(TABLE_BUILD)->set('branch')->eq($targetBranch)->where('branch')->in($mergedBranches)->exec();
/* Plan. */
$this->dao->update(TABLE_PRODUCTPLAN)->set('branch')->eq($targetBranch)->where('branch')->in($mergedBranches)->exec();
+7 -8
View File
@@ -749,7 +749,6 @@ class bugModel extends model
$bug->type = $data->types[$bugID];
$bug->severity = $data->severities[$bugID];
$bug->pri = $data->pris[$bugID];
$bug->status = $data->statuses[$bugID];
$bug->color = $data->colors[$bugID];
$bug->title = $data->titles[$bugID];
$bug->plan = empty($data->plans[$bugID]) ? 0 : $data->plans[$bugID];
@@ -764,15 +763,15 @@ class bugModel extends model
$bug->resolution = $data->resolutions[$bugID];
$bug->duplicateBug = $data->duplicateBugs[$bugID] ? $data->duplicateBugs[$bugID] : $oldBug->duplicateBug;
if($bug->assignedTo != $oldBug->assignedTo) $bug->assignedDate = $now;
if(($bug->resolvedBy != '' or $bug->resolution != '') and $oldBug->status != 'resolved' and $bug->status != 'closed') $bug->resolvedDate = $now;
if($bug->resolution != '' and $bug->resolvedBy == '') $bug->resolvedBy = $this->app->user->account;
if($bug->resolution != '' and $bug->status != 'closed')
if($bug->assignedTo != $oldBug->assignedTo) $bug->assignedDate = $now;
if($bug->resolution != '') $bug->confirmed = 1;
if(($bug->resolvedBy != '' or $bug->resolution != '') and $oldBug->status != 'closed')
{
$bug->status = 'resolved';
$bug->confirmed = 1;
$bug->resolvedDate = $now;
$bug->status = 'resolved';
}
if($bug->resolution != '' and $bug->assignedTo == '')
if($bug->resolution != '' and $bug->resolvedBy == '') $bug->resolvedBy = $this->app->user->account;
if($bug->resolution != '' and $bug->assignedTo == '')
{
$bug->assignedTo = $oldBug->openedBy;
$bug->assignedDate = $now;
+1 -1
View File
@@ -2721,7 +2721,7 @@ EOD;
global $lang, $app;
if(!extension_loaded('curl'))
{
if($dataType == 'json') die($this->lang->error->noCurlExt);
if($dataType == 'json') die($lang->error->noCurlExt);
return json_encode(array('result' => 'fail', 'message' => $lang->error->noCurlExt));
}
+1 -1
View File
@@ -78,7 +78,7 @@ class design extends control
/* Print top and right actions. */
$this->lang->TRActions = '<div class="btn-toolbar pull-right">';
if($this->config->maxVersion and common::hasPriv('design', 'submit'))
if(isset($this->config->maxVersion) and common::hasPriv('design', 'submit'))
{
$this->lang->TRActions .= '<div class="btn-group">';
$this->lang->TRActions .= html::a($this->createLink('design', 'submit', "productID=$productID", '', true), "<i class='icon-plus'></i> {$this->lang->design->submit}", '', "class='btn btn-secondary iframe'");
+2 -2
View File
@@ -1267,7 +1267,7 @@ class execution extends control
* Create a execution.
*
* @param string $projectID
* @param string $executionID
* @param int $executionID
* @param string $copyExecutionID
* @param int $planID
* @param string $confirm
@@ -1277,7 +1277,7 @@ class execution extends control
* @access public
* @return void
*/
public function create($projectID = '', $executionID = '', $copyExecutionID = '', $planID = 0, $confirm = 'no', $productID = 0, $extra = '')
public function create($projectID = '', $executionID = 0, $copyExecutionID = '', $planID = 0, $confirm = 'no', $productID = 0, $extra = '')
{
/* Set menu. */
if($this->app->tab == 'project')
+2 -1
View File
@@ -182,7 +182,8 @@ body {margin-bottom: 25px;}
<?php if($this->app->getViewType() == 'xhtml'):?>
<div id="xx-title">
<strong>
<?php echo ($this->project->getById($execution->project)->name . ' / ' . $this->execution->getByID($execution->id)->name) ?>
<?php $projectName = $this->config->systemMode == 'new' ? $this->project->getById($execution->project)->name . ' / ' : '';?>
<?php echo ($projectName . $this->execution->getByID($execution->id)->name);?>
</strong>
<div class="linkButton" onclick="handleLinkButtonClick()">
<span title="<?php echo $lang->viewDetails;?>">
+1 -1
View File
@@ -32,7 +32,7 @@ class product extends control
/* Get all products, if no, goto the create page. */
$this->products = $this->product->getPairs('nocode');
$isAPI = ($this->app->viewType == 'json' or (defined('RUN_MODE') and RUN_MODE == 'api'));
if(empty($this->products) and strpos(',create,index,showerrornone,ajaxgetdropmenu,kanban,all', $this->methodName) === false and $this->app->getViewType() != 'mhtml' and !$isAPI) $this->locate($this->createLink('product', 'create'));
if(empty($this->products) and strpos(',create,index,showerrornone,ajaxgetdropmenu,kanban,all,manageline', $this->methodName) === false and $this->app->getViewType() != 'mhtml' and !$isAPI) $this->locate($this->createLink('product', 'create'));
$this->view->products = $this->products;
}
+1 -1
View File
@@ -656,7 +656,7 @@ class program extends control
* @access public
* @return void
*/
public function ajaxGetDropMenu($programID = 0, $module, $method)
public function ajaxGetDropMenu($programID, $module, $method)
{
$this->view->programID = $programID;
$this->view->module = $module;
+1 -1
View File
@@ -589,7 +589,7 @@ class programModel extends model
->setDefault('openedDate', helper::now())
->setIF($this->post->acl == 'open', 'whitelist', '')
->setIF($this->post->delta == 999, 'end', LONG_TIME)
->setIF($this->post->budget != 0, 'budget', round($this->post->budget, 2))
->setIF($this->post->budget != 0, 'budget', round((float)$this->post->budget, 2))
->add('type', 'program')
->join('whitelist', ',')
->stripTags($this->config->program->editor->create['id'], $this->config->allowedTags)
+1 -1
View File
@@ -115,7 +115,7 @@ class project extends control
* @access public
* @return void
*/
public function ajaxGetDropMenu($projectID = 0, $module, $method)
public function ajaxGetDropMenu($projectID, $module, $method)
{
/* Load module. */
$this->loadModel('program');
+1 -1
View File
@@ -763,7 +763,7 @@ class projectModel extends model
->setIF($this->post->delta == 999, 'end', LONG_TIME)
->setIF($this->post->delta == 999, 'days', 0)
->setIF($this->post->acl == 'open', 'whitelist', '')
->setIF($this->post->budget != 0, 'budget', round($this->post->budget, 2))
->setIF($this->post->budget != 0, 'budget', round((float)$this->post->budget, 2))
->setDefault('openedBy', $this->app->user->account)
->setDefault('openedDate', helper::now())
->setDefault('team', substr($this->post->name, 0, 30))
+1 -1
View File
@@ -2440,7 +2440,7 @@ class storyModel extends model
* @access public
* @return array
*/
public function get2BeClosed($productID, $branch, $modules, $type = 'story', $orderBy, $pager)
public function get2BeClosed($productID, $branch, $modules, $type = 'story', $orderBy = '', $pager = null)
{
$stories = $this->dao->select('*')->from(TABLE_STORY)
->where('product')->in($productID)
+1 -1
View File
@@ -22,7 +22,7 @@ class taskModel extends model
*/
public function create($executionID)
{
if($this->post->estimate < 0)
if((float)$this->post->estimate < 0)
{
dao::$errors[] = $this->lang->task->error->recordMinus;
return false;
+1 -1
View File
@@ -60,7 +60,7 @@ class testcaseModel extends model
if(!empty($case->lib))$param = "lib={$case->lib}";
if(!empty($case->product))$param = "product={$case->product}";
$result = $this->loadModel('common')->removeDuplicate('case', $case, $param);
if($result['stop']) return array('status' => 'exists', 'id' => $result['duplicate']);
if($result and $result['stop']) return array('status' => 'exists', 'id' => $result['duplicate']);
/* Value of story may be showmore. */
$case->story = (int)$case->story;
+1 -1
View File
@@ -947,7 +947,7 @@ class testtaskModel extends model
* @access public
* @return array
*/
public function getUserRuns($taskID, $user, $modules = '', $orderBy, $pager = null)
public function getUserRuns($taskID, $user, $modules = '', $orderBy = 'id_desc', $pager = null)
{
/* Select the table for these special fields. */
$specialFields = ',assignedTo,status,lastRunResult,lastRunner,lastRunDate,';
@@ -30,11 +30,11 @@ class xuanxuanIm extends imModel
$libID = isset($libIdList[0]) ? $libIdList[0] : 1;
$actions = new stdclass();
if(common::hasPriv('bug', 'create') and !empty($products)) $actions->createBug = array('title' => $this->lang->im->createBug, 'url' => $baseURL . str_replace('/x.php', '/index.php', helper::createLink('bug', 'create', "product=$productID", 'xhtml')), 'height' => "600px", 'width' => "800px");
if(common::hasPriv('story', 'create') and !empty($products)) $actions->createStory = array('title' => $this->lang->im->createStory, 'url' => $baseURL . str_replace('/x.php', '/index.php', helper::createLink('story', 'create', "product=$productID", 'xhtml')), 'height' => "600px", 'width' => "800px");
if(common::hasPriv('task', 'create') and !empty($executions))$actions->createTask = array('title' => $this->lang->im->createTask, 'url' => $baseURL . str_replace('/x.php', '/index.php', helper::createLink('task', 'create', "execution=$executionID", 'xhtml')), 'height' => "600px", 'width' => "800px");
if(common::hasPriv('doc', 'create') and !empty($libIdList)) $actions->createDoc = array('title' => $this->lang->im->createDoc, 'url' => $baseURL . str_replace('/x.php', '/index.php', helper::createLink('doc', 'create', "objectType=&objectID=0&libID=0", 'xhtml')), 'height' => "600px", 'width' => "800px");
if(common::hasPriv('todo', 'create')) $actions->createTodo = array('title' => $this->lang->im->createTodo, 'url' => $baseURL . str_replace('/x.php', '/index.php', helper::createLink('todo', 'create', '', 'xhtml')), 'height' => "600px", 'width' => "800px");
if(common::hasPriv('bug', 'create') and !empty($products)) $actions->createBug = array('title' => $this->lang->im->createBug, 'url' => $baseURL . str_replace('/x.php', '/index.php', helper::createLink('bug', 'create', "product=$productID", 'xhtml')), 'height' => "600px", 'width' => "1200px");
if(common::hasPriv('story', 'create') and !empty($products)) $actions->createStory = array('title' => $this->lang->im->createStory, 'url' => $baseURL . str_replace('/x.php', '/index.php', helper::createLink('story', 'create', "product=$productID", 'xhtml')), 'height' => "600px", 'width' => "1200px");
if(common::hasPriv('task', 'create') and !empty($executions))$actions->createTask = array('title' => $this->lang->im->createTask, 'url' => $baseURL . str_replace('/x.php', '/index.php', helper::createLink('task', 'create', "execution=$executionID", 'xhtml')), 'height' => "600px", 'width' => "1200px");
if(common::hasPriv('doc', 'create') and !empty($libIdList)) $actions->createDoc = array('title' => $this->lang->im->createDoc, 'url' => $baseURL . str_replace('/x.php', '/index.php', helper::createLink('doc', 'create', "objectType=&objectID=0&libID=0", 'xhtml')), 'height' => "600px", 'width' => "1200px");
if(common::hasPriv('todo', 'create')) $actions->createTodo = array('title' => $this->lang->im->createTodo, 'url' => $baseURL . str_replace('/x.php', '/index.php', helper::createLink('todo', 'create', '', 'xhtml')), 'height' => "600px", 'width' => "1200px");
$urls = array();
foreach($this->config->im->cards as $moduleName => $methods)
@@ -25,7 +25,7 @@ class xuanxuanMessage extends messageModel
}
else
{
$field = 'task.*';
$field = 'obj.*';
}
$object = $this->dao->select($field)->from($this->config->objectTables[$objectType])->alias('obj')
->beginIF($objectType == 'task')
@@ -89,6 +89,10 @@ class xuanxuanMessage extends messageModel
$subcontent->parentURL = "xxc:openInApp/zentao-integrated/" . urlencode($server . helper::createLink($parentType, 'browse', "id=$subcontent->parent", 'html'));
$subcontent->cardURL = $url;
}
else
{
$subcontent->parentType = $objectType;
}
$contentData = new stdclass();
$contentData->title = $title;