diff --git a/config/zentaopms.php b/config/zentaopms.php index 34038237d0..96cde431d3 100644 --- a/config/zentaopms.php +++ b/config/zentaopms.php @@ -241,5 +241,5 @@ $config->objectTables['issue'] = TABLE_ISSUE; /* Program privs.*/ $config->programPriv = new stdclass(); -$config->programPriv->scrum = array('product', 'story', 'productplan', 'release', 'project', 'task', 'build', 'qa', 'bug', 'testcase', 'testsuite', 'testreport', 'caselib', 'doc', 'report', 'repo', 'svn', 'git', 'search', 'tree', 'file', 'jenkins', 'job', 'ci', 'branch'); -$config->programPriv->cmmi = $config->programPriv->scrum + array('workestimation', 'durationestimation', 'budget', 'programplan', 'review', 'reviewissue', 'weekly', 'milestone', 'design', 'issue', 'risk', 'auditplan', 'nc', 'cm', 'pssp'); +$config->programPriv->scrum = array('product', 'story', 'productplan', 'release', 'project', 'task', 'build', 'qa', 'bug', 'testcase', 'testsuite', 'testreport', 'caselib', 'doc', 'report', 'repo', 'svn', 'git', 'search', 'tree', 'file', 'jenkins', 'job', 'ci', 'branch'); +$config->programPriv->waterfall = $config->programPriv->scrum + array('workestimation', 'durationestimation', 'budget', 'programplan', 'review', 'reviewissue', 'weekly', 'milestone', 'design', 'issue', 'risk', 'auditplan', 'nc', 'cm', 'pssp'); diff --git a/db/demo.sql b/db/demo.sql index 3ee23bf7ba..38df4bdeb0 100644 --- a/db/demo.sql +++ b/db/demo.sql @@ -223,8 +223,8 @@ INSERT INTO `zt_product` (`id`, `program`, `name`, `code`, `status`, `desc`, `PO INSERT INTO `zt_productplan` (`id`, `product`, `title`, `desc`, `begin`, `end`, `deleted`) VALUES(1, 1, '1.0版本', '开发出企业网站1.0版本。
', '2000-01-01', '2015-01-01', '0'); -INSERT INTO `zt_project` (`id`, `isCat`, `catID`, `type`, `template`, `category`,`parent`, `name`, `code`, `begin`, `end`, `days`, `status`, `statge`, `pri`, `desc`, `openedBy`, `openedDate`, `closedBy`, `closedDate`, `canceledBy`, `canceledDate`, `PO`, `PM`, `QD`, `RD`, `team`, `acl`, `whitelist`, `order`, `deleted`) VALUES(1, '0', 0, 'sprint', 'cmmi', 'single', 0, '企业网站第一期', 'coWeb1', '2012-06-05', '2012-12-04', 184, 'done', '1', '1', '开发企业网站的基本雏形。
', '', 0, '', 0, '', 0, 'productManager', 'projectManager', 'testManager', 'productManager', '公司开发团队', 'open', '', '5', '0'); -INSERT INTO `zt_project` (`id`, `isCat`, `catID`, `type`, `template`, `category`, `parent`, `name`, `code`, `begin`, `end`, `days`, `status`, `statge`, `pri`, `desc`, `openedBy`, `openedDate`, `closedBy`, `closedDate`, `canceledBy`, `canceledDate`, `PO`, `PM`, `QD`, `RD`, `team`, `acl`, `whitelist`, `order`, `deleted`) VALUES(2, '0', 0, 'sprint', 'cmmi', 'single', 0, '企业网站第二期', 'coWebsite2', '2013-06-05', '2014-06-04', 365, 'wait', '1', '1', '', '', 0, '', 0, '', 0, 'productManager', 'projectManager', 'testManager', 'productManager', '公司开发团队', 'open', '', '10', '0'); +INSERT INTO `zt_project` (`id`, `isCat`, `catID`, `type`, `template`, `category`,`parent`, `name`, `code`, `begin`, `end`, `days`, `status`, `statge`, `pri`, `desc`, `openedBy`, `openedDate`, `closedBy`, `closedDate`, `canceledBy`, `canceledDate`, `PO`, `PM`, `QD`, `RD`, `team`, `acl`, `whitelist`, `order`, `deleted`) VALUES(1, '0', 0, 'sprint', 'waterfall', 'single', 0, '企业网站第一期', 'coWeb1', '2012-06-05', '2012-12-04', 184, 'done', '1', '1', '开发企业网站的基本雏形。
', '', 0, '', 0, '', 0, 'productManager', 'projectManager', 'testManager', 'productManager', '公司开发团队', 'open', '', '5', '0'); +INSERT INTO `zt_project` (`id`, `isCat`, `catID`, `type`, `template`, `category`, `parent`, `name`, `code`, `begin`, `end`, `days`, `status`, `statge`, `pri`, `desc`, `openedBy`, `openedDate`, `closedBy`, `closedDate`, `canceledBy`, `canceledDate`, `PO`, `PM`, `QD`, `RD`, `team`, `acl`, `whitelist`, `order`, `deleted`) VALUES(2, '0', 0, 'sprint', 'waterfall', 'single', 0, '企业网站第二期', 'coWebsite2', '2013-06-05', '2014-06-04', 365, 'wait', '1', '1', '', '', 0, '', 0, '', 0, 'productManager', 'projectManager', 'testManager', 'productManager', '公司开发团队', 'open', '', '10', '0'); INSERT INTO `zt_doclib` (`id`, `type`, `product`, `project`, `name`, `acl`, `main`) VALUES(1, 'product', 1, 0, '产品库', 'default','1'); INSERT INTO `zt_doclib` (`id`, `type`, `product`, `project`, `name`, `acl`, `main`) VALUES(2, 'product', 2, 0, '产品库', 'default', '1'); diff --git a/db/update20.0.sql b/db/update20.0.sql index 9b641fe4fb..b75c5e0149 100644 --- a/db/update20.0.sql +++ b/db/update20.0.sql @@ -295,3 +295,5 @@ ALTER TABLE `zt_block` ADD `type` char(30) NOT NULL AFTER `module`; ALTER TABLE `zt_block` ADD UNIQUE `account_module_type_order` (`account`, `module`, `type`, `order`), DROP INDEX `accountModuleOrder`; INSERT INTO `zt_cron` (`m`, `h`, `dom`, `mon`, `dow`, `command`, `remark`, `type`, `buildin`, `status`, `lastTime`) VALUES ('1', '0', '*', '*', '*', 'moduleName=weekly&methodName=computeWeekly', '更新项目周报', 'system', 0, 'normal', '2020-08-27 10:07:53'); + +ALTER TABLE `zt_story` ADD `storyChanged` enum('0','1') NOT NULL DEFAULT '0' AFTER `version`; diff --git a/db/zentao.sql b/db/zentao.sql index 45b0a4fbbe..13c23a9079 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -919,6 +919,7 @@ CREATE TABLE IF NOT EXISTS `zt_story` ( `linkStories` varchar(255) NOT NULL, `duplicateStory` mediumint(8) unsigned NOT NULL, `version` smallint(6) NOT NULL default '1', + `storyChanged` enum('0','1') NOT NULL DEFAULT '0', `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`), KEY `product` (`product`), @@ -1390,65 +1391,6 @@ CREATE TABLE IF NOT EXISTS `zt_relation` ( `extra` char(30) NOT NULL, UNIQUE KEY `relation` (`relation`,`AType`,`BType`, `AID`, `BID`) ) ENGINE='MyISAM' DEFAULT CHARSET=utf8; - --- DROP TABLE IF EXISTS `zt_repo`; -CREATE TABLE IF NOT EXISTS `zt_repo` ( - `id` mediumint(9) NOT NULL AUTO_INCREMENT, - `program` mediumint(8) unsigned NOT NULL, - `name` varchar(255) NOT NULL, - `path` varchar(255) NOT NULL, - `prefix` varchar(100) NOT NULL, - `encoding` varchar(20) NOT NULL, - `SCM` varchar(10) NOT NULL, - `client` varchar(100) NOT NULL, - `commits` mediumint(8) unsigned NOT NULL, - `account` varchar(30) NOT NULL, - `password` varchar(30) NOT NULL, - `encrypt` varchar(30) NOT NULL DEFAULT 'plain', - `acl` text NOT NULL, - `synced` tinyint(1) NOT NULL DEFAULT '0', - `lastSync` datetime NOT NULL, - `desc` TEXT NULL, - `deleted` tinyint(1) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- DROP TABLE IF EXISTS `zt_repobranch`; -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`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- DROP TABLE IF EXISTS `zt_repohistory`; -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`,`revision`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- DROP TABLE IF EXISTS `zt_repofiles`; -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`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - INSERT INTO `zt_cron` (`m`, `h`, `dom`, `mon`, `dow`, `command`, `remark`, `type`, `buildin`, `status`, `lastTime`) VALUES ('*', '*', '*', '*', '*', '', '监控定时任务', 'zentao', 1, 'normal', '0000-00-00 00:00:00'), ('30', '23', '*', '*', '*', 'moduleName=project&methodName=computeburn', '更新燃尽图', 'zentao', 1, 'normal', '0000-00-00 00:00:00'), diff --git a/framework/base/helper.class.php b/framework/base/helper.class.php index 0701eeebb5..4e876f6d55 100644 --- a/framework/base/helper.class.php +++ b/framework/base/helper.class.php @@ -168,14 +168,7 @@ class baseHelper { global $config; if(!$programID) return $link; - if($onlybody) - { - $link .= $config->requestType != 'GET' ? "&pgm=$programID" : "&pgm=$programID"; - } - else - { - $link .= $config->requestType != 'GET' ? "?pgm=$programID" : "&pgm=$programID"; - } + $link .= strpos($link, '?') === false ? "?pgm=$programID" : "&pgm=$programID"; return $link; } @@ -197,7 +190,7 @@ class baseHelper { global $config; if(!$onlyBody and !self::inOnlyBodyMode()) return $link; - $onlybodyString = $config->requestType != 'GET' ? "?onlybody=yes" : "&onlybody=yes"; + $onlybodyString = strpos($link, '?') === false ? "?onlybody=yes" : "&onlybody=yes"; return $link . $onlybodyString; } diff --git a/framework/router.class.php b/framework/router.class.php index 83da1f1909..bcccb694a7 100755 --- a/framework/router.class.php +++ b/framework/router.class.php @@ -166,7 +166,7 @@ class router extends baseRouter if($this->session->program) { $template = $this->dbh->query('SELECT template FROM' . TABLE_PROJECT . "WHERE id = {$this->session->program}")->fetch(); - if($template->template == 'cmmi') $projectCommon = 2; + if($template->template == 'waterfall') $projectCommon = 2; } $config->storyCommon = $storyCommon; diff --git a/module/action/model.php b/module/action/model.php index 30534799e4..3d6a2a847b 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -306,7 +306,7 @@ class actionModel extends model } $action->extra = trim(trim($action->extra), ','); } - /* Code for cmmi. */ + /* Code for waterfall. */ elseif($actionName == 'createrequirements') { $names = $this->dao->select('id,title')->from(TABLE_STORY)->where('id')->in($action->extra)->fetchPairs('id', 'title'); diff --git a/module/admin/view/safe.html.php b/module/admin/view/safe.html.php index 78f3f6c87e..e7a73013fd 100644 --- a/module/admin/view/safe.html.php +++ b/module/admin/view/safe.html.php @@ -10,9 +10,7 @@ * @link http://www.zentao.net */ ?> - +