Merge branch 'master' into zentaopms_ci_dev

This commit is contained in:
wyd621
2020-02-10 14:40:44 +08:00
committed by GitHub
219 changed files with 6807 additions and 606 deletions
+1 -1
View File
@@ -1 +1 @@
11.7.stable
12.0.stable
+9
View File
@@ -65,6 +65,15 @@ if %requestType% == 'PATH_INFO' (
echo %computeburn% > %baseDir%computeburn.bat
echo computeburn.bat ok
:: create computetaskeffort.bat
if %requestType% == 'PATH_INFO' (
SET computetaskeffort= %phpcli% %baseDir%ztcli "%pmsRoot%/project-computetaskeffort"
)else (
SET computetaskeffort= %phpcli% %baseDir%ztcli "%pmsRoot%/index.php?m=project&f=computetaskeffort"
)
echo %computetaskeffort% > %baseDir%computetaskeffort.bat
echo computetaskeffort.bat ok
:: create checkdb.bat
if %requestType% == 'PATH_INFO' (
SET checkdb= %phpcli% %baseDir%ztcli "%pmsRoot%/admin-checkdb"
+9
View File
@@ -59,6 +59,15 @@ fi
echo $computeburn > $basePath/computeburn.sh
echo "computeburn.sh ok"
# compute task effort.
if [ $requestType == 'PATH_INFO' ]; then
computetaskeffort="$phpcli $basePath/ztcli '$pmsRoot/project-computetaskeffort'";
else
computetaskeffort="$phpcli $basePath/ztcli '$pmsRoot/index.php?m=project&f=computetaskeffort'";
fi
echo $computetaskeffort > $basePath/computetaskeffort.sh
echo "computetaskeffort.sh ok"
# daily remind
if [ $requestType == 'PATH_INFO' ]; then
checkdb="$phpcli $basePath/ztcli '$pmsRoot/report-remind'";
+1 -1
View File
@@ -16,7 +16,7 @@ if(!class_exists('config')){class config{}}
if(!function_exists('getWebRoot')){function getWebRoot(){}}
/* 基本设置。Basic settings. */
$config->version = '11.7'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it.
$config->version = '12.0'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it.
$config->charset = 'UTF-8'; // ZenTaoPHP的编码。 The encoding of ZenTaoPHP.
$config->cookieLife = time() + 2592000; // Cookie的生存时间。The cookie life time.
$config->timezone = 'Asia/Shanghai'; // 时区设置。 The time zone setting, for more see http://www.php.net/manual/en/timezones.php.
+21 -8
View File
@@ -27,6 +27,7 @@ $filter->default->cookie['theme'] = 'reg::word';
$filter->default->cookie['fingerprint'] = 'reg::word';
$filter->bug = new stdclass();
$filter->caselib = new stdclass();
$filter->doc = new stdclass();
$filter->product = new stdclass();
$filter->qa = new stdclass();
@@ -54,6 +55,8 @@ $filter->bug->browse = new stdclass();
$filter->bug->default = new stdclass();
$filter->bug->create = new stdclass();
$filter->bug->export = new stdclass();
$filter->caselib->create = new stdclass();
$filter->doc->create = new stdclass();
$filter->doc->browse = new stdclass();
$filter->doc->showfiles = new stdclass();
$filter->doc->default = new stdclass();
@@ -69,14 +72,17 @@ $filter->project->default = new stdclass();
$filter->project->story = new stdclass();
$filter->project->task = new stdclass();
$filter->qa->default = new stdclass();
$filter->story->create = new stdclass();
$filter->story->export = new stdclass();
$filter->sso->getbindusers = new stdclass();
$filter->sso->gettodolist = new stdclass();
$filter->sso->getuserpairs = new stdclass();
$filter->sso->login = new stdclass();
$filter->sso->logout = new stdclass();
$filter->task->create = new stdclass();
$filter->task->export = new stdclass();
$filter->testcase->default = new stdclass();
$filter->testcase->create = new stdclass();
$filter->testcase->browse = new stdclass();
$filter->testcase->export = new stdclass();
$filter->testcase->groupcase = new stdclass();
@@ -96,8 +102,12 @@ $filter->bug->browse->cookie['windowWidth'] = 'int';
$filter->bug->default->cookie['lastProduct'] = 'int';
$filter->bug->default->cookie['preProductID'] = 'int';
$filter->bug->create->cookie['preBranch'] = 'int';
$filter->bug->create->cookie['lastBugModule'] = 'int';
$filter->bug->export->cookie['checkedItem'] = 'reg::checked';
$filter->caselib->create->cookie['lastLibCaseModule'] = 'int';
$filter->doc->create->cookie['lastDocModule'] = 'int';
$filter->doc->browse->cookie['browseType'] = 'reg::browseType';
$filter->doc->alllibs->cookie['browseType'] = 'reg::browseType';
$filter->doc->objectlibs->cookie['browseType'] = 'reg::browseType';
@@ -136,17 +146,20 @@ $filter->qa->default->cookie['lastProduct'] = 'int';
$filter->qa->default->cookie['preBranch'] = 'int';
$filter->qa->default->cookie['preProductID'] = 'int';
$filter->story->create->cookie['lastStoryModule'] = 'int';
$filter->story->export->cookie['checkedItem'] = 'reg::checked';
$filter->task->export->cookie['checkedItem'] = 'reg::checked';
$filter->task->create->cookie['lastTaskModule'] = 'int';
$filter->task->export->cookie['checkedItem'] = 'reg::checked';
$filter->testcase->browse->cookie['caseModule'] = 'int';
$filter->testcase->browse->cookie['caseSuite'] = 'int';
$filter->testcase->browse->cookie['preBranch'] = 'int';
$filter->testcase->default->cookie['lastProduct'] = 'int';
$filter->testcase->default->cookie['preProductID'] = 'int';
$filter->testcase->export->cookie['checkedItem'] = 'reg::checked';
$filter->testcase->groupcase->cookie['preBranch'] = 'int';
$filter->testcase->browse->cookie['caseModule'] = 'int';
$filter->testcase->browse->cookie['caseSuite'] = 'int';
$filter->testcase->browse->cookie['preBranch'] = 'int';
$filter->testcase->create->cookie['lastCaseModule'] = 'int';
$filter->testcase->default->cookie['lastProduct'] = 'int';
$filter->testcase->default->cookie['preProductID'] = 'int';
$filter->testcase->export->cookie['checkedItem'] = 'reg::checked';
$filter->testcase->groupcase->cookie['preBranch'] = 'int';
$filter->testreport->default->cookie['lastProduct'] = 'int';
$filter->testreport->default->cookie['lastProject'] = 'int';
+6 -6
View File
@@ -69,14 +69,14 @@ $config->storyCommonList['zh-cn'][1] = '故事';
$config->storyCommonList['zh-tw'][0] = '需求';
$config->storyCommonList['zh-tw'][1] = '故事';
$config->storyCommonList['en'][0] = 'story';
$config->storyCommonList['en'][1] = 'story';
$config->storyCommonList['en'][0] = 'Story';
$config->storyCommonList['en'][1] = 'Story';
$config->storyCommonList['de'][0] = 'story';
$config->storyCommonList['de'][1] = 'story';
$config->storyCommonList['de'][0] = 'Story';
$config->storyCommonList['de'][1] = 'Story';
$config->storyCommonList['fr'][0] = 'story';
$config->storyCommonList['fr'][1] = 'story';
$config->storyCommonList['fr'][0] = 'Story';
$config->storyCommonList['fr'][1] = 'Story';
/* Story common list. */
$config->hourPointCommonList['zh-cn'][0] = '工时';
+989
View File
@@ -0,0 +1,989 @@
CREATE TABLE `zt_action` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`objectType` varchar(30) NOT NULL DEFAULT '',
`objectID` mediumint(8) unsigned NOT NULL DEFAULT '0',
`product` varchar(255) NOT NULL,
`project` mediumint(9) NOT NULL,
`actor` varchar(30) NOT NULL DEFAULT '',
`action` varchar(30) NOT NULL DEFAULT '',
`date` datetime NOT NULL,
`comment` text NOT NULL,
`extra` text NOT NULL,
`read` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `date` (`date`),
KEY `actor` (`actor`),
KEY `project` (`project`),
KEY `objectID` (`objectID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_block` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`account` char(30) NOT NULL,
`module` varchar(20) NOT NULL,
`title` varchar(100) NOT NULL,
`source` varchar(20) NOT NULL,
`block` varchar(20) NOT NULL,
`params` text NOT NULL,
`order` tinyint(3) unsigned NOT NULL DEFAULT '0',
`grid` tinyint(3) unsigned NOT NULL DEFAULT '0',
`height` smallint(5) unsigned NOT NULL DEFAULT '0',
`hidden` tinyint(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `accountModuleOrder` (`account`,`module`,`order`),
KEY `account` (`account`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_branch` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`product` mediumint(8) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`order` smallint(5) unsigned NOT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `product` (`product`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_bug` (
`id` mediumint(8) NOT NULL AUTO_INCREMENT,
`product` mediumint(8) unsigned NOT NULL DEFAULT '0',
`branch` mediumint(8) unsigned NOT NULL DEFAULT '0',
`module` mediumint(8) unsigned NOT NULL DEFAULT '0',
`project` mediumint(8) unsigned NOT NULL DEFAULT '0',
`plan` mediumint(8) unsigned NOT NULL DEFAULT '0',
`story` mediumint(8) unsigned NOT NULL DEFAULT '0',
`storyVersion` smallint(6) NOT NULL DEFAULT '1',
`task` mediumint(8) unsigned NOT NULL DEFAULT '0',
`toTask` mediumint(8) unsigned NOT NULL DEFAULT '0',
`toStory` mediumint(8) NOT NULL DEFAULT '0',
`title` varchar(255) NOT NULL,
`keywords` varchar(255) NOT NULL,
`severity` tinyint(4) NOT NULL DEFAULT '0',
`pri` tinyint(3) unsigned NOT NULL,
`type` varchar(30) NOT NULL DEFAULT '',
`os` varchar(30) NOT NULL DEFAULT '',
`browser` varchar(30) NOT NULL DEFAULT '',
`hardware` varchar(30) NOT NULL,
`found` varchar(30) NOT NULL DEFAULT '',
`steps` text NOT NULL,
`status` enum('active','resolved','closed') NOT NULL DEFAULT 'active',
`subStatus` varchar(30) NOT NULL DEFAULT '',
`color` char(7) NOT NULL,
`confirmed` tinyint(1) NOT NULL DEFAULT '0',
`activatedCount` smallint(6) NOT NULL,
`activatedDate` datetime NOT NULL,
`mailto` text,
`openedBy` varchar(30) NOT NULL DEFAULT '',
`openedDate` datetime NOT NULL,
`openedBuild` varchar(255) NOT NULL,
`assignedTo` varchar(30) NOT NULL DEFAULT '',
`assignedDate` datetime NOT NULL,
`deadline` date NOT NULL,
`resolvedBy` varchar(30) NOT NULL DEFAULT '',
`resolution` varchar(30) NOT NULL DEFAULT '',
`resolvedBuild` varchar(30) NOT NULL DEFAULT '',
`resolvedDate` datetime NOT NULL,
`closedBy` varchar(30) NOT NULL DEFAULT '',
`closedDate` datetime NOT NULL,
`duplicateBug` mediumint(8) unsigned NOT NULL,
`linkBug` varchar(255) NOT NULL,
`case` mediumint(8) unsigned NOT NULL,
`caseVersion` smallint(6) NOT NULL DEFAULT '1',
`result` mediumint(8) unsigned NOT NULL,
`repo` mediumint(8) unsigned NOT NULL,
`entry` varchar(255) NOT NULL,
`lines` varchar(10) NOT NULL,
`v1` varchar(40) NOT NULL,
`v2` varchar(40) NOT NULL,
`repoType` varchar(30) NOT NULL DEFAULT '',
`testtask` mediumint(8) unsigned NOT NULL,
`lastEditedBy` varchar(30) NOT NULL DEFAULT '',
`lastEditedDate` datetime NOT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `product` (`product`),
KEY `project` (`project`),
KEY `status` (`status`),
KEY `plan` (`plan`),
KEY `story` (`story`),
KEY `case` (`case`),
KEY `assignedTo` (`assignedTo`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_build` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`product` mediumint(8) unsigned NOT NULL DEFAULT '0',
`branch` mediumint(8) unsigned NOT NULL DEFAULT '0',
`project` mediumint(8) unsigned NOT NULL DEFAULT '0',
`name` char(150) NOT NULL,
`scmPath` char(255) NOT NULL,
`filePath` char(255) NOT NULL,
`date` date NOT NULL,
`stories` text NOT NULL,
`bugs` text NOT NULL,
`builder` char(30) NOT NULL DEFAULT '',
`desc` text NOT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `product` (`product`),
KEY `project` (`project`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_burn` (
`project` mediumint(8) unsigned NOT NULL,
`task` mediumint(8) unsigned NOT NULL DEFAULT '0',
`date` date NOT NULL,
`estimate` float NOT NULL,
`left` float NOT NULL,
`consumed` float NOT NULL,
PRIMARY KEY (`project`,`date`,`task`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_case` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`product` mediumint(8) unsigned NOT NULL DEFAULT '0',
`branch` mediumint(8) unsigned NOT NULL DEFAULT '0',
`lib` mediumint(8) unsigned NOT NULL DEFAULT '0',
`module` mediumint(8) unsigned NOT NULL DEFAULT '0',
`path` mediumint(8) unsigned NOT NULL DEFAULT '0',
`story` mediumint(30) unsigned NOT NULL DEFAULT '0',
`storyVersion` smallint(6) NOT NULL DEFAULT '1',
`title` varchar(255) NOT NULL,
`precondition` text NOT NULL,
`keywords` varchar(255) NOT NULL,
`pri` tinyint(3) unsigned NOT NULL DEFAULT '3',
`type` char(30) NOT NULL DEFAULT '1',
`stage` varchar(255) NOT NULL,
`howRun` varchar(30) NOT NULL,
`scriptedBy` varchar(30) NOT NULL,
`scriptedDate` date NOT NULL,
`scriptStatus` varchar(30) NOT NULL,
`scriptLocation` varchar(255) NOT NULL,
`status` char(30) NOT NULL DEFAULT '1',
`subStatus` varchar(30) NOT NULL DEFAULT '',
`color` char(7) NOT NULL,
`frequency` enum('1','2','3') NOT NULL DEFAULT '1',
`order` tinyint(30) unsigned NOT NULL DEFAULT '0',
`openedBy` char(30) NOT NULL DEFAULT '',
`openedDate` datetime NOT NULL,
`reviewedBy` varchar(255) NOT NULL,
`reviewedDate` date NOT NULL,
`lastEditedBy` char(30) NOT NULL DEFAULT '',
`lastEditedDate` datetime NOT NULL,
`version` tinyint(3) unsigned NOT NULL DEFAULT '0',
`linkCase` varchar(255) NOT NULL,
`fromBug` mediumint(8) unsigned NOT NULL,
`fromCaseID` mediumint(8) unsigned NOT NULL,
`fromCaseVersion` mediumint(8) unsigned NOT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
`lastRunner` varchar(30) NOT NULL,
`lastRunDate` datetime NOT NULL,
`lastRunResult` char(30) NOT NULL,
PRIMARY KEY (`id`),
KEY `product` (`product`),
KEY `story` (`story`),
KEY `module` (`module`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_casestep` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`parent` mediumint(8) unsigned NOT NULL DEFAULT '0',
`case` mediumint(8) unsigned NOT NULL DEFAULT '0',
`version` smallint(3) unsigned NOT NULL DEFAULT '0',
`type` varchar(10) NOT NULL DEFAULT 'step',
`desc` text NOT NULL,
`expect` text NOT NULL,
PRIMARY KEY (`id`),
KEY `case` (`case`),
KEY `version` (`version`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_company` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`name` char(120) DEFAULT NULL,
`phone` char(20) DEFAULT NULL,
`fax` char(20) DEFAULT NULL,
`address` char(120) DEFAULT NULL,
`zipcode` char(10) DEFAULT NULL,
`website` char(120) DEFAULT NULL,
`backyard` char(120) DEFAULT NULL,
`guest` enum('1','0') NOT NULL DEFAULT '0',
`admins` char(255) DEFAULT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_config` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`owner` char(30) NOT NULL DEFAULT '',
`module` varchar(30) NOT NULL,
`section` char(30) NOT NULL DEFAULT '',
`key` char(30) NOT NULL DEFAULT '',
`value` text NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `unique` (`owner`,`module`,`section`,`key`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_cron` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`m` varchar(20) NOT NULL,
`h` varchar(20) NOT NULL,
`dom` varchar(20) NOT NULL,
`mon` varchar(20) NOT NULL,
`dow` varchar(20) NOT NULL,
`command` text NOT NULL,
`remark` varchar(255) NOT NULL,
`type` varchar(20) NOT NULL,
`buildin` tinyint(1) NOT NULL DEFAULT '0',
`status` varchar(20) NOT NULL,
`lastTime` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `lastTime` (`lastTime`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_dept` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`name` char(60) NOT NULL,
`parent` mediumint(8) unsigned NOT NULL DEFAULT '0',
`path` char(255) NOT NULL DEFAULT '',
`grade` tinyint(3) unsigned NOT NULL DEFAULT '0',
`order` smallint(4) unsigned NOT NULL DEFAULT '0',
`position` char(30) NOT NULL DEFAULT '',
`function` char(255) NOT NULL DEFAULT '',
`manager` char(30) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `parent` (`parent`),
KEY `path` (`path`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_doc` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`product` mediumint(8) unsigned NOT NULL,
`project` mediumint(8) unsigned NOT NULL,
`lib` varchar(30) NOT NULL,
`module` varchar(30) NOT NULL,
`title` varchar(255) NOT NULL,
`keywords` varchar(255) NOT NULL,
`type` varchar(30) NOT NULL,
`views` smallint(5) unsigned NOT NULL,
`collector` text NOT NULL,
`addedBy` varchar(30) NOT NULL,
`addedDate` datetime NOT NULL,
`editedBy` varchar(30) NOT NULL,
`editedDate` datetime NOT NULL,
`acl` varchar(10) NOT NULL DEFAULT 'open',
`groups` varchar(255) NOT NULL,
`users` text NOT NULL,
`version` smallint(5) unsigned NOT NULL DEFAULT '1',
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `product` (`product`),
KEY `project` (`project`),
KEY `lib` (`lib`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_doccontent` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`doc` mediumint(8) unsigned NOT NULL,
`title` varchar(255) NOT NULL,
`digest` varchar(255) NOT NULL,
`content` text NOT NULL,
`files` text NOT NULL,
`type` varchar(10) NOT NULL,
`version` smallint(5) unsigned NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `doc_version` (`doc`,`version`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_doclib` (
`id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`type` varchar(30) NOT NULL,
`product` mediumint(8) unsigned NOT NULL,
`project` mediumint(8) unsigned NOT NULL,
`name` varchar(60) NOT NULL,
`acl` varchar(10) NOT NULL DEFAULT 'open',
`groups` varchar(255) NOT NULL,
`users` text NOT NULL,
`main` enum('0','1') NOT NULL DEFAULT '0',
`collector` text NOT NULL,
`order` tinyint(5) unsigned NOT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `product` (`product`),
KEY `project` (`project`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_effort` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`user` char(30) NOT NULL DEFAULT '',
`todo` enum('1','0') NOT NULL DEFAULT '1',
`date` date NOT NULL,
`begin` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`end` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`type` enum('1','2','3') NOT NULL DEFAULT '1',
`idvalue` mediumint(8) unsigned NOT NULL DEFAULT '0',
`name` char(30) NOT NULL DEFAULT '',
`desc` char(255) NOT NULL DEFAULT '',
`status` enum('1','2','3') NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `user` (`user`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_entry` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`account` varchar(30) NOT NULL DEFAULT '',
`code` varchar(20) NOT NULL,
`key` varchar(32) NOT NULL,
`freePasswd` enum('0','1') NOT NULL DEFAULT '0',
`ip` varchar(100) NOT NULL,
`desc` text NOT NULL,
`createdBy` varchar(30) NOT NULL,
`createdDate` datetime NOT NULL,
`calledTime` int(10) unsigned NOT NULL DEFAULT '0',
`editedBy` varchar(30) NOT NULL,
`editedDate` datetime NOT NULL,
`deleted` enum('0', '1') NOT NULL DEFAULT '0',
PRIMARY KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_extension` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(150) NOT NULL,
`code` varchar(30) NOT NULL,
`version` varchar(50) NOT NULL,
`author` varchar(100) NOT NULL,
`desc` text NOT NULL,
`license` text NOT NULL,
`type` varchar(20) NOT NULL DEFAULT 'extension',
`site` varchar(150) NOT NULL,
`zentaoCompatible` varchar(100) NOT NULL,
`installedTime` datetime NOT NULL,
`depends` varchar(100) NOT NULL,
`dirs` mediumtext NOT NULL,
`files` mediumtext NOT NULL,
`status` varchar(20) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `code` (`code`),
KEY `name` (`name`),
KEY `installedTime` (`installedTime`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_file` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`pathname` char(100) NOT NULL,
`title` char(255) NOT NULL,
`extension` char(30) NOT NULL,
`size` int(10) unsigned NOT NULL DEFAULT '0',
`objectType` char(30) NOT NULL,
`objectID` mediumint(9) NOT NULL,
`addedBy` char(30) NOT NULL DEFAULT '',
`addedDate` datetime NOT NULL,
`downloads` mediumint(8) unsigned NOT NULL DEFAULT '0',
`extra` varchar(255) NOT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `objectType` (`objectType`),
KEY `objectID` (`objectID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_group` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`name` char(30) NOT NULL,
`role` char(30) NOT NULL DEFAULT '',
`desc` char(255) NOT NULL DEFAULT '',
`acl` text,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_grouppriv` (
`group` mediumint(8) unsigned NOT NULL DEFAULT '0',
`module` char(30) NOT NULL DEFAULT '',
`method` char(30) NOT NULL DEFAULT '',
UNIQUE KEY `group` (`group`,`module`,`method`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_history` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`action` mediumint(8) unsigned NOT NULL DEFAULT '0',
`field` varchar(30) NOT NULL DEFAULT '',
`old` text NOT NULL,
`new` text NOT NULL,
`diff` mediumtext NOT NULL,
PRIMARY KEY (`id`),
KEY `action` (`action`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_lang` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`lang` varchar(30) NOT NULL,
`module` varchar(30) NOT NULL,
`section` varchar(30) NOT NULL,
`key` varchar(60) NOT NULL,
`value` text NOT NULL,
`system` enum('0','1') NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `lang` (`lang`,`module`,`section`,`key`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_log` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`objectType` varchar(30) NOT NULL,
`objectID` mediumint(8) unsigned NOT NULL,
`action` mediumint(8) unsigned NOT NULL,
`date` datetime NOT NULL,
`url` varchar(255) NOT NULL,
`contentType` varchar(30) NOT NULL,
`data` text NOT NULL,
`result` text NOT NULL,
PRIMARY KEY (`id`),
KEY `objectType` (`objectType`),
KEY `obejctID` (`objectID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_module` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`root` mediumint(8) unsigned NOT NULL DEFAULT '0',
`branch` mediumint(8) unsigned NOT NULL DEFAULT '0',
`name` char(60) NOT NULL DEFAULT '',
`parent` mediumint(8) unsigned NOT NULL DEFAULT '0',
`path` char(255) NOT NULL DEFAULT '',
`grade` tinyint(3) unsigned NOT NULL DEFAULT '0',
`order` smallint(5) unsigned NOT NULL DEFAULT '0',
`type` char(30) NOT NULL,
`owner` varchar(30) NOT NULL,
`collector` text NOT NULL,
`short` varchar(30) NOT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `root` (`root`),
KEY `type` (`type`),
KEY `path` (`path`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_notify` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`objectType` varchar(50) NOT NULL,
`objectID` mediumint(8) unsigned NOT NULL,
`action` mediumint(9) NOT NULL,
`toList` varchar(255) NOT NULL,
`ccList` text NOT NULL,
`subject` varchar(255) NOT NULL,
`data` text NOT NULL,
`createdBy` char(30) NOT NULL,
`createdDate` datetime NOT NULL,
`sendTime` datetime NOT NULL,
`status` varchar(10) NOT NULL DEFAULT 'wait',
`failReason` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_oauth` (
`account` varchar(30) NOT NULL,
`openID` varchar(255) NOT NULL,
`providerType` varchar(30) NOT NULL,
`providerID` mediumint(8) unsigned NOT NULL,
KEY `account` (`account`),
KEY `providerType` (`providerType`),
KEY `providerID` (`providerID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_product` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(90) NOT NULL,
`code` varchar(45) NOT NULL,
`line` mediumint(8) NOT NULL,
`type` varchar(30) NOT NULL DEFAULT 'normal',
`status` varchar(30) NOT NULL DEFAULT '',
`subStatus` varchar(30) NOT NULL DEFAULT '',
`desc` text NOT NULL,
`PO` varchar(30) NOT NULL,
`QD` varchar(30) NOT NULL,
`RD` varchar(30) NOT NULL,
`acl` enum('open','private','custom') NOT NULL DEFAULT 'open',
`whitelist` text NOT NULL,
`createdBy` varchar(30) NOT NULL,
`createdDate` datetime NOT NULL,
`createdVersion` varchar(20) NOT NULL,
`order` mediumint(8) unsigned NOT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `acl` (`acl`),
KEY `order` (`order`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_productplan` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`product` mediumint(8) unsigned NOT NULL,
`branch` mediumint(8) unsigned NOT NULL,
`parent` mediumint(9) NOT NULL DEFAULT '0',
`title` varchar(90) NOT NULL,
`desc` text NOT NULL,
`begin` date NOT NULL,
`end` date NOT NULL,
`order` text NOT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `product` (`product`),
KEY `end` (`end`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_project` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`isCat` enum('1','0') NOT NULL DEFAULT '0',
`catID` mediumint(8) unsigned NOT NULL,
`type` varchar(20) NOT NULL DEFAULT 'sprint',
`parent` mediumint(8) unsigned NOT NULL DEFAULT '0',
`name` varchar(90) NOT NULL,
`code` varchar(45) NOT NULL,
`begin` date NOT NULL,
`end` date NOT NULL,
`days` smallint(5) unsigned NOT NULL,
`status` varchar(10) NOT NULL,
`subStatus` varchar(30) NOT NULL DEFAULT '',
`statge` enum('1','2','3','4','5') NOT NULL DEFAULT '1',
`pri` enum('1','2','3','4') NOT NULL DEFAULT '1',
`desc` text NOT NULL,
`openedBy` varchar(30) NOT NULL DEFAULT '',
`openedDate` datetime NOT NULL,
`openedVersion` varchar(20) NOT NULL,
`closedBy` varchar(30) NOT NULL DEFAULT '',
`closedDate` datetime NOT NULL,
`canceledBy` varchar(30) NOT NULL DEFAULT '',
`canceledDate` datetime NOT NULL,
`PO` varchar(30) NOT NULL DEFAULT '',
`PM` varchar(30) NOT NULL DEFAULT '',
`QD` varchar(30) NOT NULL DEFAULT '',
`RD` varchar(30) NOT NULL DEFAULT '',
`team` varchar(90) NOT NULL,
`acl` enum('open','private','custom') NOT NULL DEFAULT 'open',
`whitelist` text NOT NULL,
`order` mediumint(8) unsigned NOT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `parent` (`parent`),
KEY `begin` (`begin`),
KEY `end` (`end`),
KEY `status` (`status`),
KEY `acl` (`acl`),
KEY `order` (`order`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_projectproduct` (
`project` mediumint(8) unsigned NOT NULL,
`product` mediumint(8) unsigned NOT NULL,
`branch` mediumint(8) unsigned NOT NULL,
`plan` mediumint(8) unsigned NOT NULL,
PRIMARY KEY (`project`,`product`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_projectstory` (
`project` mediumint(8) unsigned NOT NULL DEFAULT '0',
`product` mediumint(8) unsigned NOT NULL,
`story` mediumint(8) unsigned NOT NULL DEFAULT '0',
`version` smallint(6) NOT NULL DEFAULT '1',
`order` smallint(6) unsigned NOT NULL,
UNIQUE KEY `project` (`project`,`story`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_release` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`product` mediumint(8) unsigned NOT NULL DEFAULT '0',
`branch` mediumint(8) unsigned NOT NULL DEFAULT '0',
`build` mediumint(8) unsigned NOT NULL,
`name` varchar(255) NOT NULL DEFAULT '',
`marker` enum('0','1') NOT NULL DEFAULT '0',
`date` date NOT NULL,
`stories` text NOT NULL,
`bugs` text NOT NULL,
`leftBugs` text NOT NULL,
`desc` text NOT NULL,
`status` varchar(20) NOT NULL DEFAULT 'normal',
`subStatus` varchar(30) NOT NULL DEFAULT '',
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `product` (`product`),
KEY `build` (`build`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_repo` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`path` varchar(255) NOT NULL,
`prefix` varchar(100) NOT NULL,
`encoding` varchar(20) NOT NULL,
`SCM` varchar(10) NOT NULL,
`client` varchar(100) NOT NULL,
`commits` mediumint(8) unsigned NOT NULL,
`account` varchar(30) NOT NULL,
`password` varchar(30) NOT NULL,
`encrypt` varchar(30) NOT NULL DEFAULT 'plain',
`acl` text NOT NULL,
`synced` tinyint(1) NOT NULL DEFAULT '0',
`lastSync` datetime NOT NULL,
`deleted` tinyint(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_repobranch` (
`repo` mediumint(8) unsigned NOT NULL,
`revision` mediumint(8) unsigned NOT NULL,
`branch` varchar(255) NOT NULL,
UNIQUE KEY `repo_revision_branch` (`repo`,`revision`,`branch`),
KEY `branch` (`branch`),
KEY `revision` (`revision`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_repohistory` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`repo` mediumint(9) NOT NULL,
`revision` varchar(40) NOT NULL,
`commit` mediumint(8) unsigned NOT NULL,
`comment` text NOT NULL,
`committer` varchar(100) NOT NULL,
`time` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `repo` (`repo`),
KEY `revision` (`revision`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_repofiles` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`repo` mediumint(8) unsigned NOT NULL,
`revision` mediumint(8) unsigned NOT NULL,
`path` varchar(255) NOT NULL,
`parent` varchar(255) NOT NULL,
`type` varchar(20) NOT NULL,
`action` char(1) NOT NULL,
PRIMARY KEY (`id`),
KEY `path` (`path`),
KEY `parent` (`parent`),
KEY `repo` (`repo`),
KEY `revision` (`revision`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_score` (
`id` bigint(12) unsigned NOT NULL AUTO_INCREMENT,
`account` varchar(30) NOT NULL,
`module` varchar(30) NOT NULL DEFAULT '',
`method` varchar(30) NOT NULL,
`desc` varchar(250) NOT NULL DEFAULT '',
`before` int(11) NOT NULL DEFAULT '0',
`score` int(11) NOT NULL DEFAULT '0',
`after` int(11) NOT NULL DEFAULT '0',
`time` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `account` (`account`),
KEY `model` (`module`),
KEY `method` (`method`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_story` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`product` mediumint(8) unsigned NOT NULL default '0',
`branch` mediumint(8) unsigned NOT NULL default '0',
`module` mediumint(8) unsigned NOT NULL default '0',
`plan` text,
`source` varchar(20) NOT NULL,
`sourceNote` varchar(255) NOT NULL,
`fromBug` mediumint(8) unsigned NOT NULL default '0',
`title` varchar(255) NOT NULL,
`keywords` varchar(255) NOT NULL,
`type` varchar(30) NOT NULL default '',
`pri` tinyint(3) unsigned NOT NULL default '3',
`estimate` float unsigned NOT NULL,
`status` enum('','changed','active','draft','closed') NOT NULL default '',
`subStatus` varchar(30) NOT NULL DEFAULT '',
`color` char(7) NOT NULL,
`stage` enum('','wait','planned','projected','developing','developed','testing','tested','verified','released', 'closed') NOT NULL DEFAULT 'wait',
`stagedBy` char(30) NOT NULL,
`mailto` text,
`openedBy` varchar(30) NOT NULL default '',
`openedDate` datetime NOT NULL,
`assignedTo` varchar(30) NOT NULL default '',
`assignedDate` datetime NOT NULL,
`lastEditedBy` varchar(30) NOT NULL default '',
`lastEditedDate` datetime NOT NULL,
`reviewedBy` varchar(255) NOT NULL,
`reviewedDate` date NOT NULL,
`closedBy` varchar(30) NOT NULL default '',
`closedDate` datetime NOT NULL,
`closedReason` varchar(30) NOT NULL,
`toBug` mediumint(8) unsigned NOT NULL,
`childStories` varchar(255) NOT NULL,
`linkStories` varchar(255) NOT NULL,
`duplicateStory` mediumint(8) unsigned NOT NULL,
`version` smallint(6) NOT NULL default '1',
`deleted` enum('0','1') NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `product` (`product`),
KEY `status` (`status`),
KEY `assignedTo` (`assignedTo`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_storyspec` (
`story` mediumint(9) NOT NULL,
`version` smallint(6) NOT NULL,
`title` varchar(255) NOT NULL,
`spec` text NOT NULL,
`verify` text NOT NULL,
UNIQUE KEY `story` (`story`,`version`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_storystage` (
`story` mediumint(8) unsigned NOT NULL,
`branch` mediumint(8) unsigned NOT NULL,
`stage` varchar(50) NOT NULL,
`stagedBy` char(30) NOT NULL,
UNIQUE KEY `story_branch` (`story`,`branch`),
KEY `story` (`story`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_suitecase` (
`suite` mediumint(8) unsigned NOT NULL,
`product` mediumint(8) unsigned NOT NULL,
`case` mediumint(8) unsigned NOT NULL,
`version` smallint(5) unsigned NOT NULL,
UNIQUE KEY `suitecase` (`suite`,`case`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_task` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`parent` mediumint(8) NOT NULL DEFAULT '0',
`project` mediumint(8) unsigned NOT NULL DEFAULT '0',
`module` mediumint(8) unsigned NOT NULL DEFAULT '0',
`story` mediumint(8) unsigned NOT NULL DEFAULT '0',
`storyVersion` smallint(6) NOT NULL DEFAULT '1',
`fromBug` mediumint(8) unsigned NOT NULL DEFAULT '0',
`name` varchar(255) NOT NULL,
`type` varchar(20) NOT NULL,
`pri` tinyint(3) unsigned NOT NULL DEFAULT '0',
`estimate` float unsigned NOT NULL,
`consumed` float unsigned NOT NULL,
`left` float unsigned NOT NULL,
`deadline` date NOT NULL,
`status` enum('wait','doing','done','pause','cancel','closed') NOT NULL DEFAULT 'wait',
`subStatus` varchar(30) NOT NULL DEFAULT '',
`color` char(7) NOT NULL,
`mailto` text,
`desc` text NOT NULL,
`openedBy` varchar(30) NOT NULL,
`openedDate` datetime NOT NULL,
`assignedTo` varchar(30) NOT NULL,
`assignedDate` datetime NOT NULL,
`estStarted` date NOT NULL,
`realStarted` date NOT NULL,
`finishedBy` varchar(30) NOT NULL,
`finishedDate` datetime NOT NULL,
`finishedList` text NOT NULL,
`canceledBy` varchar(30) NOT NULL,
`canceledDate` datetime NOT NULL,
`closedBy` varchar(30) NOT NULL,
`closedDate` datetime NOT NULL,
`closedReason` varchar(30) NOT NULL,
`lastEditedBy` varchar(30) NOT NULL,
`lastEditedDate` datetime NOT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `project` (`project`),
KEY `story` (`story`),
KEY `assignedTo` (`assignedTo`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_taskestimate` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`task` mediumint(8) unsigned NOT NULL DEFAULT '0',
`date` date NOT NULL,
`left` float unsigned NOT NULL DEFAULT '0',
`consumed` float unsigned NOT NULL,
`account` char(30) NOT NULL DEFAULT '',
`work` text,
PRIMARY KEY (`id`),
KEY `task` (`task`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_team` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`root` mediumint(8) unsigned NOT NULL DEFAULT '0',
`type` enum('project','task') NOT NULL DEFAULT 'project',
`account` char(30) NOT NULL DEFAULT '',
`role` char(30) NOT NULL DEFAULT '',
`limited` char(8) NOT NULL DEFAULT 'no',
`join` date NOT NULL DEFAULT '0000-00-00',
`days` smallint(5) unsigned NOT NULL,
`hours` float(2,1) unsigned NOT NULL DEFAULT '0.0',
`estimate` decimal(12,2) unsigned NOT NULL DEFAULT '0.00',
`consumed` decimal(12,2) unsigned NOT NULL DEFAULT '0.00',
`left` decimal(12,2) unsigned NOT NULL DEFAULT '0.00',
`order` tinyint(3) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `team` (`root`,`type`,`account`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_testreport` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`product` mediumint(8) unsigned NOT NULL,
`project` mediumint(8) unsigned NOT NULL,
`tasks` varchar(255) NOT NULL,
`builds` varchar(255) NOT NULL,
`title` varchar(255) NOT NULL,
`begin` date NOT NULL,
`end` date NOT NULL,
`owner` char(30) NOT NULL,
`members` text NOT NULL,
`stories` text NOT NULL,
`bugs` text NOT NULL,
`cases` text NOT NULL,
`report` text NOT NULL,
`objectType` varchar(20) NOT NULL,
`objectID` mediumint(8) unsigned NOT NULL,
`createdBy` char(30) NOT NULL,
`createdDate` datetime NOT NULL,
`deleted` enum('0','1') NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_testresult` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`run` mediumint(8) unsigned NOT NULL,
`case` mediumint(8) unsigned NOT NULL,
`version` smallint(5) unsigned NOT NULL,
`caseResult` char(30) NOT NULL,
`stepResults` text NOT NULL,
`lastRunner` varchar(30) NOT NULL,
`date` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `case` (`case`),
KEY `version` (`version`),
KEY `run` (`run`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_testrun` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`task` mediumint(8) unsigned NOT NULL DEFAULT '0',
`case` mediumint(8) unsigned NOT NULL DEFAULT '0',
`version` tinyint(3) unsigned NOT NULL DEFAULT '0',
`assignedTo` char(30) NOT NULL DEFAULT '',
`lastRunner` varchar(30) NOT NULL,
`lastRunDate` datetime NOT NULL,
`lastRunResult` char(30) NOT NULL,
`status` char(30) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `task` (`task`,`case`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_testsuite` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`product` mediumint(8) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`desc` text NOT NULL,
`type` varchar(20) NOT NULL,
`addedBy` char(30) NOT NULL,
`addedDate` datetime NOT NULL,
`lastEditedBy` char(30) NOT NULL,
`lastEditedDate` datetime NOT NULL,
`deleted` enum('0','1') NOT NULL,
PRIMARY KEY (`id`),
KEY `product` (`product`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_testtask` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`name` char(90) NOT NULL,
`product` mediumint(8) unsigned NOT NULL,
`project` mediumint(8) unsigned NOT NULL DEFAULT '0',
`build` char(30) NOT NULL,
`owner` varchar(30) NOT NULL,
`pri` tinyint(3) unsigned NOT NULL DEFAULT '0',
`begin` date NOT NULL,
`end` date NOT NULL,
`mailto` text,
`desc` text NOT NULL,
`report` text NOT NULL,
`status` enum('blocked','doing','wait','done') NOT NULL DEFAULT 'wait',
`subStatus` varchar(30) NOT NULL DEFAULT '',
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `product` (`product`),
KEY `build` (`build`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_todo` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`account` char(30) NOT NULL,
`date` date NOT NULL,
`begin` smallint(4) unsigned zerofill NOT NULL,
`end` smallint(4) unsigned zerofill NOT NULL,
`type` char(10) NOT NULL,
`cycle` tinyint(3) unsigned NOT NULL DEFAULT '0',
`idvalue` mediumint(8) unsigned NOT NULL DEFAULT '0',
`pri` tinyint(3) unsigned NOT NULL,
`name` char(150) NOT NULL,
`desc` text NOT NULL,
`status` enum('wait','doing','done','closed') NOT NULL DEFAULT 'wait',
`private` tinyint(1) NOT NULL,
`config` varchar(255) NOT NULL,
`assignedTo` varchar(30) NOT NULL DEFAULT '',
`assignedBy` varchar(30) NOT NULL DEFAULT '',
`assignedDate` datetime NOT NULL,
`finishedBy` varchar(30) NOT NULL DEFAULT '',
`finishedDate` datetime NOT NULL,
`closedBy` varchar(30) NOT NULL DEFAULT '',
`closedDate` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `account` (`account`),
KEY `assignedTo` (`assignedTo`),
KEY `finishedBy` (`finishedBy`),
KEY `date` (`date`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_user` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`dept` mediumint(8) unsigned NOT NULL DEFAULT '0',
`account` char(30) NOT NULL DEFAULT '',
`password` char(32) NOT NULL DEFAULT '',
`role` char(10) NOT NULL DEFAULT '',
`realname` varchar(100) NOT NULL DEFAULT '',
`nickname` char(60) NOT NULL DEFAULT '',
`commiter` varchar(100) NOT NULL,
`avatar` char(30) NOT NULL DEFAULT '',
`birthday` date NOT NULL DEFAULT '0000-00-00',
`gender` enum('f','m') NOT NULL DEFAULT 'f',
`email` char(90) NOT NULL DEFAULT '',
`skype` char(90) NOT NULL DEFAULT '',
`qq` char(20) NOT NULL DEFAULT '',
`mobile` char(11) NOT NULL DEFAULT '',
`phone` char(20) NOT NULL DEFAULT '',
`weixin` varchar(90) NOT NULL DEFAULT '',
`dingding` varchar(90) NOT NULL DEFAULT '',
`slack` varchar(90) NOT NULL DEFAULT '',
`whatsapp` varchar(90) NOT NULL DEFAULT '',
`address` char(120) NOT NULL DEFAULT '',
`zipcode` char(10) NOT NULL DEFAULT '',
`join` date NOT NULL DEFAULT '0000-00-00',
`visits` mediumint(8) unsigned NOT NULL DEFAULT '0',
`ip` char(15) NOT NULL DEFAULT '',
`last` int(10) unsigned NOT NULL DEFAULT '0',
`fails` tinyint(5) NOT NULL DEFAULT '0',
`locked` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`ranzhi` char(30) NOT NULL DEFAULT '',
`score` int(11) NOT NULL DEFAULT '0',
`scoreLevel` int(11) NOT NULL DEFAULT '0',
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `account` (`account`),
KEY `dept` (`dept`),
KEY `email` (`email`),
KEY `commiter` (`commiter`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_usercontact` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`account` char(30) NOT NULL,
`listName` varchar(60) NOT NULL,
`userList` text NOT NULL,
PRIMARY KEY (`id`),
KEY `account` (`account`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_usergroup` (
`account` char(30) NOT NULL DEFAULT '',
`group` mediumint(8) unsigned NOT NULL DEFAULT '0',
UNIQUE KEY `account` (`account`,`group`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_userquery` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`account` char(30) NOT NULL,
`module` varchar(30) NOT NULL,
`title` varchar(90) NOT NULL,
`form` text NOT NULL,
`sql` text NOT NULL,
`shortcut` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `account` (`account`),
KEY `module` (`module`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_usertpl` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`account` char(30) NOT NULL,
`type` char(30) NOT NULL,
`title` varchar(150) NOT NULL,
`content` text NOT NULL,
`public` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `account` (`account`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_userview` (
`account` char(30) NOT NULL,
`products` mediumtext NOT NULL,
`projects` mediumtext NOT NULL,
UNIQUE KEY `account` (`account`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zt_webhook` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`type` varchar(10) NOT NULL DEFAULT 'default',
`name` varchar(50) NOT NULL,
`url` varchar(255) NOT NULL,
`domain` varchar(255) NOT NULL,
`secret` varchar(255) NOT NULL,
`contentType` varchar(30) NOT NULL DEFAULT 'application/json',
`sendType` enum('sync','async') NOT NULL DEFAULT 'sync',
`products` text NOT NULL,
`projects` text NOT NULL,
`params` varchar(100) NOT NULL,
`actions` text NOT NULL,
`desc` text NOT NULL,
`createdBy` varchar(30) NOT NULL,
`createdDate` datetime NOT NULL,
`editedBy` varchar(30) NOT NULL,
`editedDate` datetime NOT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+5 -1
View File
@@ -24,7 +24,8 @@ CREATE TABLE IF NOT EXISTS `zt_repobranch` (
`revision` mediumint(8) unsigned NOT NULL,
`branch` varchar(255) NOT NULL,
UNIQUE KEY `repo_revision_branch` (`repo`,`revision`,`branch`),
KEY `branch` (`branch`)
KEY `branch` (`branch`),
KEY `revision` (`revision`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- DROP TABLE IF EXISTS `zt_repohistory`;
@@ -64,3 +65,6 @@ ALTER TABLE `zt_bug` ADD `v1` varchar(40) COLLATE 'utf8_general_ci' NOT NULL AFT
ALTER TABLE `zt_bug` ADD `v2` varchar(40) COLLATE 'utf8_general_ci' NOT NULL AFTER `v1`;
ALTER TABLE `zt_bug` ADD `repoType` varchar(30) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `v2`;
ALTER TABLE `zt_bug` ADD `entry` varchar(255) COLLATE 'utf8_general_ci' NOT NULL AFTER `repo`;
ALTER TABLE `zt_repobranch` ADD INDEX `revision` (`revision`);
DELETE FROM `zt_grouppriv` WHERE `module` = 'api' AND `method` = 'sql';
+2505 -1
View File
File diff suppressed because one or more lines are too long
+144
View File
@@ -1,3 +1,147 @@
2020-01-02 12.0
完成的需求:
4438 编辑版本可以修改所属项目
4437 测试单关联用例的时候显示已经选择的用例数量
4428 所有迭代里面的检索标签没有高亮
4425 重复的bug,bug ID增加必填项符号
4507 将代码功能版本浏览功能转移到开源版
4529 实现角色为测试人员的各区块数据展示
4528 实现角色为产品经理的各区块数据展示
4527 实现角色为研发人员的工时统计区块的数据展示
4526 实现角色为研发人员的任务与bug数区块的数据展示
4525 实现角色为研发人员的项目列表区块的数据展示
4524 实现角色为研发人员的参与项目区块的数据展示
4523 实现角色为研发人员的基本信息区块的数据展示
4522 实现五大区块的可视化样式及布局
4521 实现数据大屏的总体布局样式
3363 调整创建对象之后的返回的页面
4520 集成最新版本的喧喧
修复的Bug
1276 批量编辑任务时,速度过慢
1334 禅道和第三方系统集成重复连接登录网址跳转链接错误
2014 已删除测试单详情页,有代码提示
2029 在需求列表编辑需求所处阶段不生效
2066 组织-部门如果部门比较多加载时间会比较长
2075 国际版新手教程创建BUG报错
2078 批量添加待办不填写信息保存没有提示信息
2084 文档库维护模块后显示顺序不一致
2089 没有批量操作权限时不要显示批量操作栏
2114 bug柱状图报表,项目名称过长时显示不完整
2184 一个产品下的模块,可以修改到另一个产品下的分支。
2185 用例生成报表显示数据不全
2208 项目下批量编辑需求阶段显示异常
2219 测试bug列表页面表尾固定时出现下方滚动条会遮挡数据
2225 附件库ppt图标不显示
2231 任务多的时候,页面错乱
2237 新建bug后,分页栏数据没有实时更新
2239 企业版文档库上传附件提示连接超时
2244 拒绝某一个重复的需求时重复需求的ID没有记录下来
2250 在已关闭的项目下,设置不显示已关闭的文档库,页面有代码报错。
2252 搜索表单设置多个查询条件执行搜索后没有保持展开状态
2253 需求由谁评审,显示有换行。
2254 批量执行用例执行结果联动问题
2264 ie11录入bug重现步骤时光标会自动换行
2277 产品分支下的模块不能修改所属分支
2281 产品概况页面的路线图顺序反了
2289 不同页面同样内容及操作形式控件大小及间隔不一致
2303 一键安装包,界面选项有换行
2306 测试主页图标显示问题
2308 bug列表指派人放上后显示的是用户名
2309 列表页面批量修改需求相应模块时如果使用搜索功能页面会滚动
2310 产品概况下的路线图名称重叠
2312 测试用例步骤选择分组后展示不全
2315 用例步骤预期有特殊符号会影响评审
2321 关闭需求原因选择重复时窗口缺少必填标识
2326 项目文档目录视图下访问文档分类提示没有权限
2327 IE11上传图片兼容问题
2329 编辑产品线,模块名称应改为产品线名称
2330 产品计划富文本编辑换行显示问题
2335 关联用例的指派给检索规则
2338 直接通过链接访问的页面没有权限确认后会跳转回之前的访问页面
2342 英文版项目统计区块界面优化
2343 需求相关信息显示优化
2349 创建、编辑用例时,分组按钮与后面步骤冲突
2364 项目没有关联产品下需求,在维护项目模块时可以显示产品下模块
2405 计划批量编辑描述输入框功能异常
2422 任务详情页操作栏“+”icon缺少title显示
2423 进行中的任务无法批量取消
2428 操作子任务提示没有项目访问权限
2430 创建子任务不能带父任务的模块
2431 用例详情弹窗页的操作条显示不对
2434 用例步骤选择分组会把后续已经录入的步骤变成子步骤
2436 用户充值密码后登录禅道会跳转会重置密码页面
2437 产品/项目下拉列表,显示的数据不完整
2441 产品主页多次刷新后无法显示页面
2442 bug编辑模块下拉滚动条优化
2444 项目提测页面创建版本的弹窗样式调整
2445 项目提测页面,创建版本的弹窗里,点击关联产品后弹窗样式有问题
2446 文档详情删除图片按钮有问题
2448 区块列表显示的数量建议做下限制
2449 bug解决版本可以显示已经停止维护并删除的发布
2450 项目下拉列表重复显示
2451 我的地盘创建子任务和任务列表创建子任务按钮不一致
2453 自定义可用联系方式清空后编辑用户报错
2477 计划数量统计问题
2612 markdown遇到html标签会过滤
2631 英文版bug详情激活次数 时间 换行
2632 英文版创建文档是 文档名称翻译错误
2633 英文版记录工时消耗工时和剩余工时无法完全显示
2634 英文版评审用例库页面日期重叠
2684 文档设置不显示子分类文档无效
2736 webhook的bearychat的显示宽度不够
2759 bug关键词设置必填时,填写0提示不能为空
2777 文档markdown编辑器中含有http信息报错
2816 批量添加用户,保存后提示密码不符合条件
2825 升级执行的SQL中希望对zt_im_client检查删除
2835 markdown图片链接不能正常显示
2836 测试单访问权限与设置不符
2837 svn集成偶尔出现diff缺少行的问题
2839 周期待办展示类型有误
2841 备注保存时,加载图标旋转问题
2843 新手教程提示用户没有权限
2851 添加备注时,黏贴图片或表格,数据库信息记录不全
2852 后台设置相关需求为必填项后用例库无法导入用例
2856 升级过程没有处理超时的情况
2860 团队维护性能问题
2861 测试用例下无法同步用例库中用例修改后的名称
2862 组织-用户查看用户完成的待办没有绿色勾选
2863 提示名称和界面显示字段名称不一致
2864 计划列表展示样式问题
2865 我的地盘--测试--给我的用例无法显示
2866 受限用户操作权限问题
2867 增加产品项目页面项目代码列宽
2868 bug报表统计界面优化显示为interface
2869 变更需求页面切换产品网址跳转错误
2870 先填写今天的日志再填写昨天的日志,剩余工时会被覆盖。
2871 简单表格,自定义列添加一个字段,操作栏样式需要优化
2874 删除用户的周期待办还会自动创建
2875 搜索表单在特定条件下不符合当前列表类型
2876 异步发信时,bug重新指派人员,导致bug中的图片不展示
2877 通过搜索可以看到没有权限访问的bug
2878 bug页面搜索解决日期结果不准确
2879 详情页面点击右侧下一条用例会显示异常
2880 通过批量操作关闭父任务,父任务历史记录不准确
2881 测试单中关联用例的状态为待审核
2882 自己账号显示别人的待办提醒
2883 用例左右箭头切换, 用例步骤丢失
2884 创建项目时选择关联产品,报错报错
2885 admin设置全局自定义字段没有作用
2886 用例库用例详情无法切换到用例界面
2887 权限列表名称和菜单名称不一致
2889 钉钉个人通知只能@到手机号
2890 提需求不显示提示信息
2891 父子任务列表页面, 任务名不全 , 为 ...
2898 分解任务时点击同需求按钮,编辑框文字重叠
2899 添加项目关联产品和计划页面报错
2900 设置新建任务预计工时必填无效
2901 项目--看板页面看板设置后页面显示问题
2902 升级11.7后自定义bug类型丢失
2903 视图维护显示允许访问产品不起效
2905 文档版本显示错误
2906 title显示错误
2908 使用翻页查看用例,无法自动跳转下一个用例的最后一个版本
2911 用例左右切换时版本号有误
2019-11-28 11.7
完成的需求:
3699 发布的需求列表增加批量关闭操作
+6 -3
View File
@@ -885,7 +885,11 @@ class baseControl
if($type != 'json') die();
$data = (array) $data;
if(helper::isAjaxRequest() or $this->viewType == 'json') print(json_encode($data)) and die(helper::removeUTF8Bom(ob_get_clean()));
if(helper::isAjaxRequest() or $this->viewType == 'json')
{
print(json_encode($data));
die(helper::removeUTF8Bom(ob_get_clean()));
}
/**
* 响应非ajax的请求。
@@ -905,8 +909,7 @@ class baseControl
{
$message = json_decode(json_encode((array)$data['message']));
foreach((array)$message as $item => $errors) $message->$item = implode(',', $errors);
echo js::alert(strip_tags(implode(" ", (array) $message)));
die(js::locate('back'));
die(js::alert(strip_tags(implode('\n', (array) $message))));
}
die('fail');
}
+28 -2
View File
@@ -58,6 +58,19 @@ class control extends baseControl
}
}
}
$textareaFields = $this->dao->select('*')->from(TABLE_WORKFLOWFIELD)->where('module')->eq($this->moduleName)->andWhere('control')->eq('textarea')->andWhere('buildin')->eq('0')->fetchAll('field');
if($textareaFields)
{
$editorIdList = array();
foreach($textareaFields as $textareaField) $editorIdList[] = $textareaField->field;
if(!isset($this->config->{$this->moduleName})) $this->config->{$this->moduleName} = new stdclass();
if(!isset($this->config->{$this->moduleName}->editor)) $this->config->{$this->moduleName}->editor = new stdclass();
if(!isset($this->config->{$this->moduleName}->editor->{$this->methodName})) $this->config->{$this->moduleName}->editor->{$this->methodName} = array('id' => '', 'tools' => 'simpleTools');
$this->config->{$this->moduleName}->editor->{$this->methodName}['id'] .= ',' . join(',', $editorIdList);
trim($this->config->{$this->moduleName}->editor->{$this->methodName}['id'], ',');
}
}
}
@@ -293,10 +306,15 @@ class control extends baseControl
$notEmptyRule = $this->loadModel('workflowrule')->getByTypeAndRule('system', 'notempty');
$requiredFields = '';
$mustPostValue = '';
foreach($fields as $field)
{
if($field->buildin or !$field->show or !isset($layouts[$field->field])) continue;
if($notEmptyRule && strpos(",$field->rules,", ",$notEmptyRule->id,") !== false) $requiredFields .= ",{$field->field}";
if($notEmptyRule && strpos(",$field->rules,", ",$notEmptyRule->id,") !== false)
{
$requiredFields .= ",{$field->field}";
if($field->control == 'radio' or $field->control == 'checkbox') $mustPostValue .= ",{$field->field}";
}
}
if($requiredFields)
@@ -306,7 +324,15 @@ class control extends baseControl
$message = array();
foreach(explode(',', $requiredFields) as $requiredField)
{
if(isset($_POST[$requiredField]) and $_POST[$requiredField] === '')$message[$requiredField] = sprintf($this->lang->error->notempty, $fields[$requiredField]->name);
if(empty($requiredField)) continue;
if(isset($_POST[$requiredField]) and $_POST[$requiredField] === '')
{
$message[$requiredField][] = sprintf($this->lang->error->notempty, $fields[$requiredField]->name);
}
elseif(strpos(",{$mustPostValue},", ",{$requiredField},") !== false and !isset($_POST[$requiredField]))
{
$message[$requiredField][] = sprintf($this->lang->error->notempty, $fields[$requiredField]->name);
}
}
if($message) $this->send(array('result' => 'fail', 'message' => $message));
}
+3 -2
View File
@@ -103,9 +103,10 @@ class router extends baseRouter
$flow = $this->dbh->query('SELECT value FROM' . TABLE_CONFIG . "WHERE `owner`='system' AND `module`='common' AND `key`='flow'")->fetch();
$config->global->flow = $flow ? $flow->value : 'full';
$commonSettings = array();
try
{
$commonSettins = $this->dbh->query('SELECT `key`, value FROM' . TABLE_CONFIG . "WHERE `owner`='system' AND `module`='custom' and `key` in ('productProject','storyRequirement','hourPoint')")->fetchAll();
$commonSettings = $this->dbh->query('SELECT `key`, value FROM' . TABLE_CONFIG . "WHERE `owner`='system' AND `module`='custom' and `key` in ('productProject','storyRequirement','hourPoint')")->fetchAll();
}
catch (PDOException $exception)
{
@@ -128,7 +129,7 @@ class router extends baseRouter
$productCommon = $storyCommon = $hourCommon = 0;
$projectCommon = empty($this->config->isINT) ? 0 : 1;
foreach($commonSettins as $setting)
foreach($commonSettings as $setting)
{
if($setting->key == 'productProject') list($productCommon, $projectCommon) = explode('_', $setting->value);
if($setting->key == 'storyRequirement') $storyCommon = $setting->value;
+3 -1
View File
@@ -358,7 +358,9 @@ class baseHTML
*/
static public function textarea($name, $value = "", $attrib = "")
{
return "<textarea name='$name' id='$name' $attrib>$value</textarea>\n";
$id = "id='$name'";
if(strpos($attrib, 'id=') !== false) $id = '';
return "<textarea name='$name' $id $attrib>$value</textarea>\n";
}
/**
+1
View File
@@ -85,6 +85,7 @@ class Git
if($localBranch{0} == '*') $localBranch = substr($localBranch, 1);
$localBranch = trim($localBranch);
if(empty($localBranch))continue;
$branches[$localBranch] = $localBranch;
}
asort($branches);
+4 -2
View File
@@ -45,9 +45,11 @@ class zdb
$stmt = $this->dbh->query("show full tables");
while($table = $stmt->fetch(PDO::FETCH_ASSOC))
{
$tableName = $table["Tables_in_{$config->db->name}"];
$tableType = strtolower($table['Table_type']);
$allTables[$tableName] = $tableType == 'base table' ? 'table' : $tableType;
if($tableType != 'base table') continue;
$tableName = $table["Tables_in_{$config->db->name}"];
$allTables[$tableName] = 'table';
}
return $allTables;
+1 -1
View File
@@ -239,7 +239,7 @@ class adminModel extends model
/* Check weak password when login. */
if($this->app->moduleName == 'user' and $this->app->methodName == 'login')
{
if(!isset($_POST['passwordStrength'])) return true;
if(!isset($_POST['passwordStrength'])) return false;
if(isset($this->config->safe->mode) and $this->post->passwordStrength < $this->config->safe->mode) return true;
}
+3 -4
View File
@@ -105,9 +105,8 @@ class api extends control
*/
public function sql($keyField = '')
{
die();
//$sql = isset($_POST['sql']) ? $this->post->sql : '';
//$this->view->results = $this->api->sql($sql, $keyField);
//die($this->display());
$sql = isset($_POST['sql']) ? $this->post->sql : '';
$this->view->results = $this->api->sql($sql, $keyField);
die($this->display());
}
}
-1
View File
@@ -94,7 +94,6 @@ class apiModel extends model
*/
public function sql($sql, $keyField = '')
{
die();
$sql = trim($sql);
if(strpos($sql, ';') !== false) $sql = substr($sql, 0, strpos($sql, ';'));
a($sql);
-1
View File
@@ -83,7 +83,6 @@ class backup extends control
{
if($reload == 'yes') session_write_close();
set_time_limit(0);
$nozip = strpos($this->config->backup->setting, 'nozip') !== false;
$nofile = strpos($this->config->backup->setting, 'nofile') !== false;
$nosafe = strpos($this->config->backup->setting, 'nosafe') !== false;
-15
View File
@@ -1,15 +0,0 @@
$(function()
{
$('#settingnofile').change(function()
{
if($(this).prop('checked'))
{
$('#settingnozip').closest('.checkbox-primary').hide();
}
else
{
$('#settingnozip').closest('.checkbox-primary').show();
}
})
$('#settingnofile').change();
});
-1
View File
@@ -16,7 +16,6 @@ $lang->backup->size = 'Größe';
$lang->backup->setting = 'Settings';
$lang->backup->settingDir = 'Backup Directory';
$lang->backup->settingList['nofile'] = 'Do not back up files or codes.';
$lang->backup->settingList['nozip'] = 'Only copy files and do not no zip it.';
$lang->backup->settingList['nosafe'] = 'Do not prevent downloading PHP file header.';
$lang->backup->waitting = '<span id="backupType"></span> In Arbeit. Bitte warten...';
-1
View File
@@ -16,7 +16,6 @@ $lang->backup->size = 'Size';
$lang->backup->setting = 'Settings';
$lang->backup->settingDir = 'Backup Directory';
$lang->backup->settingList['nofile'] = 'Do not back up files or codes.';
$lang->backup->settingList['nozip'] = 'Only copy files and do not no zip it.';
$lang->backup->settingList['nosafe'] = 'Do not prevent downloading PHP file header.';
$lang->backup->waitting = '<span id="backupType"></span> is ongoing. Please wait...';
-1
View File
@@ -16,7 +16,6 @@ $lang->backup->size = 'Taille';
$lang->backup->setting = 'Paramétrage';
$lang->backup->settingDir = 'Répertoire Backup';
$lang->backup->settingList['nofile'] = 'Ne pas archiver fichiers et codes.';
$lang->backup->settingList['nozip'] = 'Copier seulement les fichiers sans les compresser.';
$lang->backup->settingList['nosafe'] = 'Ne pas prévenir du téléchargement par PHP file header.';
$lang->backup->waitting = '<span id="backupType"></span> est en cours. Patientez s´il vous plait...';
-1
View File
@@ -16,7 +16,6 @@ $lang->backup->size = '大小';
$lang->backup->setting = '设置';
$lang->backup->settingDir = '备份目录';
$lang->backup->settingList['nofile'] = '不备份附件和代码';
$lang->backup->settingList['nozip'] = '只拷贝文件,不压缩';
$lang->backup->settingList['nosafe'] = '不需要防下载PHP文件头';
$lang->backup->waitting = '<span id="backupType"></span>正在进行中,请稍候...';
-1
View File
@@ -16,7 +16,6 @@ $lang->backup->size = '大小';
$lang->backup->setting = '設置';
$lang->backup->settingDir = '備份目錄';
$lang->backup->settingList['nofile'] = '不備份附件和代碼';
$lang->backup->settingList['nozip'] = '只拷貝檔案,不壓縮';
$lang->backup->settingList['nosafe'] = '不需要防下載PHP檔案頭';
$lang->backup->waitting = '<span id="backupType"></span>正在進行中,請稍候...';
+1 -1
View File
@@ -77,7 +77,7 @@ class backupModel extends model
$file = trim(str_replace($appRoot, '', $codeFile), DS);
if(is_dir($codeFile))
{
if(!is_dir($backupFile . DS . $flle)) mkdir($backupFile . DS . $flle, 0777, true);
if(!is_dir($backupFile . DS . $file)) mkdir($backupFile . DS . $file, 0777, true);
$zfile->copyDir($codeFile, $backupFile . DS . $file);
}
else
+5 -4
View File
@@ -752,7 +752,7 @@ class block extends control
$status = isset($this->params->type) ? $this->params->type : '';
$num = isset($this->params->num) ? $this->params->num : '';
$products = $this->block->getProducts($status, $num);
$products = $this->loadModel('product')->getOrderedProducts($status, $num);
$productIdList = array_keys($products);
if(empty($products))
@@ -883,7 +883,7 @@ class block extends control
$num = isset($this->params->num) ? (int)$this->params->num : 0;
/* Get projects. */
$projects = $this->block->getProjects($status, $num);
$projects = $this->loadModel('project')->getOrderedProjects($status, $num);
if(empty($projects))
{
$this->view->projects = $projects;
@@ -893,11 +893,12 @@ class block extends control
$projectIdList = array_keys($projects);
/* Get tasks. */
/* Get tasks. Fix bug #2918.*/
$yesterday = date('Y-m-d', strtotime('-1 day'));
$tasks = $this->dao->select("project, count(id) as totalTasks, count(status in ('wait','doing','pause') or null) as undoneTasks, count(finishedDate like '{$yesterday}%' or null) as yesterdayFinished, sum(if(status != 'cancel', estimate, 0)) as totalEstimate, sum(consumed) as totalConsumed, sum(if(status != 'cancel' and status != 'closed', `left`, 0)) as totalLeft")->from(TABLE_TASK)
->where('project')->in($projectIdList)
->andWhere('deleted')->eq(0)
->andWhere('parent')->lt(1)
->groupBy('project')
->fetchAll('project');
foreach($tasks as $projectID => $task)
@@ -992,7 +993,7 @@ class block extends control
$status = isset($this->params->type) ? $this->params->type : '';
$num = isset($this->params->num) ? (int)$this->params->num : 0;
$products = $this->block->getProducts($status, $num);
$products = $this->loadModel('product')->getOrderedProducts($status, $num);
$productIdList = array_keys($products);
if(empty($products))
+5 -2
View File
@@ -8,7 +8,10 @@ $(function()
$titleInput = $('#blockParams').find('#title');
var title = $titleInput.val();
var value = $(this).find('option:selected').text();
if(title.indexOf(' - ' + preValue) >= 0) $titleInput.val(blockTitle + ' - ' + value);
var preIndex = blockTitle.indexOf(' - ' + preValue);
if(preIndex >= 0) blockTitle = blockTitle.substring(0, preIndex);
$titleInput.val(blockTitle + ' - ' + value);
preValue = value;
});
@@ -36,7 +39,7 @@ $(function()
blockTitle = $titleInput.val();
preValue = $('#blockParams #paramstype').find('option:selected').text();
var preIndex = blockTitle.indexOf(' - ' + preValue);
if(preIndex < -1) blockTitle = blockTitle.substring(0, preIndex);
if(preIndex >= 0) blockTitle = blockTitle.substring(0, preIndex);
$titleInput.val(blockTitle + ' - ' + preValue);
}
};
+5 -5
View File
@@ -37,11 +37,11 @@ $lang->block->welcome = 'Willkommen';
$lang->block->lblTesttask = 'Test Request Detail';
$lang->block->leftToday = 'Arbeit für Heute';
$lang->block->myTask = 'Meine Aufgaben';
$lang->block->myStory = 'Meine Story';
$lang->block->myBug = 'Meine Bugs';
$lang->block->myProject = 'Meine ' . $lang->projectCommon;
$lang->block->myProduct = 'Meine ' . $lang->productCommon;
$lang->block->myTask = 'Aufgaben';
$lang->block->myStory = 'Story';
$lang->block->myBug = 'Bugs';
$lang->block->myProject = '' . $lang->projectCommon;
$lang->block->myProduct = '' . $lang->productCommon;
$lang->block->delayed = 'Verspätet';
$lang->block->noData = 'Keine Daten für diesen Bericht.';
$lang->block->emptyTip = 'Keine Information';
+2 -2
View File
@@ -40,7 +40,7 @@ $lang->block->leftToday = '今天剩餘工作總計';
$lang->block->myTask = '我的任務';
$lang->block->myStory = "我的{$lang->storyCommon}";
$lang->block->myBug = '我的BUG';
$lang->block->myProject = '進行中的' . $lang->projectCommon;
$lang->block->myProject = '未關閉的' . $lang->projectCommon;
$lang->block->myProduct = '未關閉的' . $lang->productCommon;
$lang->block->delayed = '已延期';
$lang->block->noData = '當前統計類型下暫無數據';
@@ -101,7 +101,7 @@ $lang->block->default['project']['2']['title'] = $lang->projectCommon . '總覽'
$lang->block->default['project']['2']['block'] = 'overview';
$lang->block->default['project']['2']['grid'] = 4;
$lang->block->default['project']['3']['title'] = '進行中的' . $lang->projectCommon;
$lang->block->default['project']['3']['title'] = '未關閉的' . $lang->projectCommon;
$lang->block->default['project']['3']['block'] = 'list';
$lang->block->default['project']['3']['grid'] = 8;
-88
View File
@@ -660,92 +660,4 @@ class blockModel extends model
return $key == $hash;
}
/**
* Get products like drop menu order
*
* @param strint $status
* @param int $num
* @access public
* @return array
*/
public function getProducts($status, $num)
{
$products = $this->loadModel('product')->getList($status);
if(empty($products)) return $products;
$lines = $this->loadModel('tree')->getLinePairs($useShort = true);
$productList = array();
foreach($lines as $id => $name)
{
foreach($products as $key => $product)
{
if($product->line == $id)
{
$product->name = $name . '/' . $product->name;
$productList[] = $product;
unset($products[$key]);
}
}
}
$productList = array_merge($productList, $products);
$products = $mineProducts = $otherProducts = $closedProducts = array();
foreach($productList as $product)
{
if(!$this->app->user->admin and !$this->product->checkPriv($product->id)) continue;
if($product->status == 'normal' and $product->PO == $this->app->user->account)
{
$mineProducts[$product->id] = $product;
}
elseif($product->status == 'normal' and $product->PO != $this->app->user->account)
{
$otherProducts[$product->id] = $product;
}
elseif($product->status == 'closed')
{
$closedProducts[$product->id] = $product;
}
}
$products = $mineProducts + $otherProducts + $closedProducts;
if(empty($num)) return $products;
return array_slice($products, 0, $num, true);
}
/**
* Get projects like drop menu order
*
* @param string $status
* @param int $num
* @access public
* @return array
*/
public function getProjects($status, $num)
{
$projectList = $this->loadModel('project')->getList($status);
if(empty($projectList)) return $projectList;
$projects = $mineProjects = $otherProjects = $closedProjects = array();
foreach($projectList as $project)
{
if(!$this->app->user->admin and !$this->project->checkPriv($project->id)) continue;
if($project->status != 'done' and $project->status != 'closed' and $project->PM == $this->app->user->account)
{
$mineProjects[$project->id] = $project;
}
elseif($project->status != 'done' and $project->status != 'closed' and !($project->PM == $this->app->user->account))
{
$otherProjects[$project->id] = $project;
}
elseif($project->status == 'done' or $project->status == 'closed')
{
$closedProjects[$project->id] = $project;
}
}
$projects = $mineProjects + $otherProjects + $closedProjects;
if(empty($num)) return $projects;
return array_slice($projects, 0, $num, true);
}
}
+9
View File
@@ -122,6 +122,15 @@ $(function()
})
<?php endif;?>
<?php endif;?>
<?php $showedModal = false;?>
<?php if(!empty($config->global->showAnnual) and empty($config->global->annualShowed)):?>
<?php $this->app->loadLang('misc');?>
var myModalTrigger = new $.zui.ModalTrigger({title:'<?php echo $lang->misc->showAnnual;?>', custom: function(){return <?php echo json_encode(sprintf($lang->misc->annualDesc, $this->createLink('report', 'annualData')));?>}});
var result = myModalTrigger.show();
$('#showAnnual').click(function(){myModalTrigger.close()});
<?php $this->loadModel('setting')->setItem("{$this->app->user->account}.common.global.annualShowed", 1);?>
<?php $showedModal = true;?>
<?php endif;?>
</script>
<?php if($extView = $this->getExtViewFile(__FILE__)){include $extView; return helper::cd();}?>
<?php if(isset($pageJS)) js::execute($pageJS);?>
@@ -103,7 +103,7 @@ $(function()
</div>
<div class="col tab-content">
<?php foreach($projects as $project):?>
<div class="tab-pane fade<?php if($project == reset($projects)) echo ' active in';?>" id="tab3Content<?php echo $project->id;?>">
<div class="tab-pane fade<?php if($project->id == $this->session->project) echo ' active in';?>" id="tab3Content<?php echo $project->id;?>">
<div class="table-row">
<div class="col-5 text-middle text-center">
<div class="progress-pie inline-block space" data-value="<?php echo $project->progress;?>" data-doughnut-size="84">
+31 -12
View File
@@ -261,6 +261,7 @@ class bug extends control
$response['message'] = $this->lang->saveSuccess;
/* Set from param if there is a object to transfer bug. */
setcookie('lastBugModule', (int)$this->post->module, $this->config->cookieLife, $this->config->webRoot, '', false, false);
$bugResult = $this->bug->create($from = isset($fromObjectIDKey) ? $fromObjectIDKey : '');
if(!$bugResult or dao::isError())
{
@@ -299,8 +300,15 @@ class bug extends control
if(defined('RUN_MODE') && RUN_MODE == 'api') $this->send(array('status' => 'success', 'data' => $bugID));
setcookie('bugModule', (int)$this->post->module, 0, $this->config->webRoot, '', false, false);
$location = $this->createLink('bug', 'browse', "productID={$this->post->product}&branch=$branch&browseType=unclosed&param=0&orderBy=id_desc");
if(isset($output['projectID']))
{
$location = $this->createLink('project', 'bug', "projectID={$output['projectID']}");
}
else
{
setcookie('bugModule', 0, 0, $this->config->webRoot, '', false, false);
$location = $this->createLink('bug', 'browse', "productID={$this->post->product}&branch=$branch&browseType=unclosed&param=0&orderBy=id_desc");
}
if($this->app->getViewType() == 'xhtml') $location = $this->createLink('bug', 'view', "bugID=$bugID");
$response['locate'] = $location;
$this->send($response);
@@ -401,7 +409,7 @@ class bug extends control
$moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0, $branch);
if(empty($moduleOptionMenu)) die(js::locate(helper::createLink('tree', 'browse', "productID=$productID&view=story")));
$productList = $this->loadModel('block')->getProducts('noclosed', '');
$productList = $this->product->getOrderedProducts('all');
foreach($productList as $product) $products[$product->id] = $product->name;
/* Set custom. */
@@ -420,7 +428,7 @@ class bug extends control
$this->view->stories = $stories;
$this->view->projects = $this->product->getProjectPairs($productID, $branch ? "0,$branch" : 0, $params = 'nodeleted');
$this->view->builds = $builds;
$this->view->moduleID = $moduleID;
$this->view->moduleID = $moduleID ? $moduleID : (int)$this->cookie->lastBugModule;
$this->view->projectID = $projectID;
$this->view->taskID = $taskID;
$this->view->storyID = $storyID;
@@ -462,7 +470,9 @@ class bug extends control
if(!empty($_POST))
{
$actions = $this->bug->batchCreate($productID, $branch);
die(js::locate($this->session->bugList, 'parent'));
setcookie('bugModule', 0, 0, $this->config->webRoot, '', false, false);
die(js::locate($this->createLink('bug', 'browse', "productID={$productID}&branch=$branch&browseType=unclosed&param=0&orderBy=id_desc"), 'parent'));
}
/* Get product, then set menu. */
@@ -539,6 +549,7 @@ class bug extends control
/* Judge bug exits or not. */
$bug = $this->bug->getById($bugID, true);
if(!$bug) die(js::error($this->lang->notFound) . js::locate('back'));
$this->bug->checkBugProjectPriv($bug);
/* Update action. */
if($bug->assignedTo == $this->app->user->account) $this->loadModel('action')->read('bug', $bugID);
@@ -636,6 +647,7 @@ class bug extends control
$productID = $bug->product;
$projectID = $bug->project;
$currentModuleID = $bug->module;
$this->bug->checkBugProjectPriv($bug);
/* Set the menu. */
$this->bug->setMenu($this->products, $productID, $bug->branch);
@@ -819,6 +831,7 @@ class bug extends control
public function assignTo($bugID)
{
$bug = $this->bug->getById($bugID);
$this->bug->checkBugProjectPriv($bug);
/* Set menu. */
$this->bug->setMenu($this->products, $bug->product, $bug->branch);
@@ -952,8 +965,9 @@ class bug extends control
die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
}
$bug = $this->bug->getById($bugID);
$productID = $bug->product;
$bug = $this->bug->getById($bugID);
$productID = $bug->product;
$this->bug->checkBugProjectPriv($bug);
$this->bug->setMenu($this->products, $productID, $bug->branch);
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->confirmBug;
@@ -1036,6 +1050,7 @@ class bug extends control
if(!isset($users[$assignedTo])) $assignedTo = $this->bug->getModuleOwner($bug->module, $productID);
unset($this->lang->bug->resolutionList['tostory']);
$this->bug->checkBugProjectPriv($bug);
$this->bug->setMenu($this->products, $productID, $bug->branch);
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->resolve;
@@ -1102,8 +1117,9 @@ class bug extends control
die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
}
$bug = $this->bug->getById($bugID);
$productID = $bug->product;
$bug = $this->bug->getById($bugID);
$productID = $bug->product;
$this->bug->checkBugProjectPriv($bug);
$this->bug->setMenu($this->products, $productID, $bug->branch);
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->activate;
@@ -1148,8 +1164,9 @@ class bug extends control
}
}
$bug = $this->bug->getById($bugID);
$productID = $bug->product;
$bug = $this->bug->getById($bugID);
$productID = $bug->product;
$this->bug->checkBugProjectPriv($bug);
$this->bug->setMenu($this->products, $productID, $bug->branch);
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->close;
@@ -1176,6 +1193,7 @@ class bug extends control
/* Get bug and queryID. */
$bug = $this->bug->getById($bugID);
$queryID = ($browseType == 'bySearch') ? (int)$param : 0;
$this->bug->checkBugProjectPriv($bug);
/* Set the menu. */
$this->bug->setMenu($this->products, $bug->product, $bug->branch);
@@ -1278,6 +1296,7 @@ class bug extends control
public function confirmStoryChange($bugID)
{
$bug = $this->bug->getById($bugID);
$this->bug->checkBugProjectPriv($bug);
$this->dao->update(TABLE_BUG)->set('storyVersion')->eq($bug->latestStoryVersion)->where('id')->eq($bugID)->exec();
$this->loadModel('action')->create('bug', $bugID, 'confirmed', '', $bug->latestStoryVersion);
die(js::reload('parent'));
@@ -1304,7 +1323,7 @@ class bug extends control
if($bug->toTask != 0)
{
$task = $this->task->getById($bug->toTask);
if($task->deleted != '1')
if(!$task->deleted)
{
$confirmURL = $this->createLink('task', 'view', "taskID=$bug->toTask");
unset($_GET['onlybody']);
+1
View File
@@ -177,6 +177,7 @@ $lang->bug->confirmChangeProduct = "Change {$lang->productCommon} will cause li
$lang->bug->confirmDelete = 'Do you want to delete this bug?';
$lang->bug->remindTask = 'This Bug has been converted to Task. Do you want to update Status of Task(ID %s)?';
$lang->bug->skipClose = 'Bug %s is not resolved. You cannot close it.';
$lang->bug->projectAccessDenied = "You access to the {$lang->projectCommon} to which this bug belongs is denied!";
/* 模板。*/
$lang->bug->tplStep = "<p>[Steps]</p><br/>";
+1
View File
@@ -177,6 +177,7 @@ $lang->bug->confirmChangeProduct = "Tout changement aux {$lang->productCommon}
$lang->bug->confirmDelete = 'Voulez-vous supprimer ce bug ?';
$lang->bug->remindTask = 'Ce bug a été converti en tâche. Voulez-vous mettre à jour le statut de la Tâche(ID %s) ?';
$lang->bug->skipClose = 'Bug %s est actif. Vous ne pouvez pas le fermer.';
$lang->bug->projectAccessDenied = "You access to the {$lang->projectCommon} to which this bug belongs is denied!";
/* 模板。*/
$lang->bug->tplStep = "<p>[Etape]</p><br/>";
+1 -1
View File
@@ -370,7 +370,7 @@ $lang->bug->report->bugHistories->graph->xAxisName = '处理步骤';
/* 操作记录。*/
$lang->bug->action = new stdclass();
$lang->bug->action->resolved = array('main' => '$date, 由 <strong>$actor</strong> 解决,方案为 <strong>$extra</strong> $appendLink。', 'extra' => 'resolutionList');
$lang->bug->action->tostory = array('main' => '$date, 由 <strong>$actor</strong> 转为<strong>{$lang->storyCommon}</strong>,编号为 <strong>$extra</strong>。');
$lang->bug->action->tostory = array('main' => '$date, 由 <strong>$actor</strong> 转为<strong> ' .$lang->storyCommon. '</strong>,编号为 <strong>$extra</strong>。');
$lang->bug->action->totask = array('main' => '$date, 由 <strong>$actor</strong> 导入为<strong>任务</strong>,编号为 <strong>$extra</strong>。');
$lang->bug->action->linked2plan = array('main' => '$date, 由 <strong>$actor</strong> 关联到计划 <strong>$extra</strong>。');
$lang->bug->action->unlinkedfromplan = array('main' => '$date, 由 <strong>$actor</strong> 从计划 <strong>$extra</strong> 移除。');
+2 -1
View File
@@ -177,6 +177,7 @@ $lang->bug->confirmChangeProduct = "修改{$lang->productCommon}會導致相應
$lang->bug->confirmDelete = '您確認要刪除該Bug嗎?';
$lang->bug->remindTask = '該Bug已經轉化為任務,是否更新任務(編號:%s)狀態 ?';
$lang->bug->skipClose = 'Bug %s 不是已解決狀態,不能關閉。';
$lang->bug->projectAccessDenied = "您無權訪問該Bug所屬的{$lang->projectCommon}!";
/* 模板。*/
$lang->bug->tplStep = "<p>[步驟]</p><br/>";
@@ -369,7 +370,7 @@ $lang->bug->report->bugHistories->graph->xAxisName = '處理步驟';
/* 操作記錄。*/
$lang->bug->action = new stdclass();
$lang->bug->action->resolved = array('main' => '$date, 由 <strong>$actor</strong> 解決,方案為 <strong>$extra</strong> $appendLink。', 'extra' => 'resolutionList');
$lang->bug->action->tostory = array('main' => '$date, 由 <strong>$actor</strong> 轉為<strong>{$lang->storyCommon}</strong>,編號為 <strong>$extra</strong>。');
$lang->bug->action->tostory = array('main' => '$date, 由 <strong>$actor</strong> 轉為<strong> ' .$lang->storyCommon. '</strong>,編號為 <strong>$extra</strong>。');
$lang->bug->action->totask = array('main' => '$date, 由 <strong>$actor</strong> 導入為<strong>任務</strong>,編號為 <strong>$extra</strong>。');
$lang->bug->action->linked2plan = array('main' => '$date, 由 <strong>$actor</strong> 關聯到計劃 <strong>$extra</strong>。');
$lang->bug->action->unlinkedfromplan = array('main' => '$date, 由 <strong>$actor</strong> 從計劃 <strong>$extra</strong> 移除。');
+21 -10
View File
@@ -400,6 +400,24 @@ class bugModel extends model
return $bug;
}
/**
* Check bug project priv.
*
* @param object $bug
* @access public
* @return void
*/
public function checkBugProjectPriv($bug)
{
if($bug->project and !$this->loadModel('project')->checkPriv($bug->project))
{
echo(js::alert($this->lang->bug->projectAccessDenied));
$loginLink = $this->config->requestType == 'GET' ? "?{$this->config->moduleVar}=user&{$this->config->methodVar}=login" : "user{$this->config->requestFix}login";
if(strpos($this->server->http_referer, $loginLink) !== false) die(js::locate(helper::createLink('bug', 'index')));
die(js::locate('back'));
}
}
/**
* Get bugs of a module.
*
@@ -464,14 +482,6 @@ class bugModel extends model
->where('t1.id')->eq((int)$bugID)->fetch();
if(!$bug) return false;
if($bug->project and !$this->loadModel('project')->checkPriv($bug->project))
{
echo(js::alert($this->lang->bug->projectAccessDenied));
$loginLink = $this->config->requestType == 'GET' ? "?{$this->config->moduleVar}=user&{$this->config->methodVar}=login" : "user{$this->config->requestFix}login";
if(strpos($this->server->http_referer, $loginLink) !== false) die(js::locate(inlink('index')));
die(js::locate('back'));
}
$bug = $this->loadModel('file')->replaceImgURL($bug, 'steps');
if($setImgSize) $bug->steps = $this->file->setImgSize($bug->steps);
foreach($bug as $key => $value) if(strpos($key, 'Date') !== false and !(int)substr($value, 0, 4)) $bug->$key = '';
@@ -1678,6 +1688,7 @@ class bugModel extends model
$projects = $this->loadModel('project')->getPairs();
$maxLength = 12;
if(common::checkNotCN()) $maxLength = 22;
foreach($datas as $projectID => $data)
{
$data->name = isset($projects[$projectID]) ? $projects[$projectID] : $this->lang->report->undefined;
@@ -2301,12 +2312,12 @@ class bugModel extends model
if($branch and strpos($bugQuery, '`branch` =') === false) $bugQuery .= " AND `branch` in('0','$branch')";
if(strpos($bugQuery, $allBranch) !== false) $bugQuery = str_replace($allBranch, '1', $bugQuery);
/* Fix bug #2877. */
/* Fix bug #2878. */
if(strpos($bugQuery, '`resolvedDate`') !== false) $bugQuery .= " AND `resolvedDate` != '0000-00-00 00:00:00'";
if(strpos($bugQuery, '`closedDate`') !== false) $bugQuery .= " AND `closedDate` != '0000-00-00 00:00:00'";
$bugs = $this->dao->select('*')->from(TABLE_BUG)->where($bugQuery)
->andWhere('project')->in($this->app->user->view->projects)
->beginIF(!$this->app->user->admin)->andWhere('project')->in('0,' . $this->app->user->view->projects)->fi()
->andWhere('deleted')->eq(0)
->orderBy($orderBy)->page($pager)->fetchAll();
return $bugs;
+2 -2
View File
@@ -181,7 +181,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
</div>
</div>
<div class="main-col">
<div class="cell<?php if($browseType == 'bysearch') echo ' show';?>" id="queryBox"></div>
<div class="cell<?php if($browseType == 'bysearch') echo ' show';?>" id="queryBox" data-module='bug'></div>
<?php if(empty($bugs)):?>
<div class="table-empty-tip">
<p>
@@ -388,7 +388,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
</div>
<?php endif;?>
</div>
<div class="text"><?php echo $summary;?></div>
<div class="table-statistic"><?php echo $summary;?></div>
<?php $pager->show('right', 'pagerjs');?>
</div>
</form>
+1 -1
View File
@@ -20,7 +20,7 @@
<small class='text-muted'> <?php echo $lang->arrow . $lang->bug->linkBugs;?></small>
</h2>
</div>
<div id='queryBox' class='show divider'></div>
<div id='queryBox' data-module='bug' class='show divider'></div>
<?php if($bugs2Link):?>
<form class='main-table' method='post' data-ride='table' target='hiddenwin' id='linkBugsForm'>
<table class='table tablesorter' id='bugList'>
+8 -5
View File
@@ -154,14 +154,17 @@ class build extends control
$productGroups = $this->project->getProducts($build->project);
$products = array();
foreach($productGroups as $product) $products[$product->id] = $product->name;
if(empty($productGroups) and $build->product)
$this->loadModel('product');
if(!isset($productGroups[$build->product]))
{
$product = $this->loadModel('product')->getById($build->product);
$products[$product->id] = $product->name;
$product = $this->product->getById($build->product);
$product->branch = $build->branch;
$productGroups[$build->product] = $product;
}
$products = array();
foreach($productGroups as $product) $products[$product->id] = $product->name;
$this->view->title = $project->name . $this->lang->colon . $this->lang->build->edit;
$this->view->position[] = html::a($this->createLink('project', 'task', "projectID=$build->project"), $project->name);
$this->view->position[] = $this->lang->build->edit;
+9 -6
View File
@@ -12,17 +12,17 @@
$lang->build->common = "Build";
$lang->build->create = "Build erstellen";
$lang->build->edit = "Bearbeiten";
$lang->build->linkStory = "Story verknüpfen";
$lang->build->linkStory = "{$lang->storyCommon} verknüpfen";
$lang->build->linkBug = "Bug verknüpfen";
$lang->build->delete = "Build löschen";
$lang->build->deleted = "Gelöscht";
$lang->build->view = "Build Details";
$lang->build->batchUnlink = 'Batch Unlink';
$lang->build->batchUnlinkStory = 'Batch Story Unlink';
$lang->build->batchUnlinkStory = "Batch {$lang->storyCommon} Unlink";
$lang->build->batchUnlinkBug = 'Batch Bug Unlink';
$lang->build->confirmDelete = "Möchten Sie dieses Build löschen?";
$lang->build->confirmUnlinkStory = "Möchten Sie diese Story löschen?";
$lang->build->confirmUnlinkStory = "Möchten Sie diese {$lang->storyCommon} löschen?";
$lang->build->confirmUnlinkBug = "Möchten Sie die Verknüpfung zum Bug aufheben?";
$lang->build->basicInfo = 'Basis Info';
@@ -40,15 +40,18 @@ $lang->build->desc = 'Beschreibung';
$lang->build->files = 'Datei Upload';
$lang->build->last = 'Letztes Build';
$lang->build->packageType = 'Package Typ';
$lang->build->unlinkStory = 'Story Verknüpgung aufheben';
$lang->build->unlinkStory = "{$lang->storyCommon} Verknüpgung aufheben";
$lang->build->unlinkBug = 'Bug Verknüpgung aufheben';
$lang->build->stories = 'Abgeschlossene Story';
$lang->build->stories = "Abgeschlossene {$lang->storyCommon}";
$lang->build->bugs = 'Gelöster Bug';
$lang->build->generatedBugs = 'Left Bug';
$lang->build->noProduct = " <span style='color:red'>Dieses {$lang->projectCommon} ist nicht mit einem {$lang->productCommon} verknüpft, daher kann das Build nicht erstellt werden. Bitte erst <a href='%s'> {$lang->productCommon} verknüpfen.</a></span>";
$lang->build->noBuild = 'Keine Builds. ';
$lang->build->finishStories = ' %s Storys sind abgeschlossen.';
$lang->build->notice = new stdclass();
$lang->build->notice->changeProduct = "The {$lang->storyCommon} or Bug has been associated, and its product cannot be modified";
$lang->build->finishStories = " %s {$lang->storyCommon} sind abgeschlossen.";
$lang->build->resolvedBugs = ' %s Bugs sind gelöst.';
$lang->build->createdBugs = ' %s Bugs wurden erstellt.';
+9 -6
View File
@@ -12,17 +12,17 @@
$lang->build->common = "Build";
$lang->build->create = "Create Build";
$lang->build->edit = "Edit Build";
$lang->build->linkStory = "Link Story";
$lang->build->linkStory = "Link {$lang->storyCommon}";
$lang->build->linkBug = "Link Bug";
$lang->build->delete = "Delete Build";
$lang->build->deleted = "Deleted";
$lang->build->view = "Build Detail";
$lang->build->batchUnlink = 'Batch Unlink';
$lang->build->batchUnlinkStory = 'Batch Unlink Stories';
$lang->build->batchUnlinkStory = "Batch Unlink {$lang->storyCommon}";
$lang->build->batchUnlinkBug = 'Batch Unlink Bugs';
$lang->build->confirmDelete = "Do you want to delete this build?";
$lang->build->confirmUnlinkStory = "Do you want to unlink this Story?";
$lang->build->confirmUnlinkStory = "Do you want to unlink this {$lang->storyCommon}?";
$lang->build->confirmUnlinkBug = "Do you want to unlink this Bug?";
$lang->build->basicInfo = 'Basic Info';
@@ -40,15 +40,18 @@ $lang->build->desc = 'Description';
$lang->build->files = 'Files';
$lang->build->last = 'Last Build';
$lang->build->packageType = 'Package Type';
$lang->build->unlinkStory = 'Unlink Story';
$lang->build->unlinkStory = "Unlink {$lang->storyCommon}";
$lang->build->unlinkBug = 'Unlink Bug';
$lang->build->stories = 'Finished Stories';
$lang->build->stories = "Finished {$lang->storyCommon}";
$lang->build->bugs = 'Resolved Bugs';
$lang->build->generatedBugs = 'Reported Bugs';
$lang->build->noProduct = " <span style='color:red'>This {$lang->projectCommon} is not linked to {$lang->productCommon}, so the Build cannot be created. Please first <a href='%s'> link {$lang->productCommon}</a></span>";
$lang->build->noBuild = 'No builds yet.';
$lang->build->finishStories = ' Finished Story %s';
$lang->build->notice = new stdclass();
$lang->build->notice->changeProduct = "The {$lang->storyCommon} or Bug has been associated, and its product cannot be modified";
$lang->build->finishStories = " Finished {$lang->storyCommon} %s";
$lang->build->resolvedBugs = ' Resolved Bug %s';
$lang->build->createdBugs = ' Reported Bug %s';
+8 -5
View File
@@ -12,17 +12,17 @@
$lang->build->common = "Build";
$lang->build->create = "Créer Build";
$lang->build->edit = "Editer Build";
$lang->build->linkStory = "Intégrer Story";
$lang->build->linkStory = "Intégrer {$lang->storyCommon}";
$lang->build->linkBug = "Intégrer Bug";
$lang->build->delete = "Supprimer Build";
$lang->build->deleted = "Supprimé";
$lang->build->view = "Détail Build";
$lang->build->batchUnlink = 'Retirer par Lot';
$lang->build->batchUnlinkStory = 'Retirer Sories par Lot';
$lang->build->batchUnlinkStory = "Retirer {$lang->storyCommon} par Lot";
$lang->build->batchUnlinkBug = 'Retirer Bugs par Lot';
$lang->build->confirmDelete = "Voulez-vous supprimer ce build ?";
$lang->build->confirmUnlinkStory = "Voulez-vous retirer cette Story du Build ?";
$lang->build->confirmUnlinkStory = "Voulez-vous retirer cette {$lang->storyCommon} du Build ?";
$lang->build->confirmUnlinkBug = "Voulez-vous retirer ce Bug du Build ?";
$lang->build->basicInfo = 'Infos de Base';
@@ -40,7 +40,7 @@ $lang->build->desc = 'Description';
$lang->build->files = 'Fichiers';
$lang->build->last = 'Dernier Build';
$lang->build->packageType = 'Type de Package';
$lang->build->unlinkStory = 'Retirer Story';
$lang->build->unlinkStory = "Retirer {$lang->storyCommon}";
$lang->build->unlinkBug = 'Retirer Bug';
$lang->build->stories = 'Stories terminées';
$lang->build->bugs = 'Bugs Résolus';
@@ -48,7 +48,10 @@ $lang->build->generatedBugs = 'Bugs signalés';
$lang->build->noProduct = " <span style='color:red'>Ce {$lang->projectCommon} n'est pas associé à un {$lang->productCommon}, le Build ne peut pas être créé. Commencez par <a href='%s'>rattacher le projet à un {$lang->productCommon}</a></span>";
$lang->build->noBuild = 'Aucun builds.';
$lang->build->finishStories = ' Stories Terminées %s';
$lang->build->notice = new stdclass();
$lang->build->notice->changeProduct = "The {$lang->storyCommon} or Bug has been associated, and its product cannot be modified";
$lang->build->finishStories = " {$lang->storyCommon} Terminées %s";
$lang->build->resolvedBugs = ' Bugs Résolus %s';
$lang->build->createdBugs = ' Bugs Signalés %s';
+3
View File
@@ -48,6 +48,9 @@ $lang->build->generatedBugs = '產生的Bug';
$lang->build->noProduct = " <span style='color:red'>該{$lang->projectCommon}沒有關聯{$lang->productCommon},無法創建版本,請先<a href='%s'>關聯{$lang->productCommon}</a></span>";
$lang->build->noBuild = '暫時沒有版本。';
$lang->build->notice = new stdclass();
$lang->build->notice->changeProduct = "已經關聯{$lang->storyCommon}或Bug的版本,不能修改其所屬產品";
$lang->build->finishStories = " 本次共完成 %s 個{$lang->storyCommon}";
$lang->build->resolvedBugs = ' 本次共解決 %s 個Bug';
$lang->build->createdBugs = ' 本次共產生 %s 個Bug';
+1
View File
@@ -242,6 +242,7 @@ class buildModel extends model
->remove('allchecker,resolvedBy,files,labels,uid')
->get();
if($this->config->global->flow == 'onlyTest') $this->config->build->edit->requiredFields = str_replace('project,', '', $this->config->build->edit->requiredFields);
$build = $this->loadModel('file')->processImgURL($build, $this->config->build->editor->edit['id'], $this->post->uid);
$this->dao->update(TABLE_BUILD)->data($build)
->autoCheck()
+1 -1
View File
@@ -44,7 +44,7 @@
<td><?php echo html::input('name', '', "class='form-control' required");?></td>
<td class='text-muted'>
<?php if($lastBuild):?>
<div class='help-block'> &nbsp; <?php echo $lang->build->last . ': <a class="code label label-badge label-light" id="lastBuildBtn" href="javascript:;">' . $lastBuild->name . '</a>';?></div>
<div class='help-block'> &nbsp; <?php echo $lang->build->last . ': <a class="code label label-badge label-light" id="lastBuildBtn">' . $lastBuild->name . '</a>';?></div>
<?php endif;?>
</td>
</tr>
+2 -2
View File
@@ -10,7 +10,7 @@
* @link http://www.zentao.net
*/
?>
<div id='queryBox' class='show'></div>
<div id='queryBox' data-module='bug' class='show'></div>
<div id='unlinkBugList'>
<form class='main-table table-bug' data-ride='table' method='post' id='unlinkedBugsForm' target='hiddenwin' action='<?php echo $this->createLink('build', 'linkBug', "buildID={$build->id}&browseType=$browseType&param=$param");?>'>
<div class='table-header hl-primary text-primary strong'>
@@ -66,7 +66,7 @@
<div class="btn-toolbar">
<?php echo html::a(inlink('view', "buildID={$build->id}&type=bug"), $lang->goback, '', "class='btn'");?>
</div>
<div class='text'></div>
<div class='table-statistic'></div>
</div>
<?php endif;?>
</form>
+2 -2
View File
@@ -10,7 +10,7 @@
* @link http://www.zentao.net
*/
?>
<div id='queryBox' class='show'></div>
<div id='queryBox' data-module='story' class='show'></div>
<div id='unlinkStoryList'>
<form class='main-table table-story' data-ride='table' method='post' id='unlinkedStoriesForm' target='hiddenwin' action='<?php echo $this->createLink('build', 'linkStory', "buildID={$build->id}&browseType=$browseType&param=$param");?>'>
<div class='table-header hl-primary text-primary strong'>
@@ -70,7 +70,7 @@
<div class="btn-toolbar">
<?php echo html::a(inlink('view', "buildID={$build->id}&type=story"), $lang->goback, '', "class='btn'");?>
</div>
<div class='text'></div>
<div class='table-statistic'></div>
</div>
<?php endif;?>
</form>
+1 -1
View File
@@ -160,7 +160,7 @@ tbody tr td:first-child input{display:none;}
<?php echo html::submitButton($lang->build->batchUnlink, '', 'btn');?>
</div>
<?php endif;?>
<div class='text'><?php echo sprintf($lang->build->finishStories, $countStories);?></div>
<div class='table-statistic'><?php echo sprintf($lang->build->finishStories, $countStories);?></div>
</div>
<?php endif;?>
</form>
+2 -1
View File
@@ -241,6 +241,7 @@ class caselib extends control
{
$this->loadModel('testcase');
$this->config->testcase->create->requiredFields = $this->config->caselib->createcase->requiredFields;
setcookie('lastLibCaseModule', (int)$this->post->module, $this->config->cookieLife, $this->config->webRoot, '', false, false);
$caseResult = $this->testcase->create($bugID = 0);
if(!$caseResult or dao::isError()) die(js::error(dao::getError()));
@@ -304,7 +305,7 @@ class caselib extends control
$this->view->customFields = $customFields;
$this->view->libraries = $libraries;
$this->view->libID = $libID;
$this->view->currentModuleID = (int)$moduleID;
$this->view->currentModuleID = $moduleID ? (int)$moduleID : $this->cookie->lastLibCaseModule;
$this->view->caseTitle = $caseTitle;
$this->view->type = $type;
$this->view->stage = $stage;
+7 -3
View File
@@ -27,9 +27,13 @@ $lang->caselib->import = 'Import';
$lang->caselib->importAction = 'Import Case';
$lang->caselib->showImport = 'Imported Data';
$lang->caselib->id = 'ID';
$lang->caselib->name = 'Name';
$lang->caselib->desc = 'Description';
$lang->caselib->id = 'ID';
$lang->caselib->name = 'Name';
$lang->caselib->desc = 'Description';
$lang->caselib->addedBy = 'CreatedBy';
$lang->caselib->addedDate = 'CreatedDate';
$lang->caselib->lastEditedBy = 'LastEditedBy';
$lang->caselib->lastEditedDate = 'LastEditedDate';
$lang->caselib->legendDesc = 'Description';
+7 -3
View File
@@ -27,9 +27,13 @@ $lang->caselib->import = 'Import';
$lang->caselib->importAction = 'Import Case';
$lang->caselib->showImport = 'Imported Data';
$lang->caselib->id = 'ID';
$lang->caselib->name = 'Name';
$lang->caselib->desc = 'Description';
$lang->caselib->id = 'ID';
$lang->caselib->name = 'Name';
$lang->caselib->desc = 'Description';
$lang->caselib->addedBy = 'CreatedBy';
$lang->caselib->addedDate = 'CreatedDate';
$lang->caselib->lastEditedBy = 'LastEditedBy';
$lang->caselib->lastEditedDate = 'LastEditedDate';
$lang->caselib->legendDesc = 'Description';
+7 -3
View File
@@ -27,9 +27,13 @@ $lang->caselib->import = 'Import';
$lang->caselib->importAction = 'Import Case';
$lang->caselib->showImport = 'Imported Data';
$lang->caselib->id = 'ID';
$lang->caselib->name = 'Name';
$lang->caselib->desc = 'Description';
$lang->caselib->id = 'ID';
$lang->caselib->name = 'Name';
$lang->caselib->desc = 'Description';
$lang->caselib->addedBy = 'CreatedBy';
$lang->caselib->addedDate = 'CreatedDate';
$lang->caselib->lastEditedBy = 'LastEditedBy';
$lang->caselib->lastEditedDate = 'LastEditedDate';
$lang->caselib->legendDesc = 'Description';
+7 -3
View File
@@ -27,9 +27,13 @@ $lang->caselib->import = '导入';
$lang->caselib->importAction = '导入用例';
$lang->caselib->showImport = '显示导入数据';
$lang->caselib->id = '编号';
$lang->caselib->name = '名称';
$lang->caselib->desc = '描述';
$lang->caselib->id = '编号';
$lang->caselib->name = '名称';
$lang->caselib->desc = '描述';
$lang->caselib->addedBy = '由谁创建';
$lang->caselib->addedDate = '创建时间';
$lang->caselib->lastEditedBy = '最后编辑人';
$lang->caselib->lastEditedDate = '最后编辑时间';
$lang->caselib->legendDesc = '描述';
+1 -1
View File
@@ -81,7 +81,7 @@ js::set('flow', $config->global->flow);
</div>
</div>
<div class="main-col">
<div id='queryBox' class='cell <?php if($browseType =='bysearch') echo 'show';?>'></div>
<div id='queryBox' data-module='caselib' class='cell <?php if($browseType =='bysearch') echo 'show';?>'></div>
<?php if(empty($cases)):?>
<div class="table-empty-tip">
<p>
+9 -1
View File
@@ -121,7 +121,8 @@ $lang->menu = new stdclass();
$lang->menu->my = '<span>Dashboard</span>|my|index';
$lang->menu->product = $lang->productCommon . '|product|index|locate=no';
$lang->menu->project = $lang->projectCommon . '|project|index|locate=no';
$lang->menu->qa = 'QS|qa|index';
$lang->menu->qa = 'Test|qa|index';
$lang->menu->repo = 'Code|repo|log';
$lang->menu->doc = 'Dokumente|doc|index';
$lang->menu->report = 'Berichte|report|index';
$lang->menu->company = 'Unternehmen|company|index';
@@ -330,6 +331,12 @@ $lang->caselib->menu->testsuite = array('link' => 'Suite|testsuite|browse|');
$lang->caselib->menu->report = array('link' => 'Berichte|testreport|browse|');
$lang->caselib->menu->caselib = array('link' => 'Bibliothek|caselib|browse|libID=%s', 'alias' => 'create,createcase,view,edit,batchcreatecase,showimport', 'subModule' => 'tree,testcase');
$lang->repo = new stdclass();
$lang->repo->menu = new stdclass();
$lang->repo->menu->browse = array('link' =>'Browse|repo|log|repoID=%s&entry=', 'alias' => 'diff,view,revision,showsynccomment');
$lang->repo->menu->settings = 'Settings|repo|settings|repoID=%s';
$lang->repo->menu->delete = array('link' => 'Delete|repo|delete|repoID=%s', 'target' => 'hiddenwin');
/* 文档视图菜单设置。*/
$lang->doc = new stdclass();
$lang->doc->menu = new stdclass();
@@ -342,6 +349,7 @@ $lang->git = new stdclass();
$lang->report = new stdclass();
$lang->report->menu = new stdclass();
$lang->report->menu->annual = array('link' => 'Annual Summary|report|annualData', 'target' => '_blank');
$lang->report->menu->product = array('link' => $lang->productCommon . '|report|productsummary');
$lang->report->menu->prj = array('link' => $lang->projectCommon . '|report|projectdeviation');
$lang->report->menu->test = array('link' => 'Test|report|bugcreate', 'alias' => 'bugassign');
+4 -3
View File
@@ -121,8 +121,8 @@ $lang->menu = new stdclass();
$lang->menu->my = '<span>Dashboard</span>|my|index';
$lang->menu->product = $lang->productCommon . '|product|index|locate=no';
$lang->menu->project = $lang->projectCommon . '|project|index|locate=no';
$lang->menu->qa = 'QA|qa|index';
$lang->menu->devops = 'CI|repo|browse';
$lang->menu->qa = 'Test|qa|index';
$lang->menu->repo = 'CI|repo|browse';
$lang->menu->doc = 'Doc|doc|index';
$lang->menu->report = 'Report|report|index';
$lang->menu->company = 'Company|company|index';
@@ -334,7 +334,6 @@ $lang->caselib->menu->caselib = array('link' => 'Case Library|caselib|browse|l
$lang->repo = new stdclass();
$lang->repo->menu = new stdclass();
$lang->repo->menu->browse = array('link' =>'Browse|repo|browse|repoID=%s', 'alias' => 'diff,view,revision,log,blame,showsynccomment');
$lang->repo->menu->review = array('link' =>'Review|repo|review|repoID=%s', 'alias' => '');
$lang->repo->menu->maintain = array('link' =>'Repo|repo|maintain', 'alias' => 'create,edit');
$lang->repo->menu->job = array('link' =>'Build|ci|browsejob', 'alias' => 'createjob,editjob,browsebuild,viewbuildlogs');
$lang->repo->menu->jenkins = array('link' =>'Jenkins|jenkins|browse', 'alias' => 'create,edit');
@@ -355,6 +354,7 @@ $lang->git = new stdclass();
$lang->report = new stdclass();
$lang->report->menu = new stdclass();
$lang->report->menu->annual = array('link' => 'Annual Summary|report|annualData', 'target' => '_blank');
$lang->report->menu->product = array('link' => $lang->productCommon . '|report|productsummary');
$lang->report->menu->prj = array('link' => $lang->projectCommon . '|report|projectdeviation');
$lang->report->menu->test = array('link' => 'Request|report|bugcreate', 'alias' => 'bugassign');
@@ -892,6 +892,7 @@ if(isset($config->global->flow) and $config->global->flow == 'onlyTest')
/* Adjust menu group. */
$lang->menugroup->bug = 'bug';
$lang->menugroup->testcase = 'testcase';
$lang->menugroup->case = 'testcase';
$lang->menugroup->testtask = 'testtask';
$lang->menugroup->testsuite = 'testsuite';
$lang->menugroup->caselib = 'caselib';
+9 -1
View File
@@ -121,7 +121,8 @@ $lang->menu = new stdclass();
$lang->menu->my = '<span>Dashboard</span>|my|index';
$lang->menu->product = $lang->productCommon . '|product|index|locate=no';
$lang->menu->project = $lang->projectCommon . '|project|index|locate=no';
$lang->menu->qa = 'QA|qa|index';
$lang->menu->qa = 'Test|qa|index';
$lang->menu->repo = 'Code|repo|log';
$lang->menu->doc = 'Doc|doc|index';
$lang->menu->report = 'Rapports|report|index';
$lang->menu->company = 'Entreprise|company|index';
@@ -330,6 +331,12 @@ $lang->caselib->menu->testsuite = array('link' => 'Cahier Recette|testsuite|brow
$lang->caselib->menu->report = array('link' => 'Rapport|testreport|browse|');
$lang->caselib->menu->caselib = array('link' => 'Library Recette|caselib|browse|libID=%s', 'alias' => 'create,createcase,view,edit,batchcreatecase,showimport', 'subModule' => 'tree,testcase');
$lang->repo = new stdclass();
$lang->repo->menu = new stdclass();
$lang->repo->menu->browse = array('link' =>'Browse|repo|log|repoID=%s&entry=', 'alias' => 'diff,view,revision,showsynccomment');
$lang->repo->menu->settings = 'Settings|repo|settings|repoID=%s';
$lang->repo->menu->delete = array('link' => 'Delete|repo|delete|repoID=%s', 'target' => 'hiddenwin');
/* Doc menu settings. */
$lang->doc = new stdclass();
$lang->doc->menu = new stdclass();
@@ -342,6 +349,7 @@ $lang->git = new stdclass();
$lang->report = new stdclass();
$lang->report->menu = new stdclass();
$lang->report->menu->annual = array('link' => 'Annual Summary|report|annualData', 'target' => '_blank');
$lang->report->menu->product = array('link' => $lang->productCommon . '|report|productsummary');
$lang->report->menu->prj = array('link' => $lang->projectCommon . '|report|projectdeviation');
$lang->report->menu->test = array('link' => 'Recette|report|bugcreate', 'alias' => 'bugassign');
+5 -4
View File
@@ -94,10 +94,11 @@ $lang->doc->menuOrder[25] = 'index';
$lang->doc->menuOrder[30] = 'create';
/* report menu order. */
$lang->report->menuOrder[5] = 'product';
$lang->report->menuOrder[10] = 'prj';
$lang->report->menuOrder[15] = 'test';
$lang->report->menuOrder[20] = 'staff';
$lang->report->menuOrder[5] = 'annual';
$lang->report->menuOrder[10] = 'product';
$lang->report->menuOrder[15] = 'prj';
$lang->report->menuOrder[20] = 'test';
$lang->report->menuOrder[25] = 'staff';
/* company menu order. */
$lang->company->menuOrder[5] = 'browseUser';
+1 -1
View File
@@ -101,7 +101,6 @@ $lang->loading = '稍候...';
$lang->notFound = '抱歉,您访问的对象并不存在!';
$lang->notPage = '抱歉,您访问的功能正在开发中!';
$lang->showAll = '[[全部显示]]';
$lang->selectedItems = '已选择 <strong>{0}</strong> 项';
$lang->future = '未来';
$lang->year = '年';
@@ -356,6 +355,7 @@ $lang->git = new stdclass();
$lang->report = new stdclass();
$lang->report->menu = new stdclass();
$lang->report->menu->annual = array('link' => '年度总结|report|annualData', 'target' => '_blank');
$lang->report->menu->product = array('link' => $lang->productCommon . '|report|productsummary');
$lang->report->menu->prj = array('link' => $lang->projectCommon . '|report|projectdeviation');
$lang->report->menu->test = array('link' => '测试|report|bugcreate', 'alias' => 'bugassign');
+10 -2
View File
@@ -99,7 +99,7 @@ $lang->selectAll = '全選';
$lang->selectReverse = '反選';
$lang->loading = '稍候...';
$lang->notFound = '抱歉,您訪問的對象並不存在!';
$lang->notPage = '抱歉,您訪問的功能正在開發中!';
$lang->notPage = '抱歉,您訪問的功能正在開發中!';
$lang->showAll = '[[全部顯示]]';
$lang->future = '未來';
@@ -122,6 +122,7 @@ $lang->menu->my = '<span> 我的地盤</span>|my|index';
$lang->menu->product = $lang->productCommon . '|product|index|locate=no';
$lang->menu->project = $lang->projectCommon . '|project|index|locate=no';
$lang->menu->qa = '測試|qa|index';
$lang->menu->repo = '代碼|repo|log';
$lang->menu->doc = '文檔|doc|index';
$lang->menu->report = '統計|report|index';
$lang->menu->company = '組織|company|index';
@@ -328,7 +329,13 @@ $lang->caselib->menu->testcase = array('link' => '用例|testcase|browse|');
$lang->caselib->menu->testtask = array('link' => '測試單|testtask|browse|');
$lang->caselib->menu->testsuite = array('link' => '套件|testsuite|browse|');
$lang->caselib->menu->report = array('link' => '報告|testreport|browse|');
$lang->caselib->menu->caselib = array('link' => '用例庫|caselib|browse', 'alias' => 'create,createcase,view,edit,batchcreatecase,showimport', 'subModule' => 'tree,testcase');
$lang->caselib->menu->caselib = array('link' => '用例庫|caselib|browse|libID=%s', 'alias' => 'create,createcase,view,edit,batchcreatecase,showimport', 'subModule' => 'tree,testcase');
$lang->repo = new stdclass();
$lang->repo->menu = new stdclass();
$lang->repo->menu->browse = array('link' =>'瀏覽|repo|log|repoID=%s&entry=', 'alias' => 'diff,view,revision,showsynccomment');
$lang->repo->menu->settings = '設置|repo|settings|repoID=%s';
$lang->repo->menu->delete = array('link' => '刪除|repo|delete|repoID=%s', 'target' => 'hiddenwin');
/* 文檔視圖菜單設置。*/
$lang->doc = new stdclass();
@@ -342,6 +349,7 @@ $lang->git = new stdclass();
$lang->report = new stdclass();
$lang->report->menu = new stdclass();
$lang->report->menu->annual = array('link' => '年度總結|report|annualData', 'target' => '_blank');
$lang->report->menu->product = array('link' => $lang->productCommon . '|report|productsummary');
$lang->report->menu->prj = array('link' => $lang->projectCommon . '|report|projectdeviation');
$lang->report->menu->test = array('link' => '測試|report|bugcreate', 'alias' => 'bugassign');
+16 -3
View File
@@ -172,6 +172,7 @@ class commonModel extends model
if($module == 'tutorial') return true;
if($module == 'block') return true;
if($module == 'product' and $method == 'showerrornone') return true;
if($module == 'report' and $method == 'annualdata') return true;
}
return false;
}
@@ -661,7 +662,11 @@ class commonModel extends model
echo '<li>' . html::a(helper::createLink('my', 'index'), $lang->zentaoPMS) . '</li>';
if($moduleName != 'index')
{
if(!isset($lang->menu->$mainMenu)) return;
if(!isset($lang->menu->$mainMenu))
{
echo "</ul>";
return;
}
$menuLink = $lang->menu->$mainMenu;
list($menuLabel, $module, $method) = explode('|', $menuLink);
echo '<li>' . html::a(helper::createLink($module, $method), $menuLabel) . '</li>';
@@ -748,8 +753,8 @@ class commonModel extends model
public static function printOrderLink($fieldName, $orderBy, $vars, $label, $module = '', $method = '')
{
global $lang, $app;
if(empty($module)) $module = $app->getModuleName();
if(empty($method)) $method = $app->getMethodName();
if(empty($module)) $module = isset($app->rawModule) ? $app->rawModule : $app->getModuleName();
if(empty($method)) $method = isset($app->rawMethod) ? $app->rawMethod : $app->getMethodName();
$className = 'header';
$isMobile = $app->viewType === 'mhtml';
@@ -1410,6 +1415,12 @@ EOD;
{
$module = $this->app->getModuleName();
$method = $this->app->getMethodName();
if($this->app->isFlow)
{
$module = $this->app->rawModule;
$method = $this->app->rawMethod;
}
if(!empty($this->app->user->modifyPassword) and (($module != 'my' or $method != 'changepassword') and ($module != 'user' or $method != 'logout'))) die(js::locate(helper::createLink('my', 'changepassword')));
if($this->isOpenMethod($module, $method)) return true;
if(!$this->loadModel('user')->isLogon() and $this->server->php_auth_user) $this->user->identifyByPhpAuth();
@@ -1450,6 +1461,8 @@ EOD;
$module = strtolower($module);
$method = strtolower($method);
if((($app->user->account != 'guest') or ($app->company->guest and $app->user->account == 'guest')) and $module == 'report' and $method == 'annualdata') return true;
if(isset($rights[$module][$method]))
{
if(!commonModel::hasDBPriv($object, $module, $method)) return false;
-1
View File
@@ -2,7 +2,6 @@
if($extView = $this->getExtViewFile(__FILE__)){include $extView; return helper::cd();}
include 'header.lite.html.php';
include 'chosen.html.php';
include 'pager.html.php';
//include 'validation.html.php';
?>
<?php
+6 -3
View File
@@ -1,15 +1,16 @@
<?php if($extView = $this->getExtViewFile(__FILE__)){include $extView; return helper::cd();}?>
<?php
$clientLang = $app->getClientLang();
$webRoot = $this->app->getWebRoot();
$jsRoot = $webRoot . "js/";
$themeRoot = $webRoot . "theme/";
$defaultTheme = $webRoot . 'theme/default/';
$langTheme = $themeRoot . 'lang/' . $app->getClientLang() . '.css';
$langTheme = $themeRoot . 'lang/' . $clientLang . '.css';
$clientTheme = $this->app->getClientTheme();
$onlybody = zget($_GET, 'onlybody', 'no');
?>
<!DOCTYPE html>
<html lang='<?php echo $app->getClientLang();?>'>
<html lang='<?php echo $clientLang;?>'>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
@@ -22,7 +23,7 @@ $onlybody = zget($_GET, 'onlybody', 'no');
if($config->debug)
{
$timestamp = time();
css::import($themeRoot . 'zui/css/min.css?t=' . $timestamp);
css::import($defaultTheme . 'style.css?t=' . $timestamp);
@@ -31,6 +32,7 @@ $onlybody = zget($_GET, 'onlybody', 'no');
js::import($jsRoot . 'jquery/lib.js');
js::import($jsRoot . 'zui/min.js?t=' . $timestamp);
if($clientLang === 'ja') js::import($jsRoot . 'zui/lang.' . $clientLang . '.min.js?t=' . $timestamp);
js::import($jsRoot . 'my.full.js?t=' . $timestamp);
}
@@ -40,6 +42,7 @@ $onlybody = zget($_GET, 'onlybody', 'no');
if(!file_exists($this->app->getThemeRoot() . 'default/' . $this->cookie->lang . '.' . $this->cookie->theme . '.css')) $minCssFile = $defaultTheme . 'en.' . $this->cookie->theme . '.css';
css::import($minCssFile);
js::import($jsRoot . 'all.js');
if($clientLang === 'ja') js::import($jsRoot . 'zui/lang.' . $clientLang . '.min.js');
}
if($this->app->getViewType() == 'xhtml') css::import($defaultTheme . 'x.style.css');
+1 -1
View File
@@ -50,7 +50,7 @@ $uid = uniqid('');
uploadJson: createLink('file', 'ajaxUpload', 'uid=' + kuid),
allowFileManager: true,
langType: '<?php echo $editorLang?>',
cssData: 'html,body {background: none}.article-content, .article-content table td, .article-content table th {line-height: 1.3846153846; font-size: 13px;}.article-content .table-auto {width: auto!important; max-width: 100%;}',
cssData: 'html,body {background: none}.article-content{overflow:visible}.article-content, .article-content table td, .article-content table th {line-height: 1.3846153846; font-size: 13px;}.article-content .table-auto {width: auto!important; max-width: 100%;}',
placeholderStyle: {fontSize: '13px', color: '#888'},
pasteImage: {postUrl: createLink('file', 'ajaxPasteImage', 'uid=' + kuid), placeholder: <?php echo json_encode($lang->noticePasteImg);?>},
syncAfterBlur: true,
-27
View File
@@ -1,27 +0,0 @@
<script>
$.extend($.fn.pager.Constructor.LANG,
{
'<?php echo $app->getClientLang();?>':
{
'pageOfText': "<?php echo $lang->pager->pageOfText;?>",
'prev': "<?php echo $lang->pager->previousPage;?>",
'next': "<?php echo $lang->pager->nextPage;?>",
'first': "<?php echo $lang->pager->firstPage;?>",
'last': "<?php echo $lang->pager->lastPage;?>",
'goto': "<?php echo $lang->pager->goto;?>",
'pageOf': "<?php echo $lang->pager->pageOf;?>",
'totalPage': "<?php echo $lang->pager->totalPage;?>",
'totalCount': "<?php echo $lang->pager->totalCount;?>",
'pageSize': "<?php echo $lang->pager->pageSize;?>",
'itemsRange': "<?php echo $lang->pager->itemsRange;?>",
'pageOfTotal': "<?php echo $lang->pager->pageOfTotal;?>"
}
});
$.extend($.fn.colorPicker.Constructor.LANG,
{
'<?php echo $app->getClientLang();?>':
{
'errorTip': "<?php echo $lang->colorPicker->errorTip;?>"
}
});
</script>
+1 -1
View File
@@ -52,7 +52,7 @@ js::set('confirmDelete', $lang->user->confirmDelete);
</div>
</div>
<div class='main-col'>
<div class="cell" id="queryBox"></div>
<div class="cell" id="queryBox" data-module='user'></div>
<form class='main-table table-user' data-ride='table' action='<?php echo $this->createLink('user', 'batchEdit', "deptID=$deptID")?>' method='post' id='userListForm'>
<?php $canBatchEdit = common::hasPriv('user', 'batchEdit');?>
<table class='table has-sort-head' id='userList'>
+1 -1
View File
@@ -34,7 +34,7 @@
</div>
</div>
<div id='queryBox' class='cell <?php if($browseType =='bysearch') echo 'show';?>'></div>
<div id='queryBox' data-module='action' class='cell <?php if($browseType =='bysearch') echo 'show';?>'></div>
<div id='mainContent' class='main-content'>
<div id='dynamics'>
<?php $firstAction = '';?>
+1 -1
View File
@@ -49,7 +49,7 @@ class cronModel extends model
{
$this->app->loadClass('crontab', true);
$parsedCron = array();
$parsedCrons = array();
foreach($crons as $cron)
{
$row = "{$cron->m} {$cron->h} {$cron->dom} {$cron->mon} {$cron->dow} {$cron->command}";
+4
View File
@@ -108,6 +108,10 @@ $lang->dev->tableList['userview'] = 'User Privilege';
$lang->dev->tableList['im_chatuser'] = 'Client Users';
$lang->dev->tableList['im_message'] = 'Client Messages';
$lang->dev->tableList['im_messagestatus'] = 'Client Messages Status';
$lang->dev->tableList['repo'] = 'Code';
$lang->dev->tableList['repohistory'] = 'Repo History';
$lang->dev->tableList['repofiles'] = 'Repo Files';
$lang->dev->tableList['repobranch'] = 'Repo Branch';
$lang->dev->groupList['my'] = 'Dashboard';
$lang->dev->groupList['product'] = $lang->productCommon;
+4
View File
@@ -108,6 +108,10 @@ $lang->dev->tableList['userview'] = 'User Privilege';
$lang->dev->tableList['im_chatuser'] = 'Client Users';
$lang->dev->tableList['im_message'] = 'Client Messages';
$lang->dev->tableList['im_messagestatus'] = 'Client Messages Status';
$lang->dev->tableList['repo'] = 'Code';
$lang->dev->tableList['repohistory'] = 'Repo History';
$lang->dev->tableList['repofiles'] = 'Repo Files';
$lang->dev->tableList['repobranch'] = 'Repo Branch';
$lang->dev->groupList['my'] = 'Dashboard';
$lang->dev->groupList['product'] = $lang->productCommon;
+4
View File
@@ -108,6 +108,10 @@ $lang->dev->tableList['userview'] = 'Droits Utilisateur';
$lang->dev->tableList['im_chatuser'] = 'Utilisateurs Client';
$lang->dev->tableList['im_message'] = 'Messages Client';
$lang->dev->tableList['im_messagestatus'] = 'Statut Messages Client';
$lang->dev->tableList['repo'] = 'Code';
$lang->dev->tableList['repohistory'] = 'Repo History';
$lang->dev->tableList['repofiles'] = 'Repo Files';
$lang->dev->tableList['repobranch'] = 'Repo Branch';
$lang->dev->groupList['my'] = 'Dashboard';
$lang->dev->groupList['product'] = $lang->productCommon;
-1
View File
@@ -123,7 +123,6 @@ $lang->dev->groupList['company'] = '组织';
$lang->dev->groupList['repo'] = '代码';
$lang->dev->groupList['api'] = 'API';
$lang->dev->groupList['message'] = '消息';
$lang->dev->groupList['repo'] = '代码';
$lang->dev->endGroupList['admin'] = '后台';
$lang->dev->endGroupList['system'] = '系统';
+4
View File
@@ -108,6 +108,10 @@ $lang->dev->tableList['userview'] = '可訪問權限';
$lang->dev->tableList['im_chatuser'] = '客戶端用戶';
$lang->dev->tableList['im_message'] = '客戶端消息';
$lang->dev->tableList['im_messagestatus'] = '客戶端狀態';
$lang->dev->tableList['repo'] = '代碼';
$lang->dev->tableList['repohistory'] = '版本歷史';
$lang->dev->tableList['repofiles'] = '代碼檔案';
$lang->dev->tableList['repobranch'] = '代碼分支';
$lang->dev->groupList['my'] = '我的地盤';
$lang->dev->groupList['product'] = $lang->productCommon;
+2
View File
@@ -18,6 +18,8 @@ class devModel extends model
$table = current($table);
if(empty($this->config->db->prefix) or strpos($table, $this->config->db->prefix) !== false)
{
if(strpos($table, $this->config->db->prefix . 'flow_') === 0) continue;
$subTable = substr($table, strpos($table, '_') + 1);
$group = zget($this->config->dev->group, $subTable, 'other');
$tables[$group][$subTable] = $table;
+43 -3
View File
@@ -37,6 +37,9 @@ class doc extends control
*/
public function index()
{
$this->from = 'doc';
setcookie('from', 'doc', $this->config->cookieLife, $this->config->webRoot, '', false, true);
$this->doc->setMenu();
$this->session->set('docList', $this->app->getURI(true));
@@ -78,7 +81,7 @@ class doc extends control
public function browse($libID = 0, $browseType = 'all', $param = 0, $orderBy = 'id_desc', $from = 'doc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$this->from = $from;
setcookie('from', $from, $this->config->cookieLife, $this->config->webRoot, '', false, true);
setcookie('from', $from, $this->config->cookieLife, $this->config->webRoot, '', false, true);
$this->loadModel('search');
@@ -96,6 +99,8 @@ class doc extends control
$type = $lib->type;
$productID = $lib->product;
$projectID = $lib->project;
if($type != 'product' and $type != 'project') $from = 'doc';
}
$this->libs = $this->doc->getLibs($type, '', $libID);
@@ -303,6 +308,7 @@ class doc extends control
{
if(!empty($_POST))
{
setcookie('lastDocModule', (int)$this->post->module, $this->config->cookieLife, $this->config->webRoot, '', false, false);
$docResult = $this->doc->create();
if(!$docResult or dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
@@ -318,7 +324,7 @@ class doc extends control
if(!empty($files)) $fileAction = $this->lang->addFiles . join(',', $files) . "\n" ;
$this->action->create('doc', $docID, 'Created', $fileAction);
$vars = "libID=$libID&browseType=byModule&moduleID={$this->post->module}&orderBy=id_desc&from=$this->from";
$vars = "libID={$this->post->lib}&browseType=byModule&moduleID={$this->post->module}&orderBy=id_desc&from=$this->from";
$link = $this->createLink('doc', 'browse', $vars);
if($this->app->getViewType() == 'xhtml') $link = $this->createLink('doc', 'view', "docID=$docID");
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $link));
@@ -361,7 +367,7 @@ class doc extends control
$this->view->libs = $this->doc->getLibs($type = 'all', $extra = "withObject,$unclosed", $libID);
$this->view->libName = $this->dao->findByID($libID)->from(TABLE_DOCLIB)->fetch('name');
$this->view->moduleOptionMenu = $this->tree->getOptionMenu($libID, 'doc', $startModuleID = 0);
$this->view->moduleID = $moduleID;
$this->view->moduleID = $moduleID ? (int)$moduleID : (int)$this->cookie->lastDocModule;
$this->view->type = $type;
$this->view->docType = $docType;
$this->view->groups = $this->loadModel('group')->getPairs();
@@ -502,6 +508,40 @@ class doc extends control
}
}
/**
* Delete file for doc.
*
* @param int $docID
* @param int $fileID
* @param string $confirm
* @access public
* @return void
*/
public function deleteFile($docID, $fileID, $confirm = 'no')
{
$this->loadModel('file');
if($confirm == 'no')
{
die(js::confirm($this->lang->file->confirmDelete, inlink('deleteFile', "docID=$docID&fileID=$fileID&confirm=yes")));
}
else
{
$docContent = $this->dao->select('t1.*')->from(TABLE_DOCCONTENT)->alias('t1')
->leftJoin(TABLE_DOC)->alias('t2')->on('t1.doc=t2.id and t1.version=t2.version')
->where('t2.id')->eq($docID)
->fetch();
unset($docContent->id);
$docContent->files = trim(str_replace(",{$fileID},", ',', ",{$docContent->files},"), ',');
$docContent->version += 1;
$this->dao->insert(TABLE_DOCCONTENT)->data($docContent)->exec();
$this->dao->update(TABLE_DOC)->set('version')->eq($docContent->version)->where('id')->eq($docID)->exec();
$file = $this->file->getById($fileID);
$this->loadModel('action')->create($file->objectType, $file->objectID, 'deletedFile', '', $extra=$file->title);
die(js::locate($this->createLink('doc', 'view', "docID=$docID"), 'parent'));
}
}
/**
* Collect doc, doclib or module of doclib.
*
+1 -1
View File
@@ -45,5 +45,5 @@ $(function()
function deleteFile(fileID)
{
if(!fileID) return;
hiddenwin.location.href =createLink('file', 'delete', 'fileID=' + fileID);
hiddenwin.location.href =createLink('doc', 'deleteFile', 'docID=' + docID + '&fileID=' + fileID);
}
-2
View File
@@ -78,8 +78,6 @@ $lang->doc->editType = 'Bearbeiten';
$lang->doc->deleteType = 'Löschen';
$lang->doc->addType = 'Hinzufügen';
$lang->doc->childType = 'Child';
$lang->doc->editType = 'Manage Category';
$lang->doc->deleteType = 'Delete Category';
$lang->doc->collect = 'Favorit hinzufügen';
$lang->doc->cancelCollection = 'Favorit entfernen';
$lang->doc->deleteFile = 'Delete File';
-2
View File
@@ -78,8 +78,6 @@ $lang->doc->editType = 'Edit';
$lang->doc->deleteType = 'Delete';
$lang->doc->addType = 'Add';
$lang->doc->childType = 'Categories';
$lang->doc->editType = 'Manage Category';
$lang->doc->deleteType = 'Delete Category';
$lang->doc->collect = 'Add Favorite';
$lang->doc->cancelCollection = 'Remove Favorite';
$lang->doc->deleteFile = 'Delete File';
-2
View File
@@ -78,8 +78,6 @@ $lang->doc->editType = 'Editer';
$lang->doc->deleteType = 'Supprimer';
$lang->doc->addType = 'Ajouter';
$lang->doc->childType = 'Catégories';
$lang->doc->editType = 'Manage Category';
$lang->doc->deleteType = 'Delete Category';
$lang->doc->collect = 'Ajouter aux Favoris';
$lang->doc->cancelCollection = 'Retirer des Favoris';
$lang->doc->deleteFile = 'Supprimer Fichier';
-2
View File
@@ -78,8 +78,6 @@ $lang->doc->editType = '编辑分类';
$lang->doc->deleteType = '删除分类';
$lang->doc->addType = '增加分类';
$lang->doc->childType = '子分类';
$lang->doc->editType = '维护分类';
$lang->doc->deleteType = '删除分类';
$lang->doc->collect = '收藏';
$lang->doc->cancelCollection = '取消收藏';
$lang->doc->deleteFile = '删除附件';
-2
View File
@@ -78,8 +78,6 @@ $lang->doc->editType = '編輯分類';
$lang->doc->deleteType = '刪除分類';
$lang->doc->addType = '增加分類';
$lang->doc->childType = '子分類';
$lang->doc->editType = '維護分類';
$lang->doc->deleteType = '刪除分類';
$lang->doc->collect = '收藏';
$lang->doc->cancelCollection = '取消收藏';
$lang->doc->deleteFile = '刪除附件';
+19 -8
View File
@@ -71,6 +71,7 @@ class docModel extends model
{
$allLibGroups = $this->getAllLibGroups($libID);
$currentGroups = $allLibGroups[$type];
/* Append closed project. */
if(!isset($currentGroups[$currentLib]) and $type == 'project')
{
$project = $this->dao->select('id,name,status')->from(TABLE_PROJECT)->where('id')->eq($currentLib)->fetch();
@@ -372,7 +373,7 @@ class docModel extends model
if($moduleID)
{
$modules = array($moduleID => $moduleID);
if(strpos($this->config->doc->custom->showLibs, 'children') === false) $modules = $this->loadModel('tree')->getAllChildId($moduleID);
if(strpos($this->config->doc->custom->showLibs, 'children') !== false) $modules = $this->loadModel('tree')->getAllChildId($moduleID);
}
$docs = $this->getDocs($libID, $modules, $sort, $pager);
}
@@ -446,13 +447,20 @@ class docModel extends model
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'doc', false);
if(!$docs) return array();
$docContents = $this->dao->select('*')->from(TABLE_DOCCONTENT)->where('doc')->in(array_keys($docs))->orderBy('version,doc')->fetchAll('doc');
foreach($docs as $index => $doc)
{
$docs[$index]->fileSize = 0;
if(isset($files[$index]))
{
$fileSize = 0;
foreach($files[$index] as $file) $fileSize += $file->size;
$docContent = $docContents[$index];
$fileSize = 0;
foreach($files[$index] as $file)
{
if(strpos(",{$docContent->files},", ",{$file->id},") === false) continue;
$fileSize += $file->size;
}
if($fileSize < 1024)
{
$fileSize .= 'B';
@@ -514,7 +522,8 @@ class docModel extends model
->where('deleted')->eq(0)
->beginIF($this->config->doc->notArticleType)->andWhere('type')->notIN($this->config->doc->notArticleType)->fi()
->beginIF($libID)->andWhere('lib')->in($libID)->fi()
->beginIF(!empty($module) or strpos($this->config->doc->custom->showLibs, 'children') === false)->andWhere('module')->in($module)->fi()
->beginIF(strpos($this->config->doc->custom->showLibs, 'children') === false)->andWhere('module')->in($module)->fi()
->beginIF(!empty($module) and strpos($this->config->doc->custom->showLibs, 'children') !== false)->andWhere('module')->in($module)->fi()
->query();
$docIdList = array();
@@ -609,7 +618,9 @@ class docModel extends model
->join('users', ',')
->remove('files,labels,uid')
->get();
$doc->contentMarkdown = strip_tags($this->post->contentMarkdown, $this->config->allowedTags);
/* Fix bug #2929. strip_tags($this->post->contentMarkdown, $this->config->allowedTags)*/
$doc->contentMarkdown = $this->post->contentMarkdown;
if($doc->acl == 'private') $doc->users = $this->app->user->account;
$condition = "lib = '$doc->lib' AND module = $doc->module";
@@ -1035,7 +1046,7 @@ class docModel extends model
}
else
{
$hasProject = $this->dao->select('DISTINCT product')->from(TABLE_PROJECTPRODUCT)->alias('t1')
$hasProject = $this->dao->select('DISTINCT t1.product')->from(TABLE_PROJECTPRODUCT)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project=t2.id')
->where('t1.product')->in($productIdList)
->andWhere('t2.deleted')->eq(0)
@@ -1158,7 +1169,7 @@ class docModel extends model
}
else
{
$hasProject = $this->dao->select('DISTINCT product')->from(TABLE_PROJECTPRODUCT)->alias('t1')
$hasProject = $this->dao->select('DISTINCT t1.product')->from(TABLE_PROJECTPRODUCT)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project=t2.id')
->where('t1.product')->in($idList)
->beginIF(strpos($this->config->doc->custom->showLibs, 'unclosed') !== false)->andWhere('t2.status')->notin('done,closed')->fi()
@@ -1201,7 +1212,7 @@ class docModel extends model
}
else
{
$hasProject = $this->dao->select('DISTINCT product, count(project) as projectCount')->from(TABLE_PROJECTPRODUCT)->alias('t1')
$hasProject = $this->dao->select('DISTINCT t1.product, count(project) as projectCount')->from(TABLE_PROJECTPRODUCT)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project=t2.id')
->where('t1.product')->eq($objectID)
->beginIF(strpos($this->config->doc->custom->showLibs, 'unclosed') !== false)->andWhere('t2.status')->notin('done,closed')->fi()
+1 -1
View File
@@ -26,7 +26,7 @@ var browseType = '<?php echo $browseType;?>';
<?php include dirname(__FILE__) . '/browsebygrid.html.php';?>
<?php else:?>
<div class="main-col" data-min-width="400">
<div class="cell<?php if($browseType == 'bysearch') echo ' show';?>" id="queryBox"></div>
<div class="cell<?php if($browseType == 'bysearch') echo ' show';?>" id="queryBox" data-module='doc'></div>
<div class="panel block-files block-sm no-margin">
<div class="panel-heading">
<div class="panel-title font-normal">
+1 -1
View File
@@ -1,5 +1,5 @@
<div class="main-col" data-min-width="400">
<div class="cell<?php if($browseType == 'bysearch') echo ' show';?>" id="queryBox"></div>
<div class="cell<?php if($browseType == 'bysearch') echo ' show';?>" id="queryBox" data-module='doc'></div>
<div class="panel block-files block-sm no-margin">
<div class="panel-heading">
<div class="panel-title font-normal">
+1 -1
View File
@@ -14,7 +14,7 @@
<div class='main-row split-row fade' id='mainRow'>
<?php include './side.html.php';?>
<div class="main-col" data-min-width="400">
<div class="cell" id="queryBox"></div>
<div class="cell" id="queryBox" data-module='doc'></div>
<div class="row">
<div class="col-sm-7">
<div class="panel block-files block-sm" style="height: 290px;">
+1 -1
View File
@@ -22,7 +22,7 @@
<?php include dirname(__FILE__) . '/objectlibsbylist.html.php';?>
<?php else:?>
<div class="main-col" data-min-width="400">
<div class="cell" id="queryBox"></div>
<div class="cell" id="queryBox" data-module='doc'></div>
<div class="panel block-files block-sm no-margin">
<div class="panel-heading">
<div class="panel-title font-normal">
+1 -1
View File
@@ -1,5 +1,5 @@
<div class="main-col" data-min-width="400">
<div class="cell" id="queryBox"></div>
<div class="cell" id="queryBox" data-module='doc'></div>
<div class="panel block-files block-sm no-margin">
<div class="panel-heading">
<div class="panel-title font-normal">
+3 -2
View File
@@ -18,6 +18,7 @@
js::set('fullscreen', $lang->doc->fullscreen);
js::set('retrack', $lang->doc->retrack);
js::set('sysurl', common::getSysUrl());
js::set('docID', $doc->id);
?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
@@ -34,12 +35,12 @@ js::set('sysurl', common::getSysUrl());
$i = 1;
foreach($actions as $action)
{
if($action->action == 'created')
if($action->action == 'created' or $action->action == 'deletedfile' or $action->action == 'commented')
{
$versions[$i] = "#$i " . zget($users, $action->actor) . ' ' . substr($action->date, 2, 14);
$i++;
}
if($action->action == 'edited')
elseif($action->action == 'edited')
{
foreach($action->history as $history)
{
+34 -2
View File
@@ -84,8 +84,16 @@ function setTemplate(templateID)
var exportFields = $template.size() > 0 ? $template.html() : defaultExportFields;
exportFields = exportFields.split(',');
$('#exportFields').val('');
for(i in exportFields) $('#exportFields').find('option[value="' + exportFields[i] + '"]').attr('selected', 'selected');
$('#exportFields').trigger("chosen:updated");
var optionHtml = '';
for(i in exportFields)
{
$selectedOption = $('#exportFields').find('option[value="' + exportFields[i] + '"]');
optionHtml += $selectedOption.attr('selected', 'selected').prop('outerHTML');
$selectedOption.remove();
}
$('#exportFields option').each(function(){optionHtml += $(this).removeAttr('selected').prop('outerHTML')});
$('#exportFields').html(optionHtml).trigger("chosen:updated");
}
/* Delete template. */
@@ -124,6 +132,30 @@ $(document).ready(function()
$('#exportType').val('selected').trigger('chosen:updated');
}, 150);
<?php endif;?>
if($('#customFields #exportFields').length > 0)
{
$('#customFields #exportFields').change(function()
{
setTimeout(function()
{
var optionHtml = '';
var selected = ',';
$('#customFields #exportFields_chosen .chosen-choices li.search-choice').each(function(i)
{
index = $(this).find('.search-choice-close').data('option-array-index');
optionHtml += $('#exportFields option').eq(index).attr('selected', 'selected').prop("outerHTML");
$(this).find('.search-choice-close').attr('data-option-array-index', i);
selected += index + ',';
})
$('#exportFields option').each(function(i)
{
if(selected.indexOf(',' + i + ',') < 0) optionHtml += $(this).removeAttr('selected').prop("outerHTML");
})
$('#exportFields').html(optionHtml).trigger('chosen:updated');
}, 100);
})
}
});
</script>
<?php
+1 -1
View File
@@ -133,7 +133,7 @@ class group extends control
$this->group->updateView($groupID);
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload'));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('browse')));
}
$group = $this->group->getById($groupID);
+7 -5
View File
@@ -704,6 +704,7 @@ $lang->resource->doc->create = 'create';
$lang->resource->doc->view = 'view';
$lang->resource->doc->edit = 'edit';
$lang->resource->doc->delete = 'delete';
$lang->resource->doc->deleteFile = 'deleteFile';
$lang->resource->doc->allLibs = 'allLibs';
$lang->resource->doc->objectLibs = 'objectLibs';
$lang->resource->doc->showFiles = 'showFiles';
@@ -720,11 +721,12 @@ $lang->doc->methodOrder[25] = 'create';
$lang->doc->methodOrder[30] = 'view';
$lang->doc->methodOrder[35] = 'edit';
$lang->doc->methodOrder[40] = 'delete';
$lang->doc->methodOrder[45] = 'allLibs';
$lang->doc->methodOrder[50] = 'showFiles';
$lang->doc->methodOrder[55] = 'objectLibs';
$lang->doc->methodOrder[60] = 'sort';
$lang->doc->methodOrder[65] = 'collect';
$lang->doc->methodOrder[45] = 'deleteFile';
$lang->doc->methodOrder[50] = 'allLibs';
$lang->doc->methodOrder[55] = 'showFiles';
$lang->doc->methodOrder[60] = 'objectLibs';
$lang->doc->methodOrder[65] = 'sort';
$lang->doc->methodOrder[70] = 'collect';
//$lang->doc->methodOrder[55] = 'diff';
/* mail. */
+3 -3
View File
@@ -30,11 +30,11 @@ ZenTao ALM is an open source software released under <a href='http://zpl.pub/pag
ZenTao ALM is built on PHP + MySQL + zentaoPHP which is an independent framework developed by Nature Easy Soft. Third-party developers/organizations can develop extensions or customize ZenTao accordingly.
EOT;
$lang->install->links = <<<EOT
ZenTao ALM is developed by <strong><a href='http://en.easysoft.ltd' target='_blank' class='text-danger'>Nature Easy Soft Co., LTD</a></strong>.
ZenTao ALM is developed by <strong><a href='http://en.easysoft.ltd' target='_blank' class='text-danger'>EasyCorp</a></strong>.
Official Website: <a href='https://www.zentao.pm' target='_blank'>https://www.zentao.pm</a>
Technical Support: <a href='https://www.zentao.pm/forum/' target='_blank'>https://www.zentao.pm/forum/</a>
LinkedIn: <a href='https://www.linkedin.com/company/1156596/' target='_blank'>Nature Easy Soft</a>
Facebook: <a href='https://www.facebook.com/natureeasysoft' target='_blank'>Nature Easy Soft</a>
LinkedIn: <a href='https://www.linkedin.com/company/1156596/' target='_blank'>EasyCorp</a>
Facebook: <a href='https://www.facebook.com/natureeasysoft' target='_blank'>EasyCorp</a>
Twitter: <a href='https://twitter.com/ZentaoA' target='_blank'>ZenTao ALM</a>
You are installing ZenTao <strong class='text-danger'>%s</strong>.
-1
View File
@@ -37,7 +37,6 @@ $lang->install->links = <<<EOT
您现在正在安装的版本是 <strong class='text-danger'>%s</strong>。
EOT;
-1
View File
@@ -37,7 +37,6 @@ $lang->install->links = <<<EOT
您現在正在安裝的版本是 <strong class='text-danger'>%s</strong>。
EOT;
+3
View File
@@ -304,8 +304,11 @@ class mailModel extends model
$this->clear();
/* Replace full webPath image for mail. */
$isonlybody = isonlybody();
unset($_GET['onlybody']);
$sysURL = zget($this->config->mail, 'domain', common::getSysURL());
$readLinkReg = str_replace(array('%fileID%', '/', '.', '?'), array('[0-9]+', '\/', '\.', '\?'), helper::createLink('file', 'read', 'fileID=(%fileID%)', '\w+'));
if($isonlybody) $_GET['onlybody'] = 'yes';
$body = preg_replace('/ src="(' . $readLinkReg . ')" /', ' src="' . $sysURL . '$1" ', $body);
$body = preg_replace('/ src="{([0-9]+)(\.(\w+))?}" /', ' src="' . $sysURL . helper::createLink('file', 'read', "fileID=$1", "$3") . '" ', $body);
+7
View File
@@ -84,6 +84,13 @@ class messageModel extends model
if(isset($messageSetting['webhook']))
{
$actions = $messageSetting['webhook']['setting'];
if($this->app->isFlow)
{
$rawModule = $this->app->rawModule;
$rawMethod = $this->app->rawMethod;
$actions[$rawModule][] = $rawMethod;
}
if(isset($actions[$objectType]) and in_array($actionType, $actions[$objectType]))
{
$this->loadModel('webhook')->send($objectType, $objectID, $actionType, $actionID, $actor);

Some files were not shown because too many files have changed in this diff Show More