diff --git a/config/filter.php b/config/filter.php
index f2f17a2258..62947feb97 100644
--- a/config/filter.php
+++ b/config/filter.php
@@ -172,20 +172,20 @@ $filter->program->pgmbrowse->cookie['showClosed'] = 'code';
$filter->program->export->cookie['checkedItem'] = 'reg::checked';
$filter->program->ajaxgetpgmdropmenu->cookie['showClosed'] = 'code';
-$filter->project->default->cookie['lastProject'] = 'int';
-$filter->project->default->cookie['lastPRJ'] = 'int';
-$filter->project->default->cookie['projectMode'] = 'code';
-$filter->project->story->cookie['storyModuleParam'] = 'int';
-$filter->project->story->cookie['storyPreProjectID'] = 'int';
-$filter->project->story->cookie['storyProductParam'] = 'int';
-$filter->project->story->cookie['storyBranchParam'] = 'reg::checked';
-$filter->project->story->cookie['projectStoryOrder'] = 'reg::orderBy';
-$filter->project->task->cookie['moduleBrowseParam'] = 'int';
-$filter->project->task->cookie['preProjectID'] = 'int';
-$filter->project->task->cookie['productBrowseParam'] = 'int';
-$filter->project->task->cookie['projectTaskOrder'] = 'reg::orderBy';
-$filter->project->task->cookie['windowWidth'] = 'int';
-$filter->project->export->cookie['checkedItem'] = 'reg::checked';
+$filter->project->default->cookie['lastProject'] = 'int';
+$filter->project->default->cookie['lastPRJ'] = 'int';
+$filter->project->default->cookie['projectMode'] = 'code';
+$filter->project->story->cookie['storyModuleParam'] = 'int';
+$filter->project->story->cookie['storyPreProjectID'] = 'int';
+$filter->project->story->cookie['storyProductParam'] = 'int';
+$filter->project->story->cookie['storyBranchParam'] = 'reg::checked';
+$filter->project->story->cookie['projectStoryOrder'] = 'reg::orderBy';
+$filter->project->task->cookie['moduleBrowseParam'] = 'int';
+$filter->project->task->cookie['preProjectID'] = 'int';
+$filter->project->task->cookie['productBrowseParam'] = 'int';
+$filter->project->task->cookie['projectTaskOrder'] = 'reg::orderBy';
+$filter->project->task->cookie['windowWidth'] = 'int';
+$filter->project->export->cookie['checkedItem'] = 'reg::checked';
$filter->qa->default->cookie['lastProduct'] = 'int';
$filter->qa->default->cookie['preBranch'] = 'int';
diff --git a/db/update15.0.sql b/db/update15.0.sql
new file mode 100644
index 0000000000..e85e88b2ba
--- /dev/null
+++ b/db/update15.0.sql
@@ -0,0 +1,522 @@
+ALTER TABLE `zt_project` DROP `isCat`, DROP `catID`;
+ALTER TABLE `zt_project` ADD `project` mediumint(8) NOT NULL DEFAULT 0 AFTER `id`;
+ALTER TABLE `zt_project` ADD `model` char(30) NOT NULL AFTER `project`;
+ALTER TABLE `zt_project` CHANGE `type` `type` char(30) NOT NULL DEFAULT 'sprint' AFTER `model`;
+ALTER TABLE `zt_project` CHANGE `acl` `acl` char(30) NOT NULL DEFAULT 'open';
+ALTER TABLE `zt_project` ADD `product` varchar(20) NOT NULL DEFAULT 'single' AFTER `type`;
+ALTER TABLE `zt_project` ADD `lifetime` char(30) NOT NULL AFTER `product`;
+ALTER TABLE `zt_project` ADD `budget` varchar(30) NOT NULL DEFAULT '0' AFTER `lifetime`;
+ALTER TABLE `zt_project` ADD `budgetUnit` char(30) NOT NULL DEFAULT 'CNY' AFTER `budget`;
+ALTER TABLE `zt_project` ADD `percent` float unsigned NOT NULL DEFAULT '0' AFTER `budgetUnit`;
+ALTER TABLE `zt_project` ADD `path` varchar(255) NOT NULL AFTER `parent`;
+ALTER TABLE `zt_project` ADD `grade` tinyint unsigned NOT NULL AFTER `path`;
+ALTER TABLE `zt_project` ADD `auth` char(30) NOT NULL AFTER `percent`;
+ALTER TABLE `zt_project` ADD `milestone` enum('0','1') NOT NULL default '0' AFTER `percent`;
+ALTER TABLE `zt_project` ADD `attribute` varchar(30) NOT NULL DEFAULT '' AFTER `budgetUnit`;
+ALTER TABLE `zt_project` ADD `realBegan` date NOT NULL AFTER `end`;
+ALTER TABLE `zt_project` ADD `realEnd` date NOT NULL AFTER `realBegan`;
+ALTER TABLE `zt_project` ADD `version` smallint(6) NOT NULL AFTER `desc`;
+ALTER TABLE `zt_project` ADD `parentVersion` smallint(6) NOT NULL AFTER `version`;
+ALTER TABLE `zt_project` ADD `planDuration` int(11) NOT NULL AFTER `parentVersion`;
+ALTER TABLE `zt_project` ADD `realDuration` int(11) NOT NULL AFTER `planDuration`;
+ALTER TABLE `zt_project` ADD `output` text NOT NULL AFTER `milestone`;
+
+ALTER TABLE `zt_product` ADD `program` mediumint(8) unsigned NOT NULL AFTER `id`;
+ALTER TABLE `zt_product` ADD `bind` enum('0','1') NOT NULL DEFAULT '0' AFTER `code`;
+ALTER TABLE `zt_task` ADD `PRJ` mediumint(8) unsigned NOT NULL AFTER `id`;
+ALTER TABLE `zt_doc` ADD `PRJ` mediumint(8) unsigned NOT NULL AFTER `id`;
+ALTER TABLE `zt_story` ADD `PRJ` mediumint(8) unsigned NOT NULL AFTER `id`;
+ALTER TABLE `zt_repo` ADD `product` varchar(255) NOT NULL AFTER `id`;
+ALTER TABLE `zt_bug` ADD `PRJ` mediumint(8) unsigned NOT NULL AFTER `id`;
+ALTER TABLE `zt_case` ADD `PRJ` mediumint(8) unsigned NOT NULL AFTER `id`;
+ALTER TABLE `zt_testtask` ADD `PRJ` mediumint(8) unsigned NOT NULL AFTER `id`;
+ALTER TABLE `zt_testreport` ADD `PRJ` mediumint(8) unsigned NOT NULL AFTER `id`;
+ALTER TABLE `zt_testsuite` ADD `PRJ` mediumint(8) unsigned NOT NULL AFTER `id`;
+ALTER TABLE `zt_build` ADD `PRJ` mediumint(8) unsigned NOT NULL AFTER `id`;
+ALTER TABLE `zt_release` ADD `PRJ` mediumint(8) unsigned NOT NULL AFTER `id`;
+
+ALTER TABLE `zt_group` ADD `PRJ` mediumint NOT NULL AFTER `id`;
+INSERT INTO `zt_group` (`name`, `role`, `desc`) VALUES ('项目管理员', 'PRJAdmin', '项目管理员可以维护项目的权限');
+
+ALTER TABLE `zt_usergroup` ADD `PRJ` text NOT NULL;
+
+ALTER TABLE `zt_userview` ADD `programs` mediumtext NOT NULL AFTER `account`;
+ALTER TABLE `zt_userview` ADD `sprints` mediumtext NOT NULL AFTER `programs`;
+
+ALTER TABLE `zt_user` ADD `company` mediumint unsigned NOT NULL AFTER `id`;
+ALTER TABLE `zt_user` ADD `type` char(30) NOT NULL default 'inside' AFTER `account`;
+ALTER TABLE `zt_user` ADD `nature` text NOT NULL AFTER `zipcode`;
+ALTER TABLE `zt_user` ADD `analysis` text NOT NULL AFTER `nature`;
+ALTER TABLE `zt_user` ADD `strategy` text NOT NULL AFTER `analysis`;
+ALTER TABLE `zt_user` CHANGE `avatar` `avatar` text NOT NULL AFTER `commiter`;
+
+REPLACE INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system','custom','','hourPoint','1');
+REPLACE INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'custom', '', 'URSR', '3');
+REPLACE INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'program', '', 'unitList', 'CNY,USD');
+REPLACE INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'program', '', 'defaultCurrency', 'CNY');
+
+ALTER TABLE `zt_config` MODIFY COLUMN `value` longtext NOT NULL AFTER `key`;
+
+-- DROP TABLE IF EXISTS `zt_stage`;
+CREATE TABLE IF NOT EXISTS `zt_stage` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `percent` varchar(255) NOT NULL,
+ `type` varchar(255) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- DROP TABLE IF EXISTS `zt_stakeholder`;
+CREATE TABLE IF NOT EXISTS `zt_stakeholder` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ `objectID` mediumint(8) NOT NULL,
+ `objectType` char(30) NOT NULL,
+ `user` char(30) NOT NULL,
+ `type` char(30) NOT NULL,
+ `key` enum('0','1') NOT NULL,
+ `from` char(30) NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `editedBy` char(30) NOT NULL,
+ `editedDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- DROP TABLE IF EXISTS `zt_expect`;
+CREATE TABLE IF NOT EXISTS `zt_expect` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ `userID` mediumint(8) NOT NULL,
+ `PRJ` mediumint(8) NOT NULL DEFAULT 0,
+ `expect` text NOT NULL,
+ `progress` text NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0'
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+REPLACE INTO `zt_stage` (`name`,`percent`,`type`,`createdBy`,`createdDate`,`editedBy`,`editedDate`,`deleted`) VALUES
+('需求','10','request','admin','2020-02-08 21:08:30','admin','2020-02-12 13:50:27','0'),
+('设计','10','design','admin','2020-02-08 21:08:30','admin','2020-02-12 13:50:27','0'),
+('开发','50','dev','admin','2020-02-08 21:08:30','admin','2020-02-12 13:50:27','0'),
+('测试','15','qa','admin','2020-02-08 21:08:30','admin','2020-02-12 13:50:27','0'),
+('发布','10','release','admin','2020-02-08 21:08:30','admin','2020-02-12 13:50:27','0'),
+('总结评审','5','review','admin','2020-02-08 21:08:45','admin','2020-02-12 13:50:27','0');
+
+-- DROP TABLE IF EXISTS `zt_design`;
+CREATE TABLE IF NOT EXISTS `zt_design` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `PRJ` varchar(255) NOT NULL,
+ `product` varchar(255) NOT NULL,
+ `commit` text NOT NULL,
+ `commitedBy` varchar(30) NOT NULL,
+ `project` mediumint(9) NOT NULL DEFAULT '0',
+ `name` varchar(255) NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `assignedBy` varchar(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `story` char(30) NOT NULL,
+ `desc` text NOT NULL,
+ `version` smallint(6) NOT NULL,
+ `type` char(30) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `zt_designspec` (
+ `design` mediumint(8) NOT NULL,
+ `version` smallint(6) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `desc` text NOT NULL,
+ `files` varchar(255) NOT NULL,
+ UNIQUE KEY `design` (`design`,`version`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- DROP TABLE IF EXISTS `zt_issue`;
+CREATE TABLE IF NOT EXISTS `zt_issue` (
+ `id` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT,
+ `resolvedBy` varchar(30) NOT NULL,
+ `PRJ` varchar(255) NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `desc` text NOT NULL,
+ `pri` char(30) NOT NULL,
+ `severity` char(30) NOT NULL,
+ `type` char(30) NOT NULL,
+ `activity` varchar(255) NOT NULL,
+ `deadline` date NOT NULL,
+ `resolution` char(30) NOT NULL,
+ `resolutionComment` text NOT NULL,
+ `objectID` varchar(255) NOT NULL,
+ `resolvedDate` date NOT NULL,
+ `status` varchar(30) NOT NULL,
+ `owner` varchar(255) NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `activateBy` varchar(30) NOT NULL,
+ `activateDate` date NOT NULL,
+ `closedBy` varchar(30) NOT NULL,
+ `closedDate` date NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `assignedBy` varchar(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `zt_risk` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `PRJ` varchar(255) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `source` char(30) NOT NULL,
+ `category` char(30) NOT NULL,
+ `strategy` char(30) NOT NULL,
+ `status` varchar(30) NOT NULL DEFAULT 'active',
+ `impact` char(30) NOT NULL,
+ `probability` char(30) NOT NULL,
+ `rate` char(30) NOT NULL,
+ `pri` char(30) NOT NULL,
+ `identifiedDate` date NOT NULL,
+ `prevention` text NOT NULL,
+ `remedy` text NOT NULL,
+ `plannedClosedDate` date NOT NULL,
+ `actualClosedDate` date NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `resolution` text NOT NULL,
+ `resolvedBy` varchar(30) NOT NULL,
+ `activateBy` varchar(30) NOT NULL,
+ `activateDate` date NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `cancelBy` varchar(30) NOT NULL,
+ `cancelDate` date NOT NULL,
+ `cancelReason` char(30) NOT NULL,
+ `closedBy` char(30) NOT NULL,
+ `closedDate` date NOT NULL,
+ `hangupBy` varchar(30) NOT NULL,
+ `hangupDate` date NOT NULL,
+ `trackedBy` varchar(30) NOT NULL,
+ `trackedDate` date NOT NULL,
+ `assignedDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- DROP TABLE IF EXISTS `zt_projectspec`;
+CREATE TABLE IF NOT EXISTS `zt_projectspec` (
+ `project` mediumint(8) NOT NULL,
+ `version` smallint(6) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `milestone` enum('0','1') NOT NULL DEFAULT '0',
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ UNIQUE KEY `project` (`project`,`version`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- DROP TABLE IF EXISTS `zt_budget`;
+CREATE TABLE IF NOT EXISTS `zt_budget` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `PRJ` mediumint(8) NOT NULL,
+ `stage` char(30) NOT NULL,
+ `subject` mediumint(8) NOT NULL,
+ `amount` char(30) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `desc` text NOT NULL,
+ `createdBy` char(30) NOT NULL,
+ `createdDate` date NOT NULL,
+ `lastEditedBy` char(30) NOT NULL,
+ `lastEditedDate` date NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- DROP TABLE IF EXISTS `zt_durationestimation`;
+CREATE TABLE IF NOT EXISTS `zt_durationestimation` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `PRJ` mediumint(8) unsigned NOT NULL,
+ `stage` mediumint(9) NOT NULL,
+ `workload` varchar(255) NOT NULL,
+ `worktimeRate` varchar(255) NOT NULL,
+ `people` varchar(255) NOT NULL,
+ `startDate` date NOT NULL,
+ `endDate` date 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;
+
+-- DROP TABLE IF EXISTS `zt_workestimation`;
+CREATE TABLE IF NOT EXISTS `zt_workestimation` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `PRJ` mediumint(8) unsigned NOT NULL,
+ `scale` decimal(10, 2) unsigned NOT NULL,
+ `productivity` decimal(10, 2) unsigned NOT NULL,
+ `duration` decimal(10, 2) unsigned NOT NULL,
+ `unitLaborCost` decimal(10, 2) unsigned NOT NULL,
+ `totalLaborCost` decimal(10, 2) unsigned NOT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `assignedTo` varchar(30) NOT NULL,
+ `assignedDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `dayHour` decimal(10,2) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `zt_holiday` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(30) NOT NULL DEFAULT '',
+ `type` enum('holiday', 'working') NOT NULL DEFAULT 'holiday',
+ `desc` text NOT NULL,
+ `year` char(4) NOT NULL,
+ `begin` date NOT NULL,
+ `end` date NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `year` (`year`),
+ KEY `name` (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+ALTER TABLE `zt_task` ADD `design` mediumint(8) unsigned NOT NULL AFTER `module`;
+ALTER TABLE `zt_task` ADD `version` smallint(6) NOT NULL AFTER `desc`;
+ALTER TABLE `zt_task` ADD `activatedDate` date NOT NULL AFTER `lastEditedDate`;
+ALTER TABLE `zt_task` ADD `planDuration` int(11) NOT NULL AFTER `closedDate`;
+ALTER TABLE `zt_task` ADD `realDuration` int(11) NOT NULL AFTER `closedDate`;
+ALTER TABLE `zt_task` ADD `designVersion` smallint(6) unsigned NOT NULL AFTER `storyVersion`;
+
+ALTER TABLE `zt_burn` ADD `storyPoint` float NOT NULL AFTER `consumed`;
+ALTER TABLE `zt_burn` ADD `product` mediumint(8) unsigned NOT NULL DEFAULT '0' AFTER `project`;
+
+-- DROP TABLE IF EXISTS `zt_taskspec`;
+CREATE TABLE IF NOT EXISTS `zt_taskspec` (
+ `task` mediumint(8) NOT NULL,
+ `version` smallint(6) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `estStarted` date NOT NULL,
+ `deadline` date NOT NULL,
+ UNIQUE KEY `task` (`task`,`version`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `zt_weeklyreport`(
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `PRJ` mediumint(8) unsigned NOT NULL,
+ `weekStart` date NOT NULL,
+ `pv` float(9,2) NOT NULL,
+ `ev` float(9,2) NOT NULL,
+ `ac` float(9,2) NOT NULL,
+ `sv` float(9,2) NOT NULL,
+ `cv` float(9,2) NOT NULL,
+ `staff` smallint(5) unsigned NOT NULL,
+ `progress` varchar(255) NOT NULL,
+ `workload` varchar(255) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `week` (`PRJ`,`weekStart`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+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 `URChanged` enum('0','1') NOT NULL DEFAULT '0' AFTER `version`;
+
+ALTER TABLE `zt_team` MODIFY `type` enum('project','task','stage','sprint') NOT NULL DEFAULT 'project' AFTER `root`;
+
+CREATE TABLE IF NOT EXISTS `zt_planstory` (
+ `plan` mediumint(8) unsigned NOT NULL,
+ `story` mediumint(8) unsigned NOT NULL,
+ `order` mediumint(9) NOT NULL,
+ UNIQUE KEY `unique` (`plan`,`story`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `zt_acl` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL,
+ `objectType` char(30) NOT NULL,
+ `objectID` mediumint(9) NOT NULL DEFAULT '0',
+ `type` char(40) NOT NULL DEFAULT 'whitelist',
+ `source` char(30) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- DROP TABLE IF EXISTS `zt_searchindex`;
+CREATE TABLE IF NOT EXISTS `zt_searchindex` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `objectType` char(20) NOT NULL,
+ `objectID` mediumint(9) NOT NULL,
+ `title` text NOT NULL,
+ `content` text NOT NULL,
+ `addedDate` datetime NOT NULL,
+ `editedDate` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `object` (`objectType`,`objectID`),
+ KEY `addedDate` (`addedDate`),
+ FULLTEXT KEY `content` (`content`),
+ FULLTEXT KEY `title` (`title`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- DROP TABLE IF EXISTS `zt_searchdict`;
+CREATE TABLE IF NOT EXISTS `zt_searchdict` (
+ `key` smallint(5) unsigned NOT NULL,
+ `value` char(3) NOT NULL,
+ PRIMARY KEY (`key`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
+(1, 'product', 'dashboard'),
+(1, 'projectstory', 'story'),
+(1, 'projectstory', 'track'),
+(1, 'projectstory', 'view'),
+(1, 'projectstory', 'linkStory'),
+(1, 'projectstory', 'unLinkStory'),
+(1, 'my', 'preference'),
+(1, 'my', 'uploadAvatar'),
+(1, 'user', 'execution'),
+(1, 'user', 'issue'),
+(1, 'user', 'risk'),
+(1, 'user', 'cropAvatar'),
+(1, 'program', 'PRJView'),
+(1, 'search', 'index'),
+(1, 'search', 'buildIndex'),
+(2, 'product', 'dashboard'),
+(2, 'projectstory', 'story'),
+(2, 'projectstory', 'track'),
+(2, 'projectstory', 'view'),
+(2, 'my', 'preference'),
+(2, 'my', 'uploadAvatar'),
+(2, 'user', 'execution'),
+(2, 'user', 'issue'),
+(2, 'user', 'risk'),
+(2, 'user', 'cropAvatar'),
+(2, 'search', 'index'),
+(3, 'product', 'dashboard'),
+(3, 'projectstory', 'story'),
+(3, 'projectstory', 'track'),
+(3, 'projectstory', 'view'),
+(3, 'my', 'preference'),
+(3, 'my', 'uploadAvatar'),
+(3, 'user', 'execution'),
+(3, 'user', 'issue'),
+(3, 'user', 'risk'),
+(3, 'user', 'cropAvatar'),
+(3, 'search', 'index'),
+(4, 'product', 'dashboard'),
+(4, 'projectstory', 'story'),
+(4, 'projectstory', 'track'),
+(4, 'projectstory', 'view'),
+(4, 'my', 'preference'),
+(4, 'my', 'uploadAvatar'),
+(4, 'user', 'execution'),
+(4, 'user', 'issue'),
+(4, 'user', 'risk'),
+(4, 'user', 'cropAvatar'),
+(4, 'program', 'PRJView'),
+(4, 'search', 'index'),
+(5, 'product', 'dashboard'),
+(5, 'projectstory', 'story'),
+(5, 'projectstory', 'track'),
+(5, 'projectstory', 'view'),
+(5, 'projectstory', 'linkStory'),
+(5, 'projectstory', 'unLinkStory'),
+(5, 'my', 'preference'),
+(5, 'my', 'uploadAvatar'),
+(5, 'user', 'execution'),
+(5, 'user', 'issue'),
+(5, 'user', 'risk'),
+(5, 'user', 'cropAvatar'),
+(5, 'program', 'PRJView'),
+(5, 'search', 'index'),
+(6, 'product', 'dashboard'),
+(6, 'projectstory', 'story'),
+(6, 'projectstory', 'track'),
+(6, 'projectstory', 'view'),
+(6, 'my', 'preference'),
+(6, 'my', 'uploadAvatar'),
+(6, 'user', 'execution'),
+(6, 'user', 'issue'),
+(6, 'user', 'risk'),
+(6, 'user', 'cropAvatar'),
+(6, 'program', 'PRJView'),
+(6, 'search', 'index'),
+(7, 'product', 'dashboard'),
+(7, 'projectstory', 'story'),
+(7, 'projectstory', 'track'),
+(7, 'projectstory', 'view'),
+(7, 'projectstory', 'linkStory'),
+(7, 'projectstory', 'unLinkStory'),
+(7, 'my', 'preference'),
+(7, 'my', 'uploadAvatar'),
+(7, 'user', 'execution'),
+(7, 'user', 'issue'),
+(7, 'user', 'risk'),
+(7, 'user', 'cropAvatar'),
+(7, 'program', 'PRJView'),
+(7, 'search', 'index'),
+(8, 'product', 'dashboard'),
+(8, 'projectstory', 'story'),
+(8, 'projectstory', 'track'),
+(8, 'projectstory', 'view'),
+(8, 'my', 'preference'),
+(8, 'my', 'uploadAvatar'),
+(8, 'user', 'execution'),
+(8, 'user', 'issue'),
+(8, 'user', 'risk'),
+(8, 'user', 'cropAvatar'),
+(8, 'program', 'PRJView'),
+(8, 'search', 'index'),
+(9, 'product', 'dashboard'),
+(9, 'projectstory', 'story'),
+(9, 'projectstory', 'track'),
+(9, 'projectstory', 'view'),
+(9, 'projectstory', 'linkStory'),
+(9, 'projectstory', 'unLinkStory'),
+(9, 'my', 'preference'),
+(9, 'my', 'uploadAvatar'),
+(9, 'user', 'execution'),
+(9, 'user', 'issue'),
+(9, 'user', 'risk'),
+(9, 'user', 'cropAvatar'),
+(9, 'program', 'PRJView'),
+(9, 'search', 'index'),
+(10, 'product', 'dashboard'),
+(10, 'projectstory', 'story'),
+(10, 'projectstory', 'track'),
+(10, 'projectstory', 'view'),
+(10, 'my', 'preference'),
+(10, 'my', 'uploadAvatar'),
+(10, 'user', 'execution'),
+(10, 'user', 'issue'),
+(10, 'user', 'risk'),
+(10, 'user', 'cropAvatar'),
+(10, 'search', 'index'),
+(11, 'product', 'dashboard'),
+(11, 'projectstory', 'story'),
+(11, 'projectstory', 'track'),
+(11, 'projectstory', 'view'),
+(11, 'my', 'preference'),
+(11, 'my', 'uploadAvatar'),
+(11, 'user', 'execution'),
+(11, 'user', 'issue'),
+(11, 'user', 'risk'),
+(11, 'user', 'cropAvatar');
+
+INSERT INTO `zt_lang` (`lang`, `module`, `section`, `key`, `value`, `system`) VALUES
+('zh-cn', 'custom', 'URSRList', '1', '{\"SRName\":\"\\u7814\\u53d1\\u9700\\u6c42\",\"URName\":\"\\u7528\\u6237\\u9700\\u6c42\"}', '1'),('zh-cn', 'custom', 'URSRList', '2', '{\"SRName\":\"\\u8f6f\\u9700\",\"URName\":\"\\u7528\\u9700\"}', '1'),
+('zh-cn', 'custom', 'URSRList', '3', '{\"SRName\":\"\\u6545\\u4e8b\",\"URName\":\"\\u9700\\u6c42\"}', '1'),
+('zh-cn', 'custom', 'URSRList', '4', '{\"SRName\":\"\\u6545\\u4e8b\",\"URName\":\"\\u53f2\\u8bd7\"}', '1');
diff --git a/db/zentao.sql b/db/zentao.sql
index c18fcfaa03..386d90271f 100644
--- a/db/zentao.sql
+++ b/db/zentao.sql
@@ -1733,6 +1733,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(1,'program','PRJStart'),
(1,'program','PRJSuspend'),
(1,'program','PRJView'),
+(1,'program','PRJUpdateOrder'),
(1,'program','PRJWhitelist'),
(1,'program','unbindWhielist'),
(1,'program','unlinkStakeholder'),
@@ -2539,6 +2540,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(4,'program','PRJProgramTitle'),
(4,'program','PRJStart'),
(4,'program','PRJSuspend'),
+(4,'program','PRJUpdateOrder'),
(4,'program','PRJView'),
(4,'program','PRJWhitelist'),
(4,'program','unbindWhielist'),
@@ -2845,6 +2847,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(5,'program','PRJStart'),
(5,'program','PRJSuspend'),
(5,'program','PRJView'),
+(5,'program','PRJUpdateOrder'),
(5,'program','PRJWhitelist'),
(5,'program','unbindWhielist'),
(5,'program','unlinkStakeholder'),
@@ -3138,6 +3141,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(6,'program','PRJStart'),
(6,'program','PRJSuspend'),
(6,'program','PRJView'),
+(6,'program','PRJUpdateOrder'),
(6,'program','PRJWhitelist'),
(6,'program','unbindWhielist'),
(6,'program','unlinkStakeholder'),
@@ -3424,6 +3428,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(7,'program','PRJStart'),
(7,'program','PRJSuspend'),
(7,'program','PRJView'),
+(7,'program','PRJUpdateOrder'),
(7,'program','PRJWhitelist'),
(7,'program','unbindWhielist'),
(7,'program','unlinkStakeholder'),
@@ -3692,6 +3697,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(8,'program','PRJStart'),
(8,'program','PRJSuspend'),
(8,'program','PRJView'),
+(8,'program','PRJUpdateOrder'),
(8,'program','PRJWhitelist'),
(8,'program','unbindWhielist'),
(8,'program','unlinkStakeholder'),
@@ -3970,6 +3976,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(9,'program','PRJStart'),
(9,'program','PRJSuspend'),
(9,'program','PRJView'),
+(9,'program','PRJUpdateOrder'),
(9,'program','PRJWhitelist'),
(9,'program','unbindWhielist'),
(9,'program','unlinkStakeholder'),
@@ -4323,7 +4330,7 @@ INSERT INTO `zt_stage` (`name`,`percent`,`type`,`createdBy`,`createdDate`,`edite
('总结评审','5','review','admin','2020-02-08 21:08:45','admin','2020-02-12 13:50:27','0');
INSERT INTO `zt_lang` (`lang`, `module`, `section`, `key`, `value`, `system`) VALUES
-('zh-cn', 'custom', 'URSRList', '1', '{\"SRName\":\"\\u8f6f\\u4ef6\\u9700\\u6c42\",\"URName\":\"\\u7528\\u6237\\u9700\\u6c42\"}', '1'),
+('zh-cn', 'custom', 'URSRList', '1', '{\"SRName\":\"\\u7814\\u53d1\\u9700\\u6c42\",\"URName\":\"\\u7528\\u6237\\u9700\\u6c42\"}', '1'),
('zh-cn', 'custom', 'URSRList', '2', '{\"SRName\":\"\\u8f6f\\u9700\",\"URName\":\"\\u7528\\u9700\"}', '1'),
('zh-cn', 'custom', 'URSRList', '3', '{\"SRName\":\"\\u6545\\u4e8b\",\"URName\":\"\\u9700\\u6c42\"}', '1'),
('zh-cn', 'custom', 'URSRList', '4', '{\"SRName\":\"\\u6545\\u4e8b\",\"URName\":\"\\u53f2\\u8bd7\"}', '1');
diff --git a/module/action/model.php b/module/action/model.php
index 9f8b0779bb..8062c46551 100755
--- a/module/action/model.php
+++ b/module/action/model.php
@@ -662,6 +662,19 @@ class actionModel extends model
if($this->app->user->admin) $condition = 1;
}
+ /* If is project, select its related. */
+ $executions = array();
+ $products = array();
+ if(is_numeric($projectID))
+ {
+ $project = $this->loadModel('program')->getPRJByID($projectID);
+ if($project->type == 'project')
+ {
+ $executions = $this->loadModel('project')->getExecutionPairs($projectID);
+ $products = $this->loadModel('product')->getProductPairsByProject($projectID);
+ }
+ }
+
$this->loadModel('doc');
$libs = $this->doc->getLibs('all');
$docs = $this->doc->getPrivDocs(array_keys($libs), 0, 'all');
@@ -677,6 +690,8 @@ class actionModel extends model
->beginIF($account != 'all')->andWhere('actor')->eq($account)->fi()
->beginIF(is_numeric($productID))->andWhere('product')->like("%,$productID,%")->fi()
->beginIF(is_numeric($projectID))->andWhere('project')->eq($projectID)->fi()
+ ->beginIF(!empty($executions))->markLeft()->orWhere('project')->in(array_keys($executions))->fi()->markRight()
+ ->beginIF(!empty($products))->markLeft()->orWhere('product')->in(array_keys($products))->fi()->markRight()
->beginIF($productID == 'notzero')->andWhere('product')->gt(0)->andWhere('product')->notlike('%,0,%')->fi()
->beginIF($projectID == 'notzero')->andWhere('project')->gt(0)->fi()
->beginIF($projectID == 'all' or $productID == 'all')->andWhere("IF((objectType!= 'doc' && objectType!= 'doclib'), ($condition), '1=1')")->fi()
diff --git a/module/block/control.php b/module/block/control.php
index 073c6f835b..7522f3e703 100644
--- a/module/block/control.php
+++ b/module/block/control.php
@@ -1315,7 +1315,7 @@ class block extends control
$count = isset($this->params->count) ? (int)$this->params->count : 15;
$type = isset($this->params->type) ? $this->params->type : 'all';
$pager = pager::init(0, $count, 1);
- $this->view->executionStats = $this->loadModel('project')->getExecutionStats($this->session->PRJ, $type, 0, 0, 30, 'id_asc', $pager);
+ $this->view->executionStats = $this->loadModel('project')->getExecutionStats($this->session->PRJ, $type, 0, 0, 30, 'id_desc', $pager);
}
/**
diff --git a/module/bug/css/edit.css b/module/bug/css/edit.css
index 581c88c64e..fe1b116189 100644
--- a/module/bug/css/edit.css
+++ b/module/bug/css/edit.css
@@ -4,3 +4,4 @@
.col-side .chosen-container[id^="resolvedBuild"] {width: 172px!important}
.chosen-choices li.search-choice{word-break: break-all;}
#linkBugBox > li {margin-left:-56px}
+#branch{width: 95px;}
diff --git a/module/bug/view/edit.html.php b/module/bug/view/edit.html.php
index 4015f40ad6..6ca237a0d3 100644
--- a/module/bug/view/edit.html.php
+++ b/module/bug/view/edit.html.php
@@ -90,7 +90,7 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild);
- session->currentProductType != 'normal') echo html::select('branch', $branches, $bug->branch, "onchange='loadBranch();' class='form-control' style='width:65px'");?>
+ session->currentProductType != 'normal') echo html::select('branch', $branches, $bug->branch, "onchange='loadBranch();' class='form-control'");?>
|
diff --git a/module/common/lang/de.php b/module/common/lang/de.php
index aa018429a3..e2630d2fb2 100644
--- a/module/common/lang/de.php
+++ b/module/common/lang/de.php
@@ -183,14 +183,14 @@ $lang->product->menu->list = array('link' => $lang->productCommon . '|product|al
$lang->product->viewMenu = new stdclass();
$lang->product->viewMenu->requirement = array('link' => "$lang->URCommon|product|browse|productID=%s&branch=&browseType=unclosed¶m=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
$lang->product->viewMenu->story = array('link' => "$lang->SRCommon|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story');
-$lang->product->viewMenu->track = array('link' => "Track|story|track|productID=%s");
$lang->product->viewMenu->plan = array('link' => "Plan|productplan|browse|productID=%s", 'subModule' => 'productplan');
$lang->product->viewMenu->release = array('link' => "Release|release|browse|productID=%s", 'subModule' => 'release');
$lang->product->viewMenu->roadmap = 'Roadmap|product|roadmap|productID=%s';
$lang->product->viewMenu->project = "Project|product|project|status=all&productID=%s";
+$lang->product->viewMenu->track = array('link' => "Track|story|track|productID=%s");
$lang->product->viewMenu->doc = array('link' => 'Doc|doc|objectLibs|type=product&objectID=%s&from=product', 'subModule' => 'doc');
-$lang->product->viewMenu->dynamic = 'Dynamic|product|dynamic|productID=%s';
$lang->product->viewMenu->dashboard = array('link' => 'Dashboard|product|dashboard|productID=%s');
+$lang->product->viewMenu->dynamic = 'Dynamic|product|dynamic|productID=%s';
$lang->product->viewMenu->set = array('link' => 'Setting|product|view|productID=%s', 'subModule' => 'tree,branch', 'alias' => 'edit');
$lang->product->setMenu = new stdclass();
@@ -342,7 +342,7 @@ $lang->scrumproduct->menu->view = array('link' => 'Übersicht|product|view|p
$lang->scrumproduct->menu->requirement = array('link' => "Requirement|product|browse|productID=%s&branch=&browseType=unclosed¶m=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
$lang->scrumproduct->menu->story = array('link' => "Story|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story');
-$lang->product->dividerMenu = ',plan,project,';
+$lang->product->dividerMenu = ',plan,project,dashboard,';
$lang->story = new stdclass();
diff --git a/module/common/lang/en.php b/module/common/lang/en.php
index a712f2b8a3..6d13a2e0df 100644
--- a/module/common/lang/en.php
+++ b/module/common/lang/en.php
@@ -183,14 +183,14 @@ $lang->product->menu->list = array('link' => $lang->productCommon . '|product|al
$lang->product->viewMenu = new stdclass();
$lang->product->viewMenu->requirement = array('link' => "$lang->URCommon|product|browse|productID=%s&branch=&browseType=unclosed¶m=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
$lang->product->viewMenu->story = array('link' => "$lang->SRCommon|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story');
-$lang->product->viewMenu->track = array('link' => "Track|story|track|productID=%s");
$lang->product->viewMenu->plan = array('link' => "Plan|productplan|browse|productID=%s", 'subModule' => 'productplan');
$lang->product->viewMenu->release = array('link' => "Release|release|browse|productID=%s", 'subModule' => 'release');
$lang->product->viewMenu->roadmap = 'Roadmap|product|roadmap|productID=%s';
$lang->product->viewMenu->project = "Project|product|project|status=all&productID=%s";
+$lang->product->viewMenu->track = array('link' => "Track|story|track|productID=%s");
$lang->product->viewMenu->doc = array('link' => 'Doc|doc|objectLibs|type=product&objectID=%s&from=product', 'subModule' => 'doc');
-$lang->product->viewMenu->dynamic = 'Dynamic|product|dynamic|productID=%s';
$lang->product->viewMenu->dashboard = array('link' => 'Dashboard|product|dashboard|productID=%s');
+$lang->product->viewMenu->dynamic = 'Dynamic|product|dynamic|productID=%s';
$lang->product->viewMenu->set = array('link' => 'Setting|product|view|productID=%s', 'subModule' => 'tree,branch', 'alias' => 'edit');
$lang->product->setMenu = new stdclass();
@@ -342,7 +342,7 @@ $lang->scrumproduct->menu->view = array('link' => 'Overview|product|view|pro
$lang->scrumproduct->menu->requirement = array('link' => "Requirement|product|browse|productID=%s&branch=&browseType=unclosed¶m=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
$lang->scrumproduct->menu->story = array('link' => "Story|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story');
-$lang->product->dividerMenu = ',plan,project,';
+$lang->product->dividerMenu = ',plan,project,dashboard,';
$lang->story = new stdclass();
diff --git a/module/common/lang/fr.php b/module/common/lang/fr.php
index 4056c3feb5..66b4482308 100644
--- a/module/common/lang/fr.php
+++ b/module/common/lang/fr.php
@@ -183,14 +183,14 @@ $lang->product->menu->list = array('link' => $lang->productCommon . '|product|al
$lang->product->viewMenu = new stdclass();
$lang->product->viewMenu->requirement = array('link' => "$lang->URCommon|product|browse|productID=%s&branch=&browseType=unclosed¶m=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
$lang->product->viewMenu->story = array('link' => "$lang->SRCommon|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story');
-$lang->product->viewMenu->track = array('link' => "Track|story|track|productID=%s");
$lang->product->viewMenu->plan = array('link' => "Plan|productplan|browse|productID=%s", 'subModule' => 'productplan');
$lang->product->viewMenu->release = array('link' => "Release|release|browse|productID=%s", 'subModule' => 'release');
$lang->product->viewMenu->roadmap = 'Roadmap|product|roadmap|productID=%s';
$lang->product->viewMenu->project = "Project|product|project|status=all&productID=%s";
+$lang->product->viewMenu->track = array('link' => "Track|story|track|productID=%s");
$lang->product->viewMenu->doc = array('link' => 'Doc|doc|objectLibs|type=product&objectID=%s&from=product', 'subModule' => 'doc');
-$lang->product->viewMenu->dynamic = 'Dynamic|product|dynamic|productID=%s';
$lang->product->viewMenu->dashboard = array('link' => 'Dashboard|product|dashboard|productID=%s');
+$lang->product->viewMenu->dynamic = 'Dynamic|product|dynamic|productID=%s';
$lang->product->viewMenu->set = array('link' => 'Setting|product|view|productID=%s', 'subModule' => 'tree,branch', 'alias' => 'edit');
$lang->product->setMenu = new stdclass();
@@ -342,7 +342,7 @@ $lang->scrumproduct->menu->view = array('link' => 'Overview|product|view|pro
$lang->scrumproduct->menu->requirement = array('link' => "Requirement|product|browse|productID=%s&branch=&browseType=unclosed¶m=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
$lang->scrumproduct->menu->story = array('link' => "Story|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story');
-$lang->product->dividerMenu = ',plan,project,';
+$lang->product->dividerMenu = ',plan,project,dashboard,';
$lang->story = new stdclass();
diff --git a/module/common/lang/menuOrder.php b/module/common/lang/menuOrder.php
index e9cd26b6f2..077e65b72b 100644
--- a/module/common/lang/menuOrder.php
+++ b/module/common/lang/menuOrder.php
@@ -56,14 +56,14 @@ $lang->todo->menuOrder = $lang->my->menuOrder;
/* product menu order. */
$lang->product->menuOrder[5] = 'requirement';
$lang->product->menuOrder[10] = 'story';
-$lang->product->menuOrder[15] = 'track';
-$lang->product->menuOrder[20] = 'plan';
-$lang->product->menuOrder[25] = 'release';
-$lang->product->menuOrder[30] = 'roadmap';
-$lang->product->menuOrder[35] = 'project';
+$lang->product->menuOrder[15] = 'plan';
+$lang->product->menuOrder[20] = 'release';
+$lang->product->menuOrder[25] = 'roadmap';
+$lang->product->menuOrder[30] = 'project';
+$lang->product->menuOrder[35] = 'track';
$lang->product->menuOrder[40] = 'doc';
-$lang->product->menuOrder[45] = 'dynamic';
-$lang->product->menuOrder[50] = 'dashboard';
+$lang->product->menuOrder[45] = 'dashboard';
+$lang->product->menuOrder[50] = 'dynamic';
$lang->product->menuOrder[55] = 'setting';
$lang->product->menuOrder[60] = 'create';
$lang->product->menuOrder[65] = 'all';
diff --git a/module/common/lang/vi.php b/module/common/lang/vi.php
index 3c951da3ab..28a7fdebab 100644
--- a/module/common/lang/vi.php
+++ b/module/common/lang/vi.php
@@ -183,14 +183,14 @@ $lang->product->menu->list = array('link' => $lang->productCommon . '|product|al
$lang->product->viewMenu = new stdclass();
$lang->product->viewMenu->requirement = array('link' => "$lang->URCommon|product|browse|productID=%s&branch=&browseType=unclosed¶m=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
$lang->product->viewMenu->story = array('link' => "$lang->SRCommon|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story');
-$lang->product->viewMenu->track = array('link' => "Track|story|track|productID=%s");
$lang->product->viewMenu->plan = array('link' => "Plan|productplan|browse|productID=%s", 'subModule' => 'productplan');
$lang->product->viewMenu->release = array('link' => "Release|release|browse|productID=%s", 'subModule' => 'release');
$lang->product->viewMenu->roadmap = 'Roadmap|product|roadmap|productID=%s';
$lang->product->viewMenu->project = "Project|product|project|status=all&productID=%s";
+$lang->product->viewMenu->track = array('link' => "Track|story|track|productID=%s");
$lang->product->viewMenu->doc = array('link' => 'Doc|doc|objectLibs|type=product&objectID=%s&from=product', 'subModule' => 'doc');
-$lang->product->viewMenu->dynamic = 'Dynamic|product|dynamic|productID=%s';
$lang->product->viewMenu->dashboard = array('link' => 'Dashboard|product|dashboard|productID=%s');
+$lang->product->viewMenu->dynamic = 'Dynamic|product|dynamic|productID=%s';
$lang->product->viewMenu->set = array('link' => 'Setting|product|view|productID=%s', 'subModule' => 'tree,branch', 'alias' => 'edit');
$lang->product->setMenu = new stdclass();
@@ -342,7 +342,7 @@ $lang->scrumproduct->menu->view = array('link' => 'Overview|product|view|pro
$lang->scrumproduct->menu->requirement = array('link' => "Requirement|product|browse|productID=%s&branch=&browseType=unclosed¶m=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
$lang->scrumproduct->menu->story = array('link' => "Story|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story');
-$lang->product->dividerMenu = ',plan,project,';
+$lang->product->dividerMenu = ',plan,project,dashboard,';
$lang->story = new stdclass();
diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php
index a29e9c3d4c..fd28e82e0b 100644
--- a/module/common/lang/zh-cn.php
+++ b/module/common/lang/zh-cn.php
@@ -183,14 +183,14 @@ $lang->product->menu->list = array('link' => $lang->productCommon . '|product|al
$lang->product->viewMenu = new stdclass();
$lang->product->viewMenu->requirement = array('link' => "$lang->URCommon|product|browse|productID=%s&branch=&browseType=unclosed¶m=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
$lang->product->viewMenu->story = array('link' => "$lang->SRCommon|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story');
-$lang->product->viewMenu->track = array('link' => "矩阵|story|track|productID=%s");
$lang->product->viewMenu->plan = array('link' => "计划|productplan|browse|productID=%s", 'subModule' => 'productplan');
$lang->product->viewMenu->release = array('link' => '发布|release|browse|productID=%s', 'subModule' => 'release');
$lang->product->viewMenu->roadmap = '路线图|product|roadmap|productID=%s';
$lang->product->viewMenu->project = "项目|product|project|status=all&productID=%s";
+$lang->product->viewMenu->track = array('link' => "矩阵|story|track|productID=%s");
$lang->product->viewMenu->doc = array('link' => '文档|doc|objectLibs|type=product&objectID=%s&from=product', 'subModule' => 'doc');
-$lang->product->viewMenu->dynamic = '动态|product|dynamic|productID=%s';
$lang->product->viewMenu->dashboard = array('link' => '仪表盘|product|dashboard|productID=%s');
+$lang->product->viewMenu->dynamic = '动态|product|dynamic|productID=%s';
$lang->product->viewMenu->set = array('link' => '设置|product|view|productID=%s', 'subModule' => 'tree,branch', 'alias' => 'edit');
$lang->product->setMenu = new stdclass();
@@ -342,7 +342,7 @@ $lang->scrumproduct->menu->view = array('link' => '概况|product|view|produc
$lang->scrumproduct->menu->requirement = array('link' => "{$lang->URCommon}|product|browse|productID=%s&branch=&browseType=unclosed¶m=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
$lang->scrumproduct->menu->story = array('link' => "{$lang->SRCommon}|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story');
-$lang->product->dividerMenu = ',plan,project,';
+$lang->product->dividerMenu = ',plan,project,dashboard,';
$lang->story = new stdclass();
diff --git a/module/common/view/datatable.html.php b/module/common/view/datatable.html.php
index 65b513da25..9de1d6f468 100644
--- a/module/common/view/datatable.html.php
+++ b/module/common/view/datatable.html.php
@@ -22,7 +22,7 @@
.datatable .flexarea tbody>tr.checked>td:first-child:before,
.datatable .fixed-right tbody>tr.checked>td:first-child:before {display: none}
.datatable>.scroll-wrapper {z-index: 10;}
-.has-fixed-footer .scroll-wrapper {bottom: 89px; position: fixed;}
+.has-fixed-footer .scroll-wrapper {bottom: 49px; position: fixed;}
.has-fixed-footer .scroll-wrapper .scroll-slide.scroll-pos-out{height:8px;bottom: -8px;}
.has-fixed-footer .scroll-wrapper .scroll-slide.scroll-pos-out .bar{height:8px;}
.datatable .flexarea thead>tr>th:first-child,
diff --git a/module/company/control.php b/module/company/control.php
index bdad408e0a..949d37cc4b 100644
--- a/module/company/control.php
+++ b/module/company/control.php
@@ -89,6 +89,22 @@ class company extends control
$this->view->param = $param;
$this->view->type = $type;
$this->view->browseType = $browseType;
+ $this->view->companies = $this->company->getOutsideCompanies();
+
+ $this->display();
+ }
+
+ public function create()
+ {
+ if(!empty($_POST))
+ {
+ $this->company->create();
+ if(dao::isError()) die(js::error(dao::getError()));
+ die(js::reload('parent.parent'));
+ }
+
+ $this->view->title = $this->lang->company->common . $this->lang->colon . $this->lang->company->create;
+ $this->view->position = $this->lang->company->create;
$this->display();
}
@@ -259,4 +275,16 @@ class company extends control
$this->view->direction = $direction;
$this->display();
}
+
+ /**
+ * Ajax get outside company.
+ *
+ * @access public
+ * @return void
+ */
+ public function ajaxGetOutsideCompany()
+ {
+ $companies = $this->company->getOutsideCompanies();
+ die(html::select('company', $companies, '', "class='form-control chosen'"));
+ }
}
diff --git a/module/company/lang/de.php b/module/company/lang/de.php
index 1323c82882..826c3e6908 100644
--- a/module/company/lang/de.php
+++ b/module/company/lang/de.php
@@ -11,6 +11,7 @@
*/
$lang->company->common = 'Unternehmen';
$lang->company->index = "Start";
+$lang->company->create = "Add Company";
$lang->company->edit = "Bearbeiten";
$lang->company->view = "Unternehmensinfo";
$lang->company->browse = "Benutzerliste";
diff --git a/module/company/lang/en.php b/module/company/lang/en.php
index 2d63e793bf..616de0bb1e 100644
--- a/module/company/lang/en.php
+++ b/module/company/lang/en.php
@@ -11,6 +11,7 @@
*/
$lang->company->common = 'Company';
$lang->company->index = "Company Home";
+$lang->company->create = "Add Company";
$lang->company->edit = "Edit Company";
$lang->company->view = "Company Information";
$lang->company->browse = "User List";
diff --git a/module/company/lang/fr.php b/module/company/lang/fr.php
index d5a78211f1..7a9441fc3e 100644
--- a/module/company/lang/fr.php
+++ b/module/company/lang/fr.php
@@ -11,6 +11,7 @@
*/
$lang->company->common = 'Entreprise';
$lang->company->index = "Accueil Entreprise";
+$lang->company->create = "Add Company";
$lang->company->edit = "Edit Entreprise";
$lang->company->view = "Informations Entreprise";
$lang->company->browse = "Liste Utilisateurs";
diff --git a/module/company/lang/vi.php b/module/company/lang/vi.php
index b13554d51a..db6f502da6 100644
--- a/module/company/lang/vi.php
+++ b/module/company/lang/vi.php
@@ -11,6 +11,7 @@
*/
$lang->company->common = 'Doanh nghiệp';
$lang->company->index = "Trang doanh nghiệp";
+$lang->company->create = "Add Company";
$lang->company->edit = "Sửa doanh nghiệp";
$lang->company->view = "Thông tin doanh nghiệp";
$lang->company->browse = "Danh sách người dùng";
diff --git a/module/company/lang/zh-cn.php b/module/company/lang/zh-cn.php
index 1719897844..c7071e5bff 100644
--- a/module/company/lang/zh-cn.php
+++ b/module/company/lang/zh-cn.php
@@ -11,6 +11,7 @@
*/
$lang->company->common = '组织视图';
$lang->company->index = "组织视图首页";
+$lang->company->create = "添加公司";
$lang->company->edit = "编辑公司";
$lang->company->view = "公司信息";
$lang->company->browse = "用户列表";
diff --git a/module/company/lang/zh-tw.php b/module/company/lang/zh-tw.php
index 0086ab0d10..bc8bc62ecb 100644
--- a/module/company/lang/zh-tw.php
+++ b/module/company/lang/zh-tw.php
@@ -11,6 +11,7 @@
*/
$lang->company->common = '組織視圖';
$lang->company->index = "組織視圖首頁";
+$lang->company->create = "添加公司";
$lang->company->edit = "編輯公司";
$lang->company->view = "公司信息";
$lang->company->browse = "用戶列表";
diff --git a/module/company/view/browse.html.php b/module/company/view/browse.html.php
index 95e4f1e7e2..68d7de4ca1 100644
--- a/module/company/view/browse.html.php
+++ b/module/company/view/browse.html.php
@@ -72,7 +72,11 @@ js::set('confirmDelete', $lang->user->confirmDelete);
user->realname);?> |
user->account);?> |
+
user->role);?> |
+
+ user->company);?> |
+
user->email);?> |
user->gender);?> |
user->phone);?> |
@@ -94,7 +98,11 @@ js::set('confirmDelete', $lang->user->confirmDelete);
realname;?> |
account;?> |
+
'>user->roleList, $user->role, '');?> |
+
+ '>company, '');?> |
+
email);?> |
user->genderList, $user->gender, $user->gender);?> |
phone;?> |
diff --git a/module/custom/control.php b/module/custom/control.php
index d29fdfb878..414aecfdfd 100644
--- a/module/custom/control.php
+++ b/module/custom/control.php
@@ -505,17 +505,9 @@ class custom extends control
else
{
$lang = $this->app->getClientLang();
- $this->dao->delete()->from(TABLE_LANG)
- ->where('lang')->eq($lang)
- ->andWhere('section')->eq('URSRList')
- ->andWhere('`key`')->eq($key)
- ->exec();
-
- $defaultConcept = $this->dao->select('`value`')->from(TABLE_CONFIG)
- ->where('module')->eq('custom')
- ->andWhere('`key`')->eq('URSR')
- ->fetch('value');
+ $this->custom->deleteItems("lang=$lang§ion=URSRList&key=$key");
+ $defaultConcept = $this->loadModel('setting')->getItem('owner=system&module=custom&key=URSR');
$this->dao->update(TABLE_CONFIG)
->set('`value`')->eq($defaultConcept)
->where('module')->eq('common')
@@ -523,16 +515,6 @@ class custom extends control
->andWhere('`value`')->eq($key)
->exec();
- /* Stay default concept. */
- if($defaultConcept == $key)
- {
- $this->dao->update(TABLE_CONFIG)
- ->set('`value`')->eq(1)
- ->where('module')->eq('custom')
- ->andWhere('`key`')->eq('URSR')
- ->exec();
- }
-
die(js::locate(inlink('browseStoryConcept'), 'parent'));
}
}
diff --git a/module/dept/model.php b/module/dept/model.php
index c9abd3057b..7d5af90737 100644
--- a/module/dept/model.php
+++ b/module/dept/model.php
@@ -384,7 +384,7 @@ class deptModel extends model
* Get user pairs of a department.
*
* @param int $deptID
- * @param string $params
+ * @param string $params userid|outside|all
* @access public
* @return array
*/
@@ -392,9 +392,11 @@ class deptModel extends model
{
$childDepts = $this->getAllChildID($deptID);
$keyField = strpos($params, 'useid') !== false ? 'id' : 'account';
+ $type = (strpos($params, 'outside') !== false) ? 'outside' : 'inside';
return $this->dao->select("$keyField, realname")->from(TABLE_USER)
->where('deleted')->eq(0)
+ ->beginIF(strpos($params, 'all') === false)->andWhere('type')->eq($type)->fi()
->beginIF($deptID)->andWhere('dept')->in($childDepts)->fi()
->orderBy('account')
->fetchPairs();
diff --git a/module/index/css/index.css b/module/index/css/index.css
index a2e7e20609..359a4665a0 100644
--- a/module/index/css/index.css
+++ b/module/index/css/index.css
@@ -24,11 +24,11 @@ body.menu-hide {padding-left: 0;}
.menu-hide #menu .nav > li > a > .text {display: none}
.menu-hide #menu .nav > li.has-avatar > a {padding: 2px 0;}
-#moreExecution {display:none; max-height: 520px; min-height: 520px; max-width:260px; min-width: 150px; position: fixed; bottom: 40px; z-index: 999; background: white; padding: 20px 10px; border: 1px solid #efefef}
+#moreExecution {display:none; max-height: 520px; min-height: 520px; max-width:360px; min-width: 150px; position: fixed; bottom: 40px; z-index: 999; background: white; padding: 20px 10px; border: 1px solid #efefef}
.more-execution-show {left: 96px;}
.more-execution-hide {left: 40px;}
#moreExecution .icon-search {opacity: 0.5;}
-#executionList {max-height: 450px; min-height: 450px; max-width:260px; min-width: 150px; margin-top: 5px;}
+#executionList {max-height: 450px; min-height: 450px; max-width:360px; min-width: 150px; margin-top: 5px;}
@media screen and (max-height: 768px)
{
diff --git a/module/misc/control.php b/module/misc/control.php
index 93cab219cf..49734fcea7 100644
--- a/module/misc/control.php
+++ b/module/misc/control.php
@@ -227,6 +227,9 @@ class misc extends control
*/
public function captcha($sessionVar = 'captcha', $uuid = '')
{
+ $obLevel = ob_get_level();
+ for($i = 0; $i < $obLevel; $i++) ob_end_clean();
+
header('Content-Type: image/jpeg');
$captcha = $this->app->loadClass('captcha');
$this->session->set($sessionVar, $captcha->getPhrase());
diff --git a/module/my/view/project.html.php b/module/my/view/project.html.php
index fb0881cab1..5298fb3f86 100644
--- a/module/my/view/project.html.php
+++ b/module/my/view/project.html.php
@@ -43,7 +43,7 @@
program->begin;?> |
program->end;?> |
- program->PRJBudget;?> |
+ program->PRJBudget;?> |
program->PRJPM;?> |
actions;?> |
@@ -60,7 +60,8 @@
begin;?> |
end == '0000-00-00' ? '' : $project->end;?> |
- budget != 0 ? zget($lang->program->currencySymbol, $project->budgetUnit) . number_format($project->budget, 2) : $lang->program->future;?> |
+ app->getClientLang(), ['zh-cn','zh-tw']) && $project->budget >= 10000 ? number_format($project->budget / 10000, 1) . $this->lang->program->tenThousand : number_format($project->budget, 1);?>
+ budget != 0 ? zget($lang->program->currencySymbol, $project->budgetUnit) . ' ' . $programBudget : $lang->program->future;?> |
PM]) ? $PMList[$project->PM]->id : ''?>
PM)) echo html::a($this->createLink('user', 'profile', "userID=$userID", '', true), zget($users, $project->PM), '', "data-toggle='modal' data-type='iframe' data-width='600'");?>
diff --git a/module/personnel/lang/de.php b/module/personnel/lang/de.php
index 37e5aa2514..ab1aa7622b 100644
--- a/module/personnel/lang/de.php
+++ b/module/personnel/lang/de.php
@@ -27,8 +27,8 @@ $lang->personnel->created = 'Created';
$lang->personnel->finished = 'Finished';
$lang->personnel->wait = 'Pending';
$lang->personnel->resolved = 'Resolved';
-$lang->personnel->UR = 'UR';
-$lang->personnel->SR = 'SR';
+$lang->personnel->UR = $lang->URCommon;
+$lang->personnel->SR = $lang->SRCommon;
$lang->personnel->whitelist = 'Whitelist';
$lang->personnel->addWhitelist = 'Add Whitelist';
diff --git a/module/personnel/lang/en.php b/module/personnel/lang/en.php
index 37e5aa2514..ab1aa7622b 100644
--- a/module/personnel/lang/en.php
+++ b/module/personnel/lang/en.php
@@ -27,8 +27,8 @@ $lang->personnel->created = 'Created';
$lang->personnel->finished = 'Finished';
$lang->personnel->wait = 'Pending';
$lang->personnel->resolved = 'Resolved';
-$lang->personnel->UR = 'UR';
-$lang->personnel->SR = 'SR';
+$lang->personnel->UR = $lang->URCommon;
+$lang->personnel->SR = $lang->SRCommon;
$lang->personnel->whitelist = 'Whitelist';
$lang->personnel->addWhitelist = 'Add Whitelist';
diff --git a/module/personnel/lang/fr.php b/module/personnel/lang/fr.php
index 37e5aa2514..ab1aa7622b 100644
--- a/module/personnel/lang/fr.php
+++ b/module/personnel/lang/fr.php
@@ -27,8 +27,8 @@ $lang->personnel->created = 'Created';
$lang->personnel->finished = 'Finished';
$lang->personnel->wait = 'Pending';
$lang->personnel->resolved = 'Resolved';
-$lang->personnel->UR = 'UR';
-$lang->personnel->SR = 'SR';
+$lang->personnel->UR = $lang->URCommon;
+$lang->personnel->SR = $lang->SRCommon;
$lang->personnel->whitelist = 'Whitelist';
$lang->personnel->addWhitelist = 'Add Whitelist';
diff --git a/module/personnel/lang/vi.php b/module/personnel/lang/vi.php
index 37e5aa2514..ab1aa7622b 100644
--- a/module/personnel/lang/vi.php
+++ b/module/personnel/lang/vi.php
@@ -27,8 +27,8 @@ $lang->personnel->created = 'Created';
$lang->personnel->finished = 'Finished';
$lang->personnel->wait = 'Pending';
$lang->personnel->resolved = 'Resolved';
-$lang->personnel->UR = 'UR';
-$lang->personnel->SR = 'SR';
+$lang->personnel->UR = $lang->URCommon;
+$lang->personnel->SR = $lang->SRCommon;
$lang->personnel->whitelist = 'Whitelist';
$lang->personnel->addWhitelist = 'Add Whitelist';
diff --git a/module/personnel/lang/zh-cn.php b/module/personnel/lang/zh-cn.php
index 48ebe0644c..f02ff646d5 100644
--- a/module/personnel/lang/zh-cn.php
+++ b/module/personnel/lang/zh-cn.php
@@ -27,8 +27,8 @@ $lang->personnel->created = '创建';
$lang->personnel->finished = '完成';
$lang->personnel->wait = '待处理';
$lang->personnel->resolved = '解决';
-$lang->personnel->UR = '用需';
-$lang->personnel->SR = '软需';
+$lang->personnel->UR = $lang->URCommon;
+$lang->personnel->SR = $lang->SRCommon;
$lang->personnel->whitelist = '白名单列表';
$lang->personnel->addWhitelist = '添加白名单';
diff --git a/module/personnel/lang/zh-tw.php b/module/personnel/lang/zh-tw.php
index 878229faa4..3c39ea8872 100644
--- a/module/personnel/lang/zh-tw.php
+++ b/module/personnel/lang/zh-tw.php
@@ -27,8 +27,8 @@ $lang->personnel->created = '創建';
$lang->personnel->finished = '完成';
$lang->personnel->wait = '待處理';
$lang->personnel->resolved = '解決';
-$lang->personnel->UR = '用需';
-$lang->personnel->SR = '軟需';
+$lang->personnel->UR = $lang->URCommon;
+$lang->personnel->SR = $lang->SRCommon;
$lang->personnel->whitelist = '白名單列表';
$lang->personnel->addWhitelist = '添加白名單';
diff --git a/module/product/control.php b/module/product/control.php
index c1ffb3d55d..514ab2d502 100644
--- a/module/product/control.php
+++ b/module/product/control.php
@@ -79,7 +79,7 @@ class product extends control
public function project($status = 'all', $productID = 0, $branch = 0, $PRJMine = 0)
{
$this->product->setMenu($this->products, $productID, $branch);
- $this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($productID);
+ $this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
$this->app->loadLang('my');
@@ -117,10 +117,11 @@ class product extends control
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
+ * @param string $from product|project
* @access public
* @return void
*/
- public function browse($productID = 0, $branch = 0, $browseType = '', $param = 0, $storyType = 'story', $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1)
+ public function browse($productID = 0, $branch = 0, $browseType = '', $param = 0, $storyType = 'story', $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1, $from = 'product')
{
/* Lower browse type. */
$browseType = strtolower($browseType);
@@ -273,6 +274,7 @@ class product extends control
$this->view->products = $this->products;
$this->view->projectProducts = isset($projectProducts) ? $projectProducts : array();
$this->view->storyType = $storyType;
+ $this->view->from = $from;
$this->display();
}
@@ -353,7 +355,7 @@ class product extends control
/* Set menu. */
$this->app->loadLang('custom');
$this->lang->product->menu = $this->lang->product->viewMenu;
- $this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($productID);
+ $this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
@@ -618,7 +620,7 @@ class product extends control
$moduleIndex = array_search('product', $this->lang->noMenuModule);
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
$this->lang->product->menu = $this->lang->product->viewMenu;
- $this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($productID);
+ $this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
$product->desc = $this->loadModel('file')->setImgSize($product->desc);
@@ -677,7 +679,7 @@ class product extends control
public function roadmap($productID, $branch = 0)
{
$this->lang->product->menu = $this->lang->product->viewMenu;
- $this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($productID, '', $branch);
+ $this->lang->product->switcherMenu = $this->product->getSwitcher($productID, '', $branch);
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
$this->product->setMenu($this->products, $productID, $branch);
@@ -750,7 +752,7 @@ class product extends control
$this->view->position[] = html::a($this->createLink($this->moduleName, 'browse'), $this->products[$productID]);
$this->view->position[] = $this->lang->product->dynamic;
- $this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($productID, $type);
+ $this->lang->product->switcherMenu = $this->product->getSwitcher($productID, $type);
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
$this->view->userIdPairs = $this->loadModel('user')->getPairs('noletter|nodeleted|noclosed|useid');
@@ -783,7 +785,7 @@ class product extends control
if(!$product) die(js::locate('product', 'all'));
$this->lang->product->menu = $this->lang->product->viewMenu;
- $this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($productID);
+ $this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
$product->desc = $this->loadModel('file')->setImgSize($product->desc);
@@ -885,14 +887,15 @@ class product extends control
$inProduct = zget($this->lang->navGroup, $module) == 'product';
$products = $inProduct ? $this->product->getList() : $this->product->getProductsByProject($this->session->PRJ);
- $this->view->link = $this->product->getProductLink($module, $method, $extra);
- $this->view->productID = $productID;
- $this->view->module = $module;
- $this->view->method = $method;
- $this->view->extra = $extra;
- $this->view->products = $products;
- $this->view->projectID = $this->session->PRJ;
- $this->view->programs = $this->loadModel('program')->getPGMOption();
+ $this->view->link = $this->product->getProductLink($module, $method, $extra);
+ $this->view->productID = $productID;
+ $this->view->module = $module;
+ $this->view->method = $method;
+ $this->view->extra = $extra;
+ $this->view->products = $products;
+ $this->view->projectID = $this->session->PRJ;
+ $this->view->programs = $this->loadModel('program')->getPGMOption();
+ $this->view->openModule = $inProduct ? 'product' : 'project';
$this->display();
}
@@ -963,7 +966,7 @@ class product extends control
*/
public function all($browseType = 'noclosed', $orderBy = 'order_asc')
{
- $this->lang->product->mainMenuAction = html::a('javascript:history.go(-1);', ' ' . $this->lang->goback, '', "class='btn btn-link'");
+ if($this->session->moreProductLink) $this->lang->product->mainMenuAction = html::a($this->session->moreProductLink, ' ' . $this->lang->goback, '', "class='btn btn-link'");
/* Load module and set session. */
$this->loadModel('program');
@@ -1007,7 +1010,7 @@ class product extends control
public function whitelist($productID = 0, $module = 'product', $objectType = 'product', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$this->lang->product->menu = $this->lang->product->viewMenu;
- $this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($productID, '', 0);
+ $this->lang->product->switcherMenu = $this->product->getSwitcher($productID, '', 0);
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
$this->product->setMenu($this->products, $productID, 0);
$this->lang->modulePageNav = '';
@@ -1026,8 +1029,8 @@ class product extends control
*/
public function addWhitelist($productID = 0, $deptID = 0, $branch = '')
{
- $this->lang->product->menu = $this->lang->product->viewMenu;
- $this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($productID, '', $branch);
+ $this->lang->product->menu = $this->lang->product->viewMenu;
+ $this->lang->product->switcherMenu = $this->product->getSwitcher($productID, '', $branch);
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
$this->product->setMenu($this->products, $productID, $branch);
$moduleIndex = array_search('product', $this->lang->noMenuModule);
diff --git a/module/product/model.php b/module/product/model.php
index 63b4988cf9..1544094cb4 100644
--- a/module/product/model.php
+++ b/module/product/model.php
@@ -440,6 +440,7 @@ class productModel extends model
{
$currentModule = $this->app->moduleName;
$currentMethod = $this->app->methodName;
+ $this->session->set('moreProductLink', $this->app->getURI(true));
$this->loadModel('project');
$currentProductName = $this->lang->product->common;
diff --git a/module/product/view/ajaxgetdropmenu.html.php b/module/product/view/ajaxgetdropmenu.html.php
index 984bd1f8db..b5fa80fce9 100644
--- a/module/product/view/ajaxgetdropmenu.html.php
+++ b/module/product/view/ajaxgetdropmenu.html.php
@@ -7,6 +7,7 @@ $iCharges = 0;
$others = 0;
$closeds = 0;
$productNames = array();
+
foreach($products as $product)
{
if($product->status == 'normal' and $product->PO == $this->app->user->account) $iCharges++;
@@ -26,19 +27,19 @@ foreach($products as $product)
{
$objectID = ($product->type != 'platform' && $module == 'branch' && $method == 'manage') ? $productID : $product->id;
$linkHtml = $this->product->setParamsForLink($module, $link, $projectID, $product->id);
- $myProductsHtml .= html::a($linkHtml, html::icon($lang->icons['product']) . ' ' . $productName, '', "class='text-important' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-group='product'");
+ $myProductsHtml .= html::a($linkHtml, html::icon($lang->icons['product']) . ' ' . $productName, '', "class='text-important' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-group='$openModule'");
}
else if($product->status == 'normal' and !($product->PO == $this->app->user->account))
{
$objectID = ($product->type != 'platform' && $module == 'branch' && $method == 'manage') ? $productID : $product->id;
$linkHtml = $this->product->setParamsForLink($module, $link, $projectID, $product->id);
- $normalProductsHtml .= html::a($linkHtml, html::icon($lang->icons['product']) . ' ' . $productName, '', "title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-group='product'");
+ $normalProductsHtml .= html::a($linkHtml, html::icon($lang->icons['product']) . ' ' . $productName, '', "title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-group='$openModule'");
}
else if($product->status == 'closed')
{
$objectID = ($product->type != 'platform' && $module == 'branch' && $method == 'manage') ? $productID : $product->id;
$linkHtml = $this->product->setParamsForLink($module, $link, $projectID, $objectID);
- $closedProductsHtml .= html::a($linkHtml, html::icon($lang->icons['product']) . ' ' . $productName, '', "title='{$productName}' class='closed' data-key='" . zget($productsPinYin, $product->name, '') . "' data-group='product'");
+ $closedProductsHtml .= html::a($linkHtml, html::icon($lang->icons['product']) . ' ' . $productName, '', "title='{$productName}' class='closed' data-key='" . zget($productsPinYin, $product->name, '') . "' data-group='$openModule'");
}
}
?>
diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php
index b22687ffe2..e5ffdbb7c4 100644
--- a/module/product/view/browse.html.php
+++ b/module/product/view/browse.html.php
@@ -23,10 +23,15 @@ $unfoldStories = zget($unfoldStories, $productID, array());
js::set('unfoldStories', $unfoldStories);
js::set('unfoldAll', $lang->project->treeLevel['all']);
js::set('foldAll', $lang->project->treeLevel['root']);
-js::set('storyType', $storyType);
+js::set('storyType', $storyType);
$lang->story->createCommon = $storyType == 'story' ? $lang->story->createStory : $lang->story->createRequirement;
+$isProjectStroy = $this->app->rawModule == 'projectstory';
?>
+
+
+
- app->rawModule == 'projectstory';?>
{$lang->story->create} ", '', "class='btn btn-secondary'");?>
@@ -251,11 +266,13 @@ $lang->story->createCommon = $storyType == 'story' ? $lang->story->createStory :
+ from = $from;?>
$value) $this->story->printCell($value, $story, $users, $branches, $storyStages, $modulePairs, $storyTasks, $storyBugs, $storyCases, $useDatatable ? 'datatable' : 'table');?>
children)):?>
children as $key => $child):?>
+ from = $from;?>
children)) ? ' table-child-bottom' : '';?>
@@ -487,8 +504,8 @@ $('#branch' + branchID).closest('li').addClass('active');
$(function()
{
- // Update table summary text
- SRCommon;?>
+ // Update table summary text.
+ URCommon : $lang->SRCommon;?>
var checkedSummary = 'product->checkedSummary)?>';
$('#productStoryForm').table(
{
diff --git a/module/program/config.php b/module/program/config.php
index affe69d5e5..41ad406557 100644
--- a/module/program/config.php
+++ b/module/program/config.php
@@ -88,7 +88,7 @@ $config->program->datatable->fieldList['PRJBudget']['required'] = 'yes';
$config->program->datatable->fieldList['teamCount']['title'] = 'teamCount';
$config->program->datatable->fieldList['teamCount']['fixed'] = 'no';
-$config->program->datatable->fieldList['teamCount']['width'] = '60';
+$config->program->datatable->fieldList['teamCount']['width'] = '40';
$config->program->datatable->fieldList['teamCount']['required'] = 'no';
$config->program->datatable->fieldList['teamCount']['sort'] = 'no';
diff --git a/module/program/control.php b/module/program/control.php
index 3a2bd2cf85..cdd87a7dd6 100644
--- a/module/program/control.php
+++ b/module/program/control.php
@@ -132,8 +132,7 @@ class program extends control
$this->view->title = $this->lang->program->PGMProduct;
$this->view->position[] = $this->lang->program->PGMProduct;
-
- $this->view->program = $this->program->getPGMByID($programID);
+ $this->view->program = $program;
$this->view->browseType = $browseType;
$this->view->orderBy = $orderBy;
$this->view->pager = $pager;
@@ -797,7 +796,7 @@ class program extends control
public function PRJBrowse($programID = 0, $browseType = 'doing', $param = 0, $orderBy = 'order_desc', $recTotal = 0, $recPerPage = 15, $pageID = 1)
{
$this->lang->program->menu = $this->lang->PRJ->menu;
- $this->lang->program->mainMenuAction = html::a('javascript:history.go(-1);', ' ' . $this->lang->goback, '', "class='btn btn-link'");
+ if($this->session->moreProjectLink) $this->lang->program->mainMenuAction = html::a($this->session->moreProjectLink, ' ' . $this->lang->goback, '', "class='btn btn-link'");
$this->app->session->set('PRJBrowse', $this->app->getURI(true));
$this->loadModel('datatable');
diff --git a/module/program/css/common.css b/module/program/css/common.css
index f80f2d2448..613a945348 100644
--- a/module/program/css/common.css
+++ b/module/program/css/common.css
@@ -1 +1,2 @@
.future {display: inline-block}
+.c-number {overflow:hidden;text-align:right!important;text-overflow:ellipsis;white-space:nowrap}
diff --git a/module/program/lang/de.php b/module/program/lang/de.php
index a547739255..9223d176af 100644
--- a/module/program/lang/de.php
+++ b/module/program/lang/de.php
@@ -116,7 +116,7 @@ $lang->program->unitList['NZD'] = 'New Zealand';
$lang->program->unitList['THB'] = 'Thai Baht';
$lang->program->unitList['SGD'] = 'Singapore';
-$lang->program->currencySymbol['CNY'] = '¥';
+$lang->program->currencySymbol['CNY'] = '¥';
$lang->program->currencySymbol['USD'] = '$';
$lang->program->currencySymbol['HKD'] = 'HK$';
$lang->program->currencySymbol['NTD'] = 'NT$';
diff --git a/module/program/lang/en.php b/module/program/lang/en.php
index dca155e9ba..e8a4896b11 100644
--- a/module/program/lang/en.php
+++ b/module/program/lang/en.php
@@ -116,7 +116,7 @@ $lang->program->unitList['NZD'] = 'New Zealand';
$lang->program->unitList['THB'] = 'Thai Baht';
$lang->program->unitList['SGD'] = 'Singapore';
-$lang->program->currencySymbol['CNY'] = '¥';
+$lang->program->currencySymbol['CNY'] = '¥';
$lang->program->currencySymbol['USD'] = '$';
$lang->program->currencySymbol['HKD'] = 'HK$';
$lang->program->currencySymbol['NTD'] = 'NT$';
diff --git a/module/program/lang/fr.php b/module/program/lang/fr.php
index 1edad18b4f..9197a9f00d 100644
--- a/module/program/lang/fr.php
+++ b/module/program/lang/fr.php
@@ -116,7 +116,7 @@ $lang->program->unitList['NZD'] = 'New Zealand';
$lang->program->unitList['THB'] = 'Thai Baht';
$lang->program->unitList['SGD'] = 'Singapore';
-$lang->program->currencySymbol['CNY'] = '¥';
+$lang->program->currencySymbol['CNY'] = '¥';
$lang->program->currencySymbol['USD'] = '$';
$lang->program->currencySymbol['HKD'] = 'HK$';
$lang->program->currencySymbol['NTD'] = 'NT$';
diff --git a/module/program/lang/vi.php b/module/program/lang/vi.php
index 1edad18b4f..9197a9f00d 100644
--- a/module/program/lang/vi.php
+++ b/module/program/lang/vi.php
@@ -116,7 +116,7 @@ $lang->program->unitList['NZD'] = 'New Zealand';
$lang->program->unitList['THB'] = 'Thai Baht';
$lang->program->unitList['SGD'] = 'Singapore';
-$lang->program->currencySymbol['CNY'] = '¥';
+$lang->program->currencySymbol['CNY'] = '¥';
$lang->program->currencySymbol['USD'] = '$';
$lang->program->currencySymbol['HKD'] = 'HK$';
$lang->program->currencySymbol['NTD'] = 'NT$';
diff --git a/module/program/lang/zh-cn.php b/module/program/lang/zh-cn.php
index 49edca7809..1c63b36f40 100644
--- a/module/program/lang/zh-cn.php
+++ b/module/program/lang/zh-cn.php
@@ -98,6 +98,8 @@ $lang->program->changeProgramTip = '修改项目集后,该项目关联
$lang->program->linkedProjectsTip = '关联的项目如下';
$lang->program->multiLinkedProductsTip = '该项目关联的如下产品还关联了其他项目,请取消关联后再操作';
+$lang->program->tenThousand = '万';
+
$lang->program->unitList['CNY'] = '人民币';
$lang->program->unitList['USD'] = '美元';
$lang->program->unitList['HKD'] = '港元';
@@ -116,7 +118,7 @@ $lang->program->unitList['NZD'] = '新西兰元';
$lang->program->unitList['THB'] = '泰国铢';
$lang->program->unitList['SGD'] = '新加坡元';
-$lang->program->currencySymbol['CNY'] = '¥';
+$lang->program->currencySymbol['CNY'] = '¥';
$lang->program->currencySymbol['USD'] = '$';
$lang->program->currencySymbol['HKD'] = 'HK$';
$lang->program->currencySymbol['NTD'] = 'NT$';
diff --git a/module/program/lang/zh-tw.php b/module/program/lang/zh-tw.php
index 47f8ac3839..f90f5f42d0 100644
--- a/module/program/lang/zh-tw.php
+++ b/module/program/lang/zh-tw.php
@@ -93,6 +93,8 @@ $lang->program->morePRJ = '更多項目';
$lang->program->productNotEmpty = '請關聯產品或創建產品。';
$lang->program->existProductName = '產品名稱已存在。';
+$lang->program->tenThousand = '萬';
+
$lang->program->unitList['CNY'] = '人民幣';
$lang->program->unitList['USD'] = '美元';
$lang->program->unitList['HKD'] = '港元';
@@ -111,7 +113,7 @@ $lang->program->unitList['NZD'] = '新西蘭元';
$lang->program->unitList['THB'] = '泰國銖';
$lang->program->unitList['SGD'] = '新加坡元';
-$lang->program->currencySymbol['CNY'] = '¥';
+$lang->program->currencySymbol['CNY'] = '¥';
$lang->program->currencySymbol['USD'] = '$';
$lang->program->currencySymbol['HKD'] = 'HK$';
$lang->program->currencySymbol['NTD'] = 'NT$';
diff --git a/module/program/model.php b/module/program/model.php
index c2f65c35f0..e52150c0f8 100644
--- a/module/program/model.php
+++ b/module/program/model.php
@@ -618,7 +618,7 @@ class programModel extends model
{
echo(js::alert($this->lang->program->accessDenied));
- if(!$this->server->http_referer) die(js::locate(helper::createLink('program', 'browse')));
+ if(!$this->server->http_referer) die(js::locate(helper::createLink('program', 'prjbrowse')));
$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('program', 'browse')));
@@ -739,7 +739,7 @@ class programModel extends model
->andWhere('grade')->eq($childGrade)
->fetch('sumBudget');
- return $parentProgram->budget - $childSumBudget;
+ return (float)$parentProgram->budget - (float)$childSumBudget;
}
/**
@@ -864,6 +864,8 @@ class programModel extends model
*/
public function getPRJSwitcher($projectID, $currentModule, $currentMethod)
{
+ $this->session->set('moreProjectLink', $this->app->getURI(true));
+
$this->loadModel('project');
$currentProjectName = $this->lang->program->common;
if($projectID)
@@ -1777,8 +1779,8 @@ class programModel extends model
if($col->show)
{
- $class = "c-$id";
$title = '';
+ $class = "c-$id" . (in_array($id, ['PRJBudget', 'teamCount']) ? ' c-number' : ' c-name');
if($id == 'id') $class .= ' cell-id';
@@ -1803,15 +1805,17 @@ class programModel extends model
}
if($id == 'PRJBudget')
{
- $budget = $project->budget != 0 ? zget($this->lang->program->currencySymbol, $project->budgetUnit) . number_format($project->budget, 2) : $this->lang->program->future;
- $title = "title='$budget'";
+ $programBudget = in_array($this->app->getClientLang(), ['zh-cn','zh-tw']) && $project->budget >= 10000 ? number_format($project->budget / 10000, 1) . $this->lang->program->tenThousand : number_format($project->budget, 1);
+ $budgetTitle = $project->budget != 0 ? zget($this->lang->program->currencySymbol, $project->budgetUnit) . ' ' . $programBudget : $this->lang->program->future;
+
+ $title = "title='$budgetTitle'";
}
if($id == 'PRJEstimate') $title = "title='{$project->hours->totalEstimate} {$this->lang->project->workHour}'";
if($id == 'PRJConsume') $title = "title='{$project->hours->totalConsumed} {$this->lang->project->workHour}'";
if($id == 'PRJSurplus') $title = "title='{$project->hours->totalLeft} {$this->lang->project->workHour}'";
- echo "| ";
+ echo " | ";
switch($id)
{
case 'id':
@@ -1848,7 +1852,7 @@ class programModel extends model
echo " " . zget($this->lang->program->statusList, $project->status) . "";
break;
case 'PRJBudget':
- echo $budget;
+ echo $budgetTitle;
break;
case 'teamCount':
echo $project->teamCount;
diff --git a/module/program/view/pgmbrowsebylist.html.php b/module/program/view/pgmbrowsebylist.html.php
index 75995e8e89..f601e87bdd 100644
--- a/module/program/view/pgmbrowsebylist.html.php
+++ b/module/program/view/pgmbrowsebylist.html.php
@@ -9,7 +9,7 @@
program->PGMName;?>
| program->PGMPM);?> |
- program->PGMBudget);?> |
+ program->PGMBudget);?> |
program->PGMStatus);?> |
program->begin);?> |
program->end);?> |
@@ -56,7 +56,8 @@
PM]) ? $PMList[$program->PM]->id : ''?>
PM)) echo html::a($this->createLink('user', 'profile', "userID=$userID", '', true), zget($users, $program->PM), '', "data-toggle='modal' data-type='iframe' data-width='600'");?>
- budget != 0 ? zget($lang->program->currencySymbol, $program->budgetUnit) . number_format($program->budget, 2) : $lang->program->future;?> |
+ app->getClientLang(), ['zh-cn','zh-tw']) && $program->budget >= 10000 ? number_format($program->budget / 10000, 1) . $lang->program->tenThousand : number_format($program->budget, 1);?>
+ budget != 0 ? zget($lang->program->currencySymbol, $program->budgetUnit) . ' ' . $programBudget : $lang->program->future;?> |
project->statusList, $program->status, '');?> |
begin;?> |
end == LONG_TIME ? $lang->program->PRJLongTime : $program->end;?> |
diff --git a/module/project/control.php b/module/project/control.php
index e095bef854..2d28c0e106 100644
--- a/module/project/control.php
+++ b/module/project/control.php
@@ -121,6 +121,7 @@ class project extends control
$this->loadModel('search');
$this->loadModel('task');
$this->loadModel('datatable');
+ $this->loadModel('setting');
if(common::hasPriv('project', 'create')) $this->lang->TRActions = html::a($this->createLink('project', 'create', ''), " " . $this->lang->project->create, '', "class='btn btn-primary'");
@@ -133,6 +134,14 @@ class project extends control
$products = $this->loadModel('product')->getProductPairsByProject($executionID);
setcookie('preProjectID', $executionID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
+ /* Save the recently five executions visited in the cookie. */
+ $recentExecutions = isset($this->config->project->recentExecutions) ? explode(',', $this->config->project->recentExecutions) : array();
+ array_unshift($recentExecutions, $executionID);
+ $recentExecutions = array_unique($recentExecutions);
+ $recentExecutions = array_slice($recentExecutions, 0, 5);
+ $this->setting->setItem($this->app->user->account . 'common.project.recentExecutions', implode(',', $recentExecutions));
+ $this->setting->setItem($this->app->user->account . 'common.project.lastExecution', $executionID);
+
if($this->cookie->preProjectID != $executionID)
{
$_COOKIE['moduleBrowseParam'] = $_COOKIE['productBrowseParam'] = 0;
@@ -2471,18 +2480,25 @@ class project extends control
*/
public function ajaxGetRecentExecutions()
{
- $executions = $this->project->getRecentExecutions();
- if(!empty($executions))
+ $allExecution = $this->project->getRecentExecutions();
+ if(!empty($allExecution))
{
- $executionsName = array();
- foreach($executions as $execution) $executionsName[] = $execution->name;
- $executionsPinYin = common::convert2Pinyin($executionsName);
- foreach($executions as $execution)
+ foreach($allExecution as $type => $executionList)
{
- $link = helper::createLink('project', 'task', 'executionID=' . $execution->id, '', false, $execution->project);
- $execution->code = empty($execution->code) ? $execution->name : $execution->code;
- $dataKey = 'date-key="' . zget($executionsPinYin, $execution->name, $execution->name) . '"';
- echo html::a($link, ' ' . $execution->name, '', "class='search-list-item' title='$execution->name' $dataKey");
+ echo ''. $this->lang->project->$type . ' ';
+ $color = $type == 'recent' ? 'text-brown' : '';
+ $executions = $allExecution[$type];
+ $executionsName = array();
+ foreach($executions as $execution) $executionsName[] = $execution->name;
+ $executionsPinYin = common::convert2Pinyin($executionsName);
+ foreach($executions as $execution)
+ {
+ $link = helper::createLink('project', 'task', 'executionID=' . $execution->id, '', false, $execution->project);
+ $execution->code = empty($execution->code) ? $execution->name : $execution->code;
+ $dataKey = 'date-key="' . zget($executionsPinYin, $execution->name, $execution->name) . '"';
+ $class = "class='search-list-item $color' title='$execution->name' $dataKey";
+ echo html::a($link, ' ' . $execution->name, '', $class);
+ }
}
}
else
@@ -2545,7 +2561,7 @@ class project extends control
* @access public
* @return void
*/
- public function all($status = 'all', $projectID = 0, $orderBy = 'id_asc', $productID = 0, $recTotal = 0, $recPerPage = 10, $pageID = 1)
+ public function all($status = 'all', $projectID = 0, $orderBy = 'id_desc', $productID = 0, $recTotal = 0, $recPerPage = 10, $pageID = 1)
{
$this->app->loadLang('my');
$this->app->loadLang('programplan');
diff --git a/module/project/lang/de.php b/module/project/lang/de.php
index 61529d7ea6..e33155b727 100644
--- a/module/project/lang/de.php
+++ b/module/project/lang/de.php
@@ -81,6 +81,7 @@ $lang->project->waitTasks = 'Waiting Tasks';
$lang->project->viewByUser = 'By User';
$lang->project->oneProduct = "Only one stage can be linked {$lang->productCommon}";
$lang->project->noLinkProduct = "Stage not linked {$lang->productCommon}";
+$lang->project->recent = 'Recent visits: ';
$lang->project->start = 'Start';
$lang->project->activate = 'Aktivieren';
diff --git a/module/project/lang/en.php b/module/project/lang/en.php
index 421decfb13..f596508c0d 100644
--- a/module/project/lang/en.php
+++ b/module/project/lang/en.php
@@ -81,6 +81,7 @@ $lang->project->waitTasks = 'Waiting Tasks';
$lang->project->viewByUser = 'By User';
$lang->project->oneProduct = "Only one stage can be linked {$lang->productCommon}";
$lang->project->noLinkProduct = "Stage not linked {$lang->productCommon}";
+$lang->project->recent = 'Recent visits: ';
$lang->project->start = 'Start';
$lang->project->activate = 'Activate';
diff --git a/module/project/lang/fr.php b/module/project/lang/fr.php
index 0d4fd92a38..097394a9d4 100644
--- a/module/project/lang/fr.php
+++ b/module/project/lang/fr.php
@@ -81,6 +81,7 @@ $lang->project->waitTasks = 'Waiting Tasks';
$lang->project->viewByUser = 'Par Utilisateur';
$lang->project->oneProduct = "Only one stage can be linked {$lang->productCommon}";
$lang->project->noLinkProduct = "Stage not linked {$lang->productCommon}";
+$lang->project->recent = 'Recent visits: ';
$lang->project->start = 'Démarrer';
$lang->project->activate = 'Activer';
diff --git a/module/project/lang/vi.php b/module/project/lang/vi.php
index 34e73da984..5150d92d19 100644
--- a/module/project/lang/vi.php
+++ b/module/project/lang/vi.php
@@ -81,6 +81,7 @@ $lang->project->waitTasks = 'Waiting Tasks';
$lang->project->viewByUser = 'Theo người dùng';
$lang->project->oneProduct = "Only one stage can be linked {$lang->productCommon}";
$lang->project->noLinkProduct = "Stage not linked {$lang->productCommon}";
+$lang->project->recent = 'Recent visits: ';
$lang->project->start = 'Bắt đầu';
$lang->project->activate = 'Kích hoạt';
diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php
index 6743ec7b98..c149412794 100644
--- a/module/project/lang/zh-cn.php
+++ b/module/project/lang/zh-cn.php
@@ -81,6 +81,7 @@ $lang->project->waitTasks = '待处理';
$lang->project->viewByUser = '按用户查看';
$lang->project->oneProduct = "阶段只能关联一个{$lang->productCommon}";
$lang->project->noLinkProduct = "阶段没有关联{$lang->productCommon}";
+$lang->project->recent = '近期访问:';
$lang->project->start = "开始";
$lang->project->activate = "激活";
diff --git a/module/project/lang/zh-tw.php b/module/project/lang/zh-tw.php
index 12d2f128a0..6aeeee45ee 100644
--- a/module/project/lang/zh-tw.php
+++ b/module/project/lang/zh-tw.php
@@ -81,6 +81,7 @@ $lang->project->waitTasks = '待處理';
$lang->project->viewByUser = '按用戶查看';
$lang->project->oneProduct = "階段只能關聯一個{$lang->productCommon}";
$lang->project->noLinkProduct = "階段沒有關聯{$lang->productCommon}";
+$lang->project->recent = '近期访问:';
$lang->project->start = "開始";
$lang->project->activate = "激活";
diff --git a/module/project/model.php b/module/project/model.php
index 789d8b6af7..bf07298d75 100644
--- a/module/project/model.php
+++ b/module/project/model.php
@@ -276,12 +276,18 @@ class projectModel extends model
*/
public function saveState($executionID, $executions)
{
+ /* When the cookie and session do not exist, get it from the database. */
+ if(empty($executionID) && isset($this->config->project->lastExecution) && isset($executions[$this->config->project->lastExecution]))
+ {
+ $this->session->set('project', $this->config->project->lastExecution);
+ return $this->session->project;
+ }
+
if($executionID > 0) $this->session->set('project', (int)$executionID);
if($executionID == 0 and $this->cookie->lastProject)
{
/* Project link is project-task. */
$executionID = (int)$this->cookie->lastProject;
- $executions = $this->getExecutionPairs($this->session->PRJ);
$executionID = in_array($executionID, array_keys($executions)) ? $executionID : key($executions);
$this->session->set('project', $executionID);
}
@@ -3594,7 +3600,7 @@ class projectModel extends model
->beginIF(!$this->app->user->admin)->andWhere('t1.project')->in($this->app->user->view->projects)->fi()
->andWhere('t1.status')->ne('closed')
->andWhere('t1.deleted')->eq('0')
- ->orderBy('id_desc')
+ ->orderBy('project_desc, id_desc')
->fetchAll();
/* Get the project or product to which the execution belongs. */
@@ -3602,19 +3608,29 @@ class projectModel extends model
$stageIdList = array();
foreach($executions as $execution)
{
- if($execution->type == 'stage') $stageIdList[$execution->id] = $execution->id;
- if($execution->type == 'sprint') $projectIdList[$execution->project] = $execution->project;
+ if($execution->type == 'stage') $stageIdList[$execution->id] = $execution->id;
+ $projectIdList[$execution->project] = $execution->project;
}
$projectPairs = $this->loadModel('program')->getPRJPairsByIdList($projectIdList);
$productPairs = $this->getStageLinkProductPairs($stageIdList);
+ $recentExecutions = isset($this->config->project->recentExecutions) ? explode(',', $this->config->project->recentExecutions) : array();
+ $allExecution = array('recent' => array(), 'mine' => array());
foreach($executions as $execution)
{
- if($execution->type == 'stage') $execution->name = zget($productPairs, $execution->id) . '/' . $execution->name;
+ if($execution->type == 'stage') $execution->name = zget($projectPairs, $execution->project) . '/' . zget($productPairs, $execution->id) . '/' . $execution->name;
if($execution->type == 'sprint') $execution->name = zget($projectPairs, $execution->project) . '/' . $execution->name;
+ if(in_array($execution->id, $recentExecutions))
+ {
+ $index = array_search($execution->id, $recentExecutions);
+ $allExecution['recent'][$index] = $execution;
+ continue;
+ }
+ $allExecution['mine'][] = $execution;
}
- return $executions;
+ ksort($allExecution['recent']);
+ return $allExecution;
}
/**
diff --git a/module/project/view/story.html.php b/module/project/view/story.html.php
index a372a66445..90d309659e 100644
--- a/module/project/view/story.html.php
+++ b/module/project/view/story.html.php
@@ -157,7 +157,7 @@
|
- id => '')) . html::a(helper::createLink('story', 'view', "storyID=$story->id"), sprintf('%03d', $story->id));?>
+ id => '')) . html::a(helper::createLink('story', 'view', "storyID=$story->id&version=$story->version&from=project¶m=$project->id"), sprintf('%03d', $story->id), null, "data-group='project'");?>
id);?>
@@ -169,7 +169,7 @@
|
product][$story->branch])) echo "" . $branchGroups[$story->product][$story->branch] . '';?>
parent > 0) echo "{$lang->story->childrenAB}";?>
- title, null, "style='color: $story->color'");?>
+ title, null, "style='color: $story->color' data-group='project'");?>
|
openedBy);?> |
assignedTo);?> |
diff --git a/module/projectstory/control.php b/module/projectstory/control.php
index 2ddc6ee072..44fcdb98b4 100644
--- a/module/projectstory/control.php
+++ b/module/projectstory/control.php
@@ -54,7 +54,7 @@ class projectStory extends control
$this->lang->story->createStory = str_replace($this->lang->SRCommon, $this->lang->SRCommon, $this->lang->story->createStory);
$this->lang->story->noStory = str_replace($this->lang->SRCommon, $this->lang->SRCommon, $this->lang->story->noStory);
- echo $this->fetch('product', 'browse', "productID=$productID&branch=$branch&browseType=$browseType¶m=$param&storyType=$storyType&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
+ echo $this->fetch('product', 'browse', "productID=$productID&branch=$branch&browseType=$browseType¶m=$param&storyType=$storyType&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID&from=project");
}
/**
diff --git a/module/report/control.php b/module/report/control.php
index 8a186c479f..bccbb0348d 100644
--- a/module/report/control.php
+++ b/module/report/control.php
@@ -298,16 +298,14 @@ class report extends control
if(empty($userID)) unset($depts[0]);
$accounts = array();
- if($dept)
- {
- $accounts = $this->loadModel('dept')->getDeptUserPairs($dept);
- }
+ if($dept) $accounts = $this->loadModel('dept')->getDeptUserPairs($dept);
if($userID)
{
$user = $this->loadModel('user')->getById($userID, 'id');
$dept = $user->dept;
$accounts = array($user->account => ($user->realname ? $user->realname : $user->account));
}
+ if(empty($accounts)) $accounts = $this->user->getPairs('noletter|noclosed');
if($accounts) $accounts = array_keys($accounts);
if($dept)
diff --git a/module/report/lang/de.php b/module/report/lang/de.php
index 13e371dd75..16e0e75ee2 100644
--- a/module/report/lang/de.php
+++ b/module/report/lang/de.php
@@ -119,13 +119,13 @@ $lang->report->annualData->baseInfo = "Basic Data";
$lang->report->annualData->actionData = "Operation Data";
$lang->report->annualData->contributionData = "Contribution Data";
$lang->report->annualData->radar = "Capability Radar Chart";
-$lang->report->annualData->projects = "{$lang->projectCommon} Data";
+$lang->report->annualData->projects = "{$lang->executionCommon} Data";
$lang->report->annualData->products = "{$lang->productCommon} Data";
$lang->report->annualData->stories = "Story Data";
$lang->report->annualData->tasks = "Task Data";
$lang->report->annualData->bugs = "Bug Data";
$lang->report->annualData->cases = "Case Data";
-$lang->report->annualData->statusStat = "{$lang->storyCommon}/task/bug status distribution (as of today)";
+$lang->report->annualData->statusStat = "{$lang->SRCommon}/task/bug status distribution (as of today)";
$lang->report->annualData->companyUsers = "Number of company";
$lang->report->annualData->deptUsers = "Number of departments";
@@ -150,7 +150,7 @@ $lang->report->annualData->taskMonthActions = "Monthly task operation";
$lang->report->annualData->bugMonthActions = "Monthly bug operation";
$lang->report->annualData->caseMonthActions = "Monthly case operation";
-$lang->report->annualData->projectFields['name'] = "{$lang->projectCommon} name";
+$lang->report->annualData->projectFields['name'] = "{$lang->executionCommon} name";
$lang->report->annualData->projectFields['story'] = "Finished stories";
$lang->report->annualData->projectFields['task'] = "Finished tasks";
$lang->report->annualData->projectFields['bug'] = "Resolved bugs";
@@ -166,10 +166,10 @@ $lang->report->annualData->productFields['story'] = "Created stories";
$lang->report->annualData->productFields['finished'] = "Finished stories";
$lang->report->annualData->objectTypeList['product'] = $lang->productCommon;
-$lang->report->annualData->objectTypeList['story'] = $lang->storyCommon;
+$lang->report->annualData->objectTypeList['story'] = $lang->SRCommon;
$lang->report->annualData->objectTypeList['productplan'] = "Plan";
$lang->report->annualData->objectTypeList['release'] = "Release";
-$lang->report->annualData->objectTypeList['project'] = $lang->projectCommon;
+$lang->report->annualData->objectTypeList['project'] = $lang->executionCommon;
$lang->report->annualData->objectTypeList['task'] = 'Task';
$lang->report->annualData->objectTypeList['repo'] = 'Code';
$lang->report->annualData->objectTypeList['bug'] = 'Bug';
diff --git a/module/report/lang/en.php b/module/report/lang/en.php
index 5c4cbdb48e..e32da559f9 100644
--- a/module/report/lang/en.php
+++ b/module/report/lang/en.php
@@ -119,13 +119,13 @@ $lang->report->annualData->baseInfo = "Basic Data";
$lang->report->annualData->actionData = "Operation Data";
$lang->report->annualData->contributionData = "Contribution Data";
$lang->report->annualData->radar = "Capability Radar Chart";
-$lang->report->annualData->projects = "{$lang->projectCommon} Data";
+$lang->report->annualData->projects = "{$lang->executionCommon} Data";
$lang->report->annualData->products = "{$lang->productCommon} Data";
$lang->report->annualData->stories = "Story Data";
$lang->report->annualData->tasks = "Task Data";
$lang->report->annualData->bugs = "Bug Data";
$lang->report->annualData->cases = "Case Data";
-$lang->report->annualData->statusStat = "{$lang->storyCommon}/task/bug status distribution (as of today)";
+$lang->report->annualData->statusStat = "{$lang->SRCommon}/task/bug status distribution (as of today)";
$lang->report->annualData->companyUsers = "Number of company";
$lang->report->annualData->deptUsers = "Number of departments";
@@ -150,7 +150,7 @@ $lang->report->annualData->taskMonthActions = "Monthly task operation";
$lang->report->annualData->bugMonthActions = "Monthly bug operation";
$lang->report->annualData->caseMonthActions = "Monthly case operation";
-$lang->report->annualData->projectFields['name'] = "{$lang->projectCommon} name";
+$lang->report->annualData->projectFields['name'] = "{$lang->executionCommon} name";
$lang->report->annualData->projectFields['story'] = "Finished stories";
$lang->report->annualData->projectFields['task'] = "Finished tasks";
$lang->report->annualData->projectFields['bug'] = "Resolved bugs";
@@ -166,10 +166,10 @@ $lang->report->annualData->productFields['story'] = "Created stories";
$lang->report->annualData->productFields['finished'] = "Finished stories";
$lang->report->annualData->objectTypeList['product'] = $lang->productCommon;
-$lang->report->annualData->objectTypeList['story'] = $lang->storyCommon;
+$lang->report->annualData->objectTypeList['story'] = $lang->SRCommon;
$lang->report->annualData->objectTypeList['productplan'] = "Plan";
$lang->report->annualData->objectTypeList['release'] = "Release";
-$lang->report->annualData->objectTypeList['project'] = $lang->projectCommon;
+$lang->report->annualData->objectTypeList['project'] = $lang->executionCommon;
$lang->report->annualData->objectTypeList['task'] = 'Task';
$lang->report->annualData->objectTypeList['repo'] = 'Code';
$lang->report->annualData->objectTypeList['bug'] = 'Bug';
diff --git a/module/report/lang/fr.php b/module/report/lang/fr.php
index 98263fe7da..0e27480f66 100644
--- a/module/report/lang/fr.php
+++ b/module/report/lang/fr.php
@@ -119,13 +119,13 @@ $lang->report->annualData->baseInfo = "Basic Data";
$lang->report->annualData->actionData = "Operation Data";
$lang->report->annualData->contributionData = "Contribution Data";
$lang->report->annualData->radar = "Capability Radar Chart";
-$lang->report->annualData->projects = "{$lang->projectCommon} Data";
+$lang->report->annualData->projects = "{$lang->executionCommon} Data";
$lang->report->annualData->products = "{$lang->productCommon} Data";
$lang->report->annualData->stories = "Story Data";
$lang->report->annualData->tasks = "Task Data";
$lang->report->annualData->bugs = "Bug Data";
$lang->report->annualData->cases = "Case Data";
-$lang->report->annualData->statusStat = "{$lang->storyCommon}/task/bug status distribution (as of today)";
+$lang->report->annualData->statusStat = "{$lang->SRCommon}/task/bug status distribution (as of today)";
$lang->report->annualData->companyUsers = "Number of company";
$lang->report->annualData->deptUsers = "Number of departments";
@@ -150,7 +150,7 @@ $lang->report->annualData->taskMonthActions = "Monthly task operation";
$lang->report->annualData->bugMonthActions = "Monthly bug operation";
$lang->report->annualData->caseMonthActions = "Monthly case operation";
-$lang->report->annualData->projectFields['name'] = "{$lang->projectCommon} name";
+$lang->report->annualData->projectFields['name'] = "{$lang->executionCommon} name";
$lang->report->annualData->projectFields['story'] = "Finished stories";
$lang->report->annualData->projectFields['task'] = "Finished tasks";
$lang->report->annualData->projectFields['bug'] = "Resolved bugs";
@@ -166,10 +166,10 @@ $lang->report->annualData->productFields['story'] = "Created stories";
$lang->report->annualData->productFields['finished'] = "Finished stories";
$lang->report->annualData->objectTypeList['product'] = $lang->productCommon;
-$lang->report->annualData->objectTypeList['story'] = $lang->storyCommon;
+$lang->report->annualData->objectTypeList['story'] = $lang->SRCommon;
$lang->report->annualData->objectTypeList['productplan'] = "Plan";
$lang->report->annualData->objectTypeList['release'] = "Release";
-$lang->report->annualData->objectTypeList['project'] = $lang->projectCommon;
+$lang->report->annualData->objectTypeList['project'] = $lang->executionCommon;
$lang->report->annualData->objectTypeList['task'] = 'Task';
$lang->report->annualData->objectTypeList['repo'] = 'Code';
$lang->report->annualData->objectTypeList['bug'] = 'Bug';
diff --git a/module/report/lang/vi.php b/module/report/lang/vi.php
index 770480fcd0..90b6828010 100644
--- a/module/report/lang/vi.php
+++ b/module/report/lang/vi.php
@@ -119,13 +119,13 @@ $lang->report->annualData->baseInfo = "Basic Data";
$lang->report->annualData->actionData = "Operation Data";
$lang->report->annualData->contributionData = "Contribution Data";
$lang->report->annualData->radar = "Capability Radar Chart";
-$lang->report->annualData->projects = "{$lang->projectCommon} Data";
+$lang->report->annualData->projects = "{$lang->executionCommon} Data";
$lang->report->annualData->products = "{$lang->productCommon} Data";
$lang->report->annualData->stories = "Story Data";
$lang->report->annualData->tasks = "Task Data";
$lang->report->annualData->bugs = "Bug Data";
$lang->report->annualData->cases = "Case Data";
-$lang->report->annualData->statusStat = "{$lang->storyCommon}/task/bug status distribution (as of today)";
+$lang->report->annualData->statusStat = "{$lang->SRCommon}/task/bug status distribution (as of today)";
$lang->report->annualData->companyUsers = "Number of company";
$lang->report->annualData->deptUsers = "Number of departments";
@@ -150,7 +150,7 @@ $lang->report->annualData->taskMonthActions = "Monthly task operation";
$lang->report->annualData->bugMonthActions = "Monthly bug operation";
$lang->report->annualData->caseMonthActions = "Monthly case operation";
-$lang->report->annualData->projectFields['name'] = "{$lang->projectCommon} name";
+$lang->report->annualData->projectFields['name'] = "{$lang->executionCommon} name";
$lang->report->annualData->projectFields['story'] = "Finished stories";
$lang->report->annualData->projectFields['task'] = "Finished tasks";
$lang->report->annualData->projectFields['bug'] = "Resolved bugs";
@@ -166,10 +166,10 @@ $lang->report->annualData->productFields['story'] = "Created stories";
$lang->report->annualData->productFields['finished'] = "Finished stories";
$lang->report->annualData->objectTypeList['product'] = $lang->productCommon;
-$lang->report->annualData->objectTypeList['story'] = $lang->storyCommon;
+$lang->report->annualData->objectTypeList['story'] = $lang->SRCommon;
$lang->report->annualData->objectTypeList['productplan'] = "Plan";
$lang->report->annualData->objectTypeList['release'] = "Release";
-$lang->report->annualData->objectTypeList['project'] = $lang->projectCommon;
+$lang->report->annualData->objectTypeList['project'] = $lang->executionCommon;
$lang->report->annualData->objectTypeList['task'] = 'Task';
$lang->report->annualData->objectTypeList['repo'] = 'Code';
$lang->report->annualData->objectTypeList['bug'] = 'Bug';
diff --git a/module/report/lang/zh-cn.php b/module/report/lang/zh-cn.php
index 479c2089ed..83650b52f6 100644
--- a/module/report/lang/zh-cn.php
+++ b/module/report/lang/zh-cn.php
@@ -119,13 +119,13 @@ $lang->report->annualData->baseInfo = "基本数据";
$lang->report->annualData->actionData = "操作数据";
$lang->report->annualData->contributionData = "贡献数据";
$lang->report->annualData->radar = "能力雷达图";
-$lang->report->annualData->projects = "{$lang->projectCommon}数据";
+$lang->report->annualData->projects = "{$lang->executionCommon}数据";
$lang->report->annualData->products = "{$lang->productCommon}数据";
$lang->report->annualData->stories = "需求数据";
$lang->report->annualData->tasks = "任务数据";
$lang->report->annualData->bugs = "Bug数据";
$lang->report->annualData->cases = "用例数据";
-$lang->report->annualData->statusStat = "{$lang->storyCommon}/任务/Bug状态分布(截止今日)";
+$lang->report->annualData->statusStat = "{$lang->SRCommon}/任务/Bug状态分布(截止今日)";
$lang->report->annualData->companyUsers = "公司总人数";
$lang->report->annualData->deptUsers = "部门人数";
@@ -150,8 +150,8 @@ $lang->report->annualData->taskMonthActions = "每月任务操作情况";
$lang->report->annualData->bugMonthActions = "每月Bug操作情况";
$lang->report->annualData->caseMonthActions = "每月用例操作情况";
-$lang->report->annualData->projectFields['name'] = "{$lang->projectCommon}名称";
-$lang->report->annualData->projectFields['story'] = "完成{$lang->storyCommon}数";
+$lang->report->annualData->projectFields['name'] = "{$lang->executionCommon}名称";
+$lang->report->annualData->projectFields['story'] = "完成{$lang->SRCommon}数";
$lang->report->annualData->projectFields['task'] = "完成任务数";
$lang->report->annualData->projectFields['bug'] = "解决Bug数";
@@ -162,14 +162,14 @@ if(!empty($config->URAndSR))
{
$lang->report->annualData->productFields['requirement'] = "创建{$lang->URCommon}数";
}
-$lang->report->annualData->productFields['story'] = "创建{$lang->storyCommon}数";
+$lang->report->annualData->productFields['story'] = "创建{$lang->SRCommon}数";
$lang->report->annualData->productFields['finished'] = "完成需求数";
$lang->report->annualData->objectTypeList['product'] = $lang->productCommon;
$lang->report->annualData->objectTypeList['story'] = "需求";
$lang->report->annualData->objectTypeList['productplan'] = "计划";
$lang->report->annualData->objectTypeList['release'] = "发布";
-$lang->report->annualData->objectTypeList['project'] = $lang->projectCommon;
+$lang->report->annualData->objectTypeList['project'] = $lang->executionCommon;
$lang->report->annualData->objectTypeList['task'] = '任务';
$lang->report->annualData->objectTypeList['repo'] = '代码';
$lang->report->annualData->objectTypeList['bug'] = 'Bug';
diff --git a/module/stakeholder/control.php b/module/stakeholder/control.php
index 76d5dbb484..ad5ffc8310 100644
--- a/module/stakeholder/control.php
+++ b/module/stakeholder/control.php
@@ -214,18 +214,6 @@ class stakeholder extends control
die(html::select('user', $users, '', "class='form-control chosen' onchange=changeUser(this.value);"));
}
- /**
- * Ajax get outside company.
- *
- * @access public
- * @return void
- */
- public function ajaxGetOutsideCompany()
- {
- $companys = $this->loadModel('company')->getOutsideCompanies();
- die(html::select('company', $companys, '', "class='form-control chosen'"));
- }
-
/**
* Ajax get control.
*
diff --git a/module/stakeholder/js/create.js b/module/stakeholder/js/create.js
index 2e05a3f6d1..0ff75739c9 100644
--- a/module/stakeholder/js/create.js
+++ b/module/stakeholder/js/create.js
@@ -51,7 +51,7 @@ $(function()
}
else
{
- var link = createLink('stakeholder', 'ajaxGetOutsideCompany');
+ var link = createLink('company', 'ajaxGetOutsideCompany');
$.post(link, function(data)
{
$('#company').replaceWith(data);
diff --git a/module/story/control.php b/module/story/control.php
index b527f09ddf..4a2bb2c468 100644
--- a/module/story/control.php
+++ b/module/story/control.php
@@ -528,10 +528,11 @@ class story extends control
* Edit a story.
*
* @param int $storyID
+ * @param string $from product|project
* @access public
* @return void
*/
- public function edit($storyID)
+ public function edit($storyID, $from = 'product')
{
if(!empty($_POST))
{
@@ -552,10 +553,17 @@ class story extends control
}
else
{
- die(js::locate($this->createLink('story', 'view', "storyID=$storyID"), 'parent'));
+ $module = $from == 'project' ? 'projectstory' : 'story';
+ die(js::locate($this->createLink($module, 'view', "storyID=$storyID"), 'parent'));
}
}
+ if($from == 'project')
+ {
+ $this->app->rawModule = 'projectstory';
+ $this->lang->navGroup->story = 'project';
+ }
+
$this->commonAction($storyID);
/* Assign. */
@@ -726,10 +734,11 @@ class story extends control
* Change a story.
*
* @param int $storyID
+ * @param string $from product|project
* @access public
* @return void
*/
- public function change($storyID)
+ public function change($storyID, $from = 'product')
{
if(!empty($_POST))
{
@@ -749,7 +758,14 @@ class story extends control
$this->executeHooks($storyID);
- die(js::locate($this->createLink('story', 'view', "storyID=$storyID"), 'parent'));
+ $module = $from == 'project' ? 'projectstory' : 'story';
+ die(js::locate($this->createLink($module, 'view', "storyID=$storyID"), 'parent'));
+ }
+
+ if($from == 'project')
+ {
+ $this->app->rawModule = 'projectstory';
+ $this->lang->navGroup->story = 'project';
}
$this->commonAction($storyID);
@@ -829,20 +845,30 @@ class story extends control
$users = $this->user->getPairs('noletter');
/* Set the menu. */
- $this->lang->product->menu = $this->lang->product->viewMenu;
- $this->lang->product->switcherMenu = $this->product->getSwitcher($product->id);
- $this->lang->product->mainMenuAction = $this->product->getProductMainAction();
- $this->product->setMenu($this->product->getPairs(), $product->id, $story->branch);
- if($this->app->rawModule == 'projectstory')
- {
- $project = $this->dao->findById((int)$this->session->PRJ)->from(TABLE_PROJECT)->fetch();
- $this->lang->product->menu = $this->lang->menu->{$project->model};
- }
-
if($from == 'project')
{
- $project = $this->loadModel('project')->getById($param);
- if($project->status == 'done') $from = '';
+ $project = $this->dao->findById((int)$this->session->PRJ)->from(TABLE_PROJECT)->fetch();
+ $this->app->rawModule = 'project';
+ $this->lang->navGroup->story = 'project';
+ $this->lang->product->menu = $this->lang->menu->{$project->model};
+ $this->project->setMenu($this->project->getExecutionPairs($this->session->PRJ, 'all', 'nodeleted'), $project->id);
+
+ /* If status is done, can not create task from story. */
+ $execution = $this->loadModel('project')->getById($param);
+ if($execution->status == 'done') $from = '';
+ }
+ else
+ {
+ $this->lang->product->menu = $this->lang->product->viewMenu;
+ $this->product->setMenu($this->product->getPairs(), $product->id, $story->branch);
+ $this->lang->product->switcherMenu = $this->product->getSwitcher($product->id);
+ $this->lang->product->mainMenuAction = $this->product->getProductMainAction();
+
+ if($this->app->rawModule == 'projectstory')
+ {
+ $project = $this->dao->findById((int)$this->session->PRJ)->from(TABLE_PROJECT)->fetch();
+ $this->lang->product->menu = $this->lang->menu->{$project->model};
+ }
}
$this->executeHooks($storyID);
@@ -913,10 +939,11 @@ class story extends control
* Review a story.
*
* @param int $storyID
+ * @param string $from product|project
* @access public
* @return void
*/
- public function review($storyID)
+ public function review($storyID, $from = 'product')
{
$this->product;
$this->lang->product->menu = $this->lang->product->viewMenu;
@@ -938,7 +965,8 @@ class story extends control
$this->executeHooks($storyID);
- die(js::locate(inlink('view', "storyID=$storyID"), 'parent'));
+ $module = $from == 'project' ? 'projectstory' : 'story';
+ die(js::locate($this->createLink($module, 'view', "storyID=$storyID"), 'parent'));
}
/* Get story and product. */
@@ -948,7 +976,15 @@ class story extends control
$this->story->replaceURLang($story->type);
/* Set menu. */
- $this->product->setMenu($this->product->getPairs(), $product->id, $story->branch);
+ if($from == 'project')
+ {
+ $this->app->rawModule = 'projectstory';
+ $this->lang->navGroup->story = 'project';
+ }
+ else
+ {
+ $this->product->setMenu($this->product->getPairs(), $product->id, $story->branch);
+ }
/* Set the review result options. */
if($story->status == 'draft' and $story->version == 1) unset($this->lang->story->reviewResultList['revert']);
@@ -1367,7 +1403,6 @@ class story extends control
$this->session->set('bugList', $this->app->getURI(true));
$this->session->set('revisionList', $this->app->getURI(true));
-
/* Load pager and get tracks. */
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
diff --git a/module/story/js/common.js b/module/story/js/common.js
index f1b8ba3d39..0a5f7f4b3b 100644
--- a/module/story/js/common.js
+++ b/module/story/js/common.js
@@ -4,7 +4,7 @@ $(function()
if(typeof(storyType) == 'undefined') storyType = '';
if(typeof(rawModule) == 'undefined') rawModule = 'product';
if(typeof(project) != 'undefined') rawModule = 'projectstory';
- if(rawModule != 'projectstory')
+ if(['project', 'projectstory'].indexOf(rawModule) === -1)
{
$('#navbar .nav li').removeClass('active');
$("#navbar .nav li[data-id=" + storyType + ']').addClass('active');
diff --git a/module/story/model.php b/module/story/model.php
index 8fd6bbd399..05fb2942cc 100644
--- a/module/story/model.php
+++ b/module/story/model.php
@@ -3482,10 +3482,10 @@ class storyModel extends model
break;
}
- common::printIcon('story', 'change', $vars, $story, 'list', 'fork');
- common::printIcon('story', 'review', $vars, $story, 'list', 'glasses');
+ common::printIcon('story', 'change', $vars . "&from=$story->from", $story, 'list', 'fork', '', '', false, "data-group=$story->from");
+ common::printIcon('story', 'review', $vars . "&from=$story->from", $story, 'list', 'glasses', '', '', false, "data-group=$story->from");
common::printIcon('story', 'close', $vars, $story, 'list', '', '', 'iframe', true);
- common::printIcon('story', 'edit', $vars, $story, 'list');
+ common::printIcon('story', 'edit', $vars . "&from=$story->from", $story, 'list', '', '', '', false, "data-group=$story->from");
common::printIcon('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$vars", $story, 'list', 'sitemap');
common::printIcon('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=$story->module&storyID=$story->id", $story, 'list', 'split', '', '', '', '', $this->lang->story->subdivide);
if($this->app->rawModule == 'projectstory') common::printIcon('projectstory', 'unlinkStory', "projectID={$this->session->PRJ}&storyID=$story->id", '', 'list', 'unlink', 'hiddenwin');
@@ -3644,19 +3644,30 @@ class storyModel extends model
$stories = empty($stories) ? array() : $stories;
foreach($stories as $id => $title)
{
- $stories[$id] = new stdclass();
- $stories[$id]->title = $title;
- $stories[$id]->case = $this->loadModel('testcase')->getStoryCases($id);
- $stories[$id]->bug = $this->loadModel('bug')->getStoryBugs($id);
- $stories[$id]->design = $this->dao->select('id, name')->from(TABLE_DESIGN)->where('story')->eq($id)->fetchAll('id');
- $stories[$id]->revision = $this->dao->select('BID, extra')->from(TABLE_RELATION)->where('AType')->eq('design')->andWhere('BType')->eq('commit')->andWhere('AID')->in(array_keys($stories[$id]->design))->fetchPairs();
+ $stories[$id] = new stdclass();
+ $stories[$id]->title = $title;
+ $stories[$id]->cases = $this->loadModel('testcase')->getStoryCases($id);
+ $stories[$id]->bugs = $this->loadModel('bug')->getStoryBugs($id);
+ $stories[$id]->tasks = $this->loadModel('task')->getStoryTasks($id);
+ $stories[$id]->designs = $this->dao->select('id, name')->from(TABLE_DESIGN)->where('story')->eq($id)->fetchAll('id');
+ $stories[$id]->revisions = $this->dao->select('BID, extra')->from(TABLE_RELATION)
+ ->where('AType')->eq('design')
+ ->andWhere('BType')->eq('commit')
+ ->andWhere('AID')->in(array_keys($stories[$id]->designs))
+ ->fetchPairs();
}
$requirement->track = $stories;
}
/* Get no requirements story. */
- $subdividedStories = $this->dao->select('BID')->from(TABLE_RELATION)->where('AType')->eq('requirement')->andWhere('BType')->eq('story')->andWhere('relation')->eq('subdivideinto')->andWhere('product')->eq($productID)->fetchPairs('BID', 'BID');
+ $subdividedStories = $this->dao->select('BID')->from(TABLE_RELATION)
+ ->where('AType')->eq('requirement')
+ ->andWhere('BType')->eq('story')
+ ->andWhere('relation')->eq('subdivideinto')
+ ->andWhere('product')->eq($productID)
+ ->fetchPairs('BID', 'BID');
+
$stories = $this->getProductStories($productID, 0, 0, 'all', 'story', 'id_desc', true, $subdividedStories);
if($stories) $pager->recTotal += 1;
@@ -3664,13 +3675,19 @@ class storyModel extends model
{
foreach($stories as $id => $story)
{
- $stories[$id] = new stdclass();
- $stories[$id]->title = $story->title;
- $stories[$id]->case = $this->loadModel('testcase')->getStoryCases($id);
- $stories[$id]->bug = $this->loadModel('bug')->getStoryBugs($id);
- $stories[$id]->design = $this->dao->select('id, name')->from(TABLE_DESIGN)->where('story')->eq($id)->fetchAll('id');
- $stories[$id]->revision = $this->dao->select('BID, extra')->from(TABLE_RELATION)->where('AType')->eq('design')->andWhere('BType')->eq('commit')->andWhere('AID')->in(array_keys($stories[$id]->design))->fetchPairs();
+ $stories[$id] = new stdclass();
+ $stories[$id]->title = $story->title;
+ $stories[$id]->cases = $this->loadModel('testcase')->getStoryCases($id);
+ $stories[$id]->bugs = $this->loadModel('bug')->getStoryBugs($id);
+ $stories[$id]->tasks = $this->loadModel('task')->getStoryTasks($id);
+ $stories[$id]->designs = $this->dao->select('id, name')->from(TABLE_DESIGN)->where('story')->eq($id)->fetchAll('id');
+ $stories[$id]->revisions = $this->dao->select('BID, extra')->from(TABLE_RELATION)
+ ->where('AType')->eq('design')
+ ->andWhere('BType')->eq('commit')
+ ->andWhere('AID')->in(array_keys($stories[$id]->designs))
+ ->fetchPairs();
}
+
$requirements['noRequirement'] = $stories;
}
diff --git a/module/story/view/change.html.php b/module/story/view/change.html.php
index 23a02d6a2a..b6b09d2098 100644
--- a/module/story/view/change.html.php
+++ b/module/story/view/change.html.php
@@ -89,4 +89,5 @@
verify);?>
type);?>
+app->rawModule);?>
diff --git a/module/story/view/edit.html.php b/module/story/view/edit.html.php
index 420215fb18..89e1d33721 100644
--- a/module/story/view/edit.html.php
+++ b/module/story/view/edit.html.php
@@ -14,6 +14,7 @@
product);?>
children));?>
story->moveChildrenTips);?>
+app->rawModule);?>
|