diff --git a/Makefile b/Makefile index 458db00026..2435ae32e8 100644 --- a/Makefile +++ b/Makefile @@ -131,7 +131,7 @@ zentaoxx: sed -i 's/commonModel::getLicensePropertyValue/extCommonModel::getLicensePropertyValue/g' zentaoxx/extension/xuan/im/control.php sed -i 's/commonModel::getLicensePropertyValue/extCommonModel::getLicensePropertyValue/g' zentaoxx/extension/xuan/im/model/conference.php sed -i 's/xxb_/zt_/g' zentaoxx/db/*.sql - sed -i "s/\$this->app->getModuleRoot() . 'im/apischeme.json'/\$this->app->getExtensionRoot() . 'xuan/im/apischeme.json'/g" zentaoxx/extension/xuan/im/model.php + sed -i "s#\$this->app->getModuleRoot() . 'im/apischeme.json'#\$this->app->getExtensionRoot() . 'xuan/im/apischeme.json'#g" zentaoxx/extension/xuan/im/model.php sed -i "/getModuleExtPath(/ r tools/fixxuan" zentaoxx/framework/xuanxuan.class.php echo "ALTER TABLE \`zt_user\` ADD \`pinyin\` varchar(255) NOT NULL DEFAULT '' AFTER \`realname\`;" >> zentaoxx/db/xuanxuan.sql mkdir zentaoxx/tools; cp tools/cn2tw.php zentaoxx/tools; cd zentaoxx/tools; php cn2tw.php @@ -248,6 +248,6 @@ ci: make en rm -fr zentaopms zentaoxx zentaoxx.*.zip php tools/mergezentaopms.php $(VERSION) - rm zentaobiz*.zip zentaomax*.zip $(BUILD_PATH)/ZenTaoPMS.$(VERSION).zip $(RELEASE_PATH)/ZenTaoALM.$(VERSION)*.zip $(RELEASE_PATH)/ZenTaoPMS.$(VERSION)*.zip $(RELEASE_PATH)/*.deb $(RELEASE_PATH)/*.rpm + rm -f zentaobiz*.zip zentaomax*.zip $(BUILD_PATH)/ZenTaoPMS.$(VERSION).zip $(RELEASE_PATH)/ZenTaoALM.$(VERSION)*.zip $(RELEASE_PATH)/ZenTaoPMS.$(VERSION)*.zip $(RELEASE_PATH)/*.deb $(RELEASE_PATH)/*.rpm cp ZenTaoPMS.$(VERSION).zip $(BUILD_PATH) mv *.zip *.deb *.rpm $(RELEASE_PATH) diff --git a/config/filter.php b/config/filter.php index d8732044d1..7a2fcc15b8 100644 --- a/config/filter.php +++ b/config/filter.php @@ -130,6 +130,7 @@ $filter->svn->cat = new stdclass(); $filter->svn->diff = new stdclass(); $filter->task->create = new stdclass(); $filter->task->export = new stdclass(); +$filter->execution->default = new stdclass(); $filter->execution->story = new stdclass(); $filter->testcase->default = new stdclass(); $filter->testcase->create = new stdclass(); @@ -279,6 +280,7 @@ $filter->productplan->browse->cookie['viewType'] = 'code'; $filter->task->create->cookie['lastTaskModule'] = 'int'; $filter->task->export->cookie['checkedItem'] = 'reg::checked'; +$filter->execution->default->cookie['kanbanview'] = 'code'; $filter->execution->story->cookie['storyPreExecutionID'] = 'int'; $filter->execution->story->cookie['storyModuleParam'] = 'int'; $filter->execution->story->cookie['storyProductParam'] = 'int'; diff --git a/db/update16.4.sql b/db/update16.4.sql index c874b5ea6b..7b1092792c 100644 --- a/db/update16.4.sql +++ b/db/update16.4.sql @@ -22,11 +22,19 @@ ALTER TABLE `zt_story` ADD `vision` varchar(10) NOT NULL DEFAULT 'rnd' AFTER `id ALTER TABLE `zt_story` ADD `activatedDate` datetime NOT NULL AFTER `closedReason`; ALTER TABLE `zt_task` MODIFY `activatedDate` datetime NOT NULL AFTER `lastEditedDate`; +ALTER TABLE `zt_kanbancard` ADD `progress` float unsigned NOT NULL DEFAULT '0' AFTER `estimate`; + ALTER TABLE `zt_user` ADD `visions` varchar(20) NOT NULL AFTER `visits`; UPDATE `zt_user` SET `visions`='rnd,lite'; INSERT INTO `zt_group` (`vision`, `name`, `role`, `desc`) VALUES -('lite', '迅捷版用户分组', 'liteUser', '迅捷版用户分组'); +('lite', '管理员', 'liteUser', '迅捷版用户分组'); + +INSERT INTO `zt_group` (`vision`, `name`, `role`, `desc`) VALUES +('lite', '项目管理', 'liteUser', '迅捷版用户分组'); + +INSERT INTO `zt_group` (`vision`, `name`, `role`, `desc`) VALUES +('lite', '团队成员', 'liteUser', '迅捷版用户分组'); ALTER TABLE `zt_productplan` ADD `closedReason` varchar(20) NOT NULL AFTER `order`; diff --git a/db/updatemaxinstall.sql b/db/updatemaxinstall.sql index c60896bd00..8d40c498a0 100644 --- a/db/updatemaxinstall.sql +++ b/db/updatemaxinstall.sql @@ -801,7 +801,6 @@ CREATE TABLE IF NOT EXISTS `zt_trainplan` ( `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -ALTER TABLE `zt_todo` CHANGE `type` `type` char(15) NOT NULL AFTER `feedback`; -- DROP TABLE IF EXISTS `zt_gapanalysis`; CREATE TABLE IF NOT EXISTS `zt_gapanalysis` ( diff --git a/db/zentao.sql b/db/zentao.sql index ef4fea5d45..558fa1af54 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -724,13 +724,14 @@ CREATE TABLE `zt_kanbancard` ( `fromID` mediumint(8) unsigned NOT NULL, `fromType` varchar(30) NOT NULL, `name` varchar(255) NOT NULL, - `status` varchar(30) NOT NULL, + `status` varchar(30) NOT NULL DEFAULT 'doing', `pri` mediumint(8) unsigned NOT NULL, `assignedTo` text NOT NULL, `desc` text NOT NULL, `begin` date NOT NULL, `end` date NOT NULL, `estimate` float unsigned NOT NULL, + `progress` float unsigned NOT NULL DEFAULT '0', `color` char(7) NOT NULL, `acl` char(30) NOT NULL DEFAULT 'open', `whitelist` text NOT NULL, @@ -785,7 +786,6 @@ CREATE TABLE IF NOT EXISTS `zt_kanbanlane` ( -- DROP TABLE IF EXISTS `zt_kanbancolumn`; CREATE TABLE IF NOT EXISTS `zt_kanbancolumn` ( `id` int(8) NOT NULL AUTO_INCREMENT, - `lane` mediumint(8) NOT NULL DEFAULT '0', `parent` mediumint(8) NOT NULL DEFAULT '0', `type` char(30) NOT NULL, `region` mediumint(8) unsigned NOT NULL, @@ -794,7 +794,6 @@ CREATE TABLE IF NOT EXISTS `zt_kanbancolumn` ( `color` char(30) NOT NULL, `limit` smallint(6) NOT NULL DEFAULT '-1', `order` mediumint(8) NOT NULL DEFAULT '0', - `cards` text NULL, `archived` enum('0', '1') NOT NULL DEFAULT '0', `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`) @@ -1751,7 +1750,13 @@ INSERT INTO `zt_group` (`id`, `name`, `role`, `desc`) VALUES (13, 'PROJECTADMIN', 'projectAdmin', 'Project Admins manage project privileges'); INSERT INTO `zt_group` (`id`, `vision`, `name`, `role`, `desc`) VALUES -(14, 'lite', '迅捷版用户分组', 'liteUser', '迅捷版用户分组'); +(14, 'lite', '管理员', 'liteUser', '迅捷版用户分组'); + +INSERT INTO `zt_group` (`id`, `vision`, `name`, `role`, `desc`) VALUES +(15, 'lite', '项目管理', 'liteUser', '迅捷版用户分组'); + +INSERT INTO `zt_group` (`id`, `vision`, `name`, `role`, `desc`) VALUES +(16, 'lite', '团队成员', 'liteUser', '迅捷版用户分组'); INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (1,'action','comment'), @@ -1919,8 +1924,6 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (1,'execution','importtask'), (1,'execution','index'), (1,'execution','kanban'), -(1,'execution','kanbanColsColor'), -(1,'execution','kanbanHideCols'), (1,'execution','linkStory'), (1,'execution','manageMembers'), (1,'execution','manageProducts'), @@ -3123,8 +3126,6 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (4,'execution','importtask'), (4,'execution','index'), (4,'execution','kanban'), -(4,'execution','kanbanColsColor'), -(4,'execution','kanbanHideCols'), (4,'execution','linkStory'), (4,'execution','manageMembers'), (4,'execution','manageProducts'), @@ -3621,8 +3622,6 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (5,'execution','importtask'), (5,'execution','index'), (5,'execution','kanban'), -(5,'execution','kanbanColsColor'), -(5,'execution','kanbanHideCols'), (5,'execution','linkStory'), (5,'execution','manageMembers'), (5,'execution','manageProducts'), @@ -4072,8 +4071,6 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (6,'execution','importtask'), (6,'execution','index'), (6,'execution','kanban'), -(6,'execution','kanbanColsColor'), -(6,'execution','kanbanHideCols'), (6,'execution','linkStory'), (6,'execution','manageMembers'), (6,'execution','manageProducts'), @@ -5980,232 +5977,6 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (11,'user','view'), (12,'my','limited'); -INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES -(14,'action','comment'), -(14,'action','editComment'), -(14,'action','trash'), -(14,'action','undelete'), -(14,'admin','checkWeak'), -(14,'admin','index'), -(14,'admin','safe'), -(14,'api','debug'), -(14,'company','browse'), -(14,'company','dynamic'), -(14,'company','edit'), -(14,'company','index'), -(14,'company','view'), -(14,'custom','execution'), -(14,'custom','flow'), -(14,'custom','index'), -(14,'custom','product'), -(14,'custom','restore'), -(14,'custom','set'), -(14,'custom','setPublic'), -(14,'datatable','setGlobal'), -(14,'dept','browse'), -(14,'dept','delete'), -(14,'dept','edit'), -(14,'dept','manageChild'), -(14,'dept','updateOrder'), -(14,'dev','api'), -(14,'dev','db'), -(14,'dev','editor'), -(14,'doc','allLibs'), -(14,'doc','browse'), -(14,'doc','collect'), -(14,'doc','create'), -(14,'doc','createLib'), -(14,'doc','delete'), -(14,'doc','deleteFile'), -(14,'doc','deleteLib'), -(14,'doc','edit'), -(14,'doc','editLib'), -(14,'doc','index'), -(14,'doc','objectLibs'), -(14,'doc','showFiles'), -(14,'doc','tableContents'), -(14,'doc','view'), -(14,'execution','all'), -(14,'execution','browse'), -(14,'execution','bug'), -(14,'execution','build'), -(14,'execution','burn'), -(14,'execution','burnData'), -(14,'execution','computeBurn'), -(14,'execution','doc'), -(14,'execution','dynamic'), -(14,'execution','executionkanban'), -(14,'execution','fixFirst'), -(14,'execution','grouptask'), -(14,'execution','kanban'), -(14,'execution','manageMembers'), -(14,'execution','printKanban'), -(14,'execution','story'), -(14,'execution','storyEstimate'), -(14,'execution','storyKanban'), -(14,'execution','task'), -(14,'execution','team'), -(14,'execution','tree'), -(14,'execution','treeStory'), -(14,'execution','treeTask'), -(14,'execution','view'), -(14,'execution','whitelist'), -(14,'file','delete'), -(14,'file','download'), -(14,'file','edit'), -(14,'file','setPublic'), -(14,'file','uploadImages'), -(14,'group','browse'), -(14,'index','index'), -(14,'message','browser'), -(14,'message','index'), -(14,'message','setting'), -(14,'misc','ping'), -(14,'my','bug'), -(14,'my','calendar'), -(14,'my','changePassword'), -(14,'my','contribute'), -(14,'my','deleteContacts'), -(14,'my','doc'), -(14,'my','dynamic'), -(14,'my','editProfile'), -(14,'my','execution'), -(14,'my','index'), -(14,'my','manageContacts'), -(14,'my','preference'), -(14,'my','profile'), -(14,'my','project'), -(14,'my','score'), -(14,'my','story'), -(14,'my','task'), -(14,'my','team'), -(14,'my','todo'), -(14,'my','uploadAvatar'), -(14,'my','work'), -(14,'personnel','accessible'), -(14,'personnel','invest'), -(14,'personnel','whitelist'), -(14,'product','all'), -(14,'product','browse'), -(14,'product','build'), -(14,'product','dashboard'), -(14,'product','dynamic'), -(14,'product','index'), -(14,'product','kanban'), -(14,'product','project'), -(14,'product','roadmap'), -(14,'product','view'), -(14,'product','whitelist'), -(14,'productplan','browse'), -(14,'productplan','view'), -(14,'program','browse'), -(14,'program','kanban'), -(14,'program','product'), -(14,'program','project'), -(14,'program','stakeholder'), -(14,'program','view'), -(14,'project','browse'), -(14,'project','bug'), -(14,'project','build'), -(14,'project','create'), -(14,'project','dynamic'), -(14,'project','edit'), -(14,'project','execution'), -(14,'project','index'), -(14,'project','kanban'), -(14,'project','manageMembers'), -(14,'project','programTitle'), -(14,'project','qa'), -(14,'project','team'), -(14,'project','testcase'), -(14,'project','testreport'), -(14,'project','testtask'), -(14,'project','view'), -(14,'project','whitelist'), -(14,'projectbuild','browse'), -(14,'projectrelease','browse'), -(14,'projectrelease','view'), -(14,'projectstory','story'), -(14,'projectstory','track'), -(14,'projectstory','view'), -(14,'report','bugAssign'), -(14,'report','bugCreate'), -(14,'report','index'), -(14,'report','productSummary'), -(14,'report','projectDeviation'), -(14,'report','workload'), -(14,'search','buildForm'), -(14,'search','buildIndex'), -(14,'search','buildQuery'), -(14,'search','deleteQuery'), -(14,'search','index'), -(14,'search','saveQuery'), -(14,'search','select'), -(14,'story','bugs'), -(14,'story','cases'), -(14,'story','report'), -(14,'story','tasks'), -(14,'story','track'), -(14,'story','view'), -(14,'task','activate'), -(14,'task','assignTo'), -(14,'task','batchAssignTo'), -(14,'task','batchCancel'), -(14,'task','batchChangeModule'), -(14,'task','batchClose'), -(14,'task','batchCreate'), -(14,'task','batchEdit'), -(14,'task','cancel'), -(14,'task','close'), -(14,'task','confirmStoryChange'), -(14,'task','create'), -(14,'task','delete'), -(14,'task','deleteEstimate'), -(14,'task','edit'), -(14,'task','editEstimate'), -(14,'task','export'), -(14,'task','finish'), -(14,'task','pause'), -(14,'task','recordEstimate'), -(14,'task','report'), -(14,'task','restart'), -(14,'task','start'), -(14,'task','view'), -(14,'todo','activate'), -(14,'todo','assignTo'), -(14,'todo','batchClose'), -(14,'todo','batchCreate'), -(14,'todo','batchEdit'), -(14,'todo','batchFinish'), -(14,'todo','close'), -(14,'todo','create'), -(14,'todo','createcycle'), -(14,'todo','delete'), -(14,'todo','edit'), -(14,'todo','export'), -(14,'todo','finish'), -(14,'todo','import2Today'), -(14,'todo','start'), -(14,'todo','view'), -(14,'tree','browse'), -(14,'tree','browseTask'), -(14,'tree','delete'), -(14,'tree','edit'), -(14,'tree','fix'), -(14,'tree','manageChild'), -(14,'tree','updateOrder'), -(14,'user','batchEdit'), -(14,'user','cropAvatar'), -(14,'user','dynamic'), -(14,'user','execution'), -(14,'user','issue'), -(14,'user','profile'), -(14,'user','risk'), -(14,'user','story'), -(14,'user','task'), -(14,'user','todo'), -(14,'user','view'); - REPLACE 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', '2', '{\"SRName\":\"\\u7814\\u53d1\\u9700\\u6c42\",\"URName\":\"\\u7528\\u6237\\u9700\\u6c42\"}', '1'), ('zh-cn', 'custom', 'URSRList', '3', '{\"SRName\":\"\\u8f6f\\u9700\",\"URName\":\"\\u7528\\u9700\"}', '1'),('zh-cn', 'custom', 'URSRList', '4', '{\"SRName\":\"\\u6545\\u4e8b\",\"URName\":\"\\u53f2\\u8bd7\"}', '1'), @@ -7040,8 +6811,6 @@ ALTER TABLE `zt_story` ADD `feedback` mediumint(8) unsigned NOT NULL DEFAULT '0' ALTER TABLE `zt_user` ADD `feedback` enum('0', '1') NOT NULL DEFAULT '0' AFTER `locked`; ALTER TABLE `zt_group` ADD `developer` enum('0', '1') NOT NULL DEFAULT '1' AFTER `acl`; -INSERT INTO `zt_group` (`name`, `role`, `desc`, `acl`, `developer`) VALUES ('FEEDBACK', 'feedback', 'Feedback', '', '0'); - -- DROP TABLE IF EXISTS `zt_feedbackproduct`; CREATE TABLE IF NOT EXISTS `zt_feedbackview` ( `account` char(30) NOT NULL, @@ -7586,7 +7355,7 @@ CREATE VIEW `view_datasource_5` AS select `id`,`name` from `zt_task` where `del DROP VIEW IF EXISTS `view_datasource_46`; CREATE VIEW `view_datasource_46` AS select `id`,`name` from `zt_task` where `deleted` = '0' and vision = 'lite'; -UPDATE `zt_user` SET `visions` = 'lite' WHERE `feedback` = '1'; +UPDATE `zt_user` SET `visions` = 'lite', `feedback` = '0' WHERE `feedback` = '1'; REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (1,'account','browse'), @@ -8584,8 +8353,8 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES -- DROP TABLE IF EXISTS `zt_workflow`; CREATE TABLE IF NOT EXISTS `zt_workflow` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, - `parent` varchar(30) NOT NULL, - `child` varchar(30) NOT NULL, + `parent` varchar(30) NOT NULL, + `child` varchar(30) NOT NULL, `type` varchar(10) NOT NULL DEFAULT 'flow', `app` varchar(20) NOT NULL, `position` varchar(30) NOT NULL, @@ -8659,7 +8428,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowdatasource` ( `type` enum('system', 'sql', 'func', 'option', 'lang', 'category') NOT NULL DEFAULT 'option', `name` varchar(30) NOT NULL, `code` varchar(30) NOT NULL, - `datasource` text NOT NULL, + `datasource` text NOT NULL, `view` varchar(20) NOT NULL, `keyField` varchar(50) NOT NULL, `valueField` varchar(50) NOT NULL, @@ -8687,7 +8456,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowfield` ( `rules` varchar(255) NOT NULL, `placeholder` varchar(100) NOT NULL, `order` smallint(5) unsigned NOT NULL, - `searchOrder` smallint(5) unsigned NOT NULL DEFAULT '0', + `searchOrder` smallint(5) unsigned NOT NULL DEFAULT '0', `exportOrder` smallint(5) unsigned NOT NULL DEFAULT '0', `canExport` enum('0', '1') NOT NULL DEFAULT '0', `canSearch` enum('0', '1') NOT NULL DEFAULT '0', @@ -8760,7 +8529,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowlinkdata` ( -- DROP TABLE IF EXISTS `zt_workflowrelation`; CREATE TABLE IF NOT EXISTS `zt_workflowrelation` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, - `prev` varchar(30) NOT NULL, + `prev` varchar(30) NOT NULL, `next` varchar(30) NOT NULL, `field` varchar(50) NOT NULL, `actions` varchar(20) NOT NULL, @@ -8792,7 +8561,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowrule` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, `type` enum('system', 'regex', 'func') NOT NULL DEFAULT 'regex', `name` varchar(30) NOT NULL, - `rule` text NOT NULL, + `rule` text NOT NULL, `createdBy` char(30) NOT NULL, `createdDate` datetime NOT NULL, `editedBy` char(30) NOT NULL, @@ -9843,7 +9612,6 @@ CREATE TABLE IF NOT EXISTS `zt_trainplan` ( `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -ALTER TABLE `zt_todo` CHANGE `type` `type` char(15) NOT NULL AFTER `feedback`; -- DROP TABLE IF EXISTS `zt_gapanalysis`; CREATE TABLE IF NOT EXISTS `zt_gapanalysis` ( @@ -13119,6 +12887,15 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (11,'workloadbudget','unlink'), (11,'workloadbudget','view'); +Insert into `zt_grouppriv`(`module`, `method`,`group`) +select `module`, `method`,14 as `group` from `zt_grouppriv` where `group` in (select `group` from `zt_grouppriv` where `group` = 1); + +Insert into `zt_grouppriv`(`module`, `method`,`group`) +select `module`, `method`,15 as `group` from `zt_grouppriv` where `group` in (select `group` from `zt_grouppriv` where `group` = 4); + +Insert into `zt_grouppriv`(`module`, `method`,`group`) +select `module`, `method`,16 as `group` from `zt_grouppriv` where `group` in (select `group` from `zt_grouppriv` where `group` = 9); + REPLACE INTO `zt_lang` (`lang`, `module`, `section`, `key`, `value`, `system`) VALUES ('all', 'process', 'classify', 'support', '支持过程', '1'), ('all', 'process', 'classify', 'engineering', '工程支持', '1'), diff --git a/extension/lite/execution/ext/model/lite.php b/extension/lite/execution/ext/model/lite.php index 2930759820..af0eb526da 100644 --- a/extension/lite/execution/ext/model/lite.php +++ b/extension/lite/execution/ext/model/lite.php @@ -40,7 +40,17 @@ public function setMenu($executionID, $buildID = 0, $extra = '') if(strpos('|task|calendar|gantt|tree|grouptask|', "|{$lowerMethod}|") !== false) $this->lang->TRActions = $this->getTRActions($lowerMethod); if(strpos('|relation|maintainrelation|', "|{$lowerMethod}|") !== false) $this->lang->TRActions = $this->getTRActions('gantt'); - if($lowerModule == 'task' || ($lowerModule == 'execution' and strpos('|kanban|task|calendar|gantt|tree|grouptask|', "|{$lowerMethod}|") === false)) $this->lang->TRActions = $this->getTRActions($this->session->kanbanview); + if($lowerModule == 'task' or ($lowerModule == 'execution' and strpos('|kanban|task|calendar|gantt|tree|grouptask|', "|{$lowerMethod}|") === false)) + { + if($this->session->kanbanview) + { + $this->lang->TRActions = $this->getTRActions($this->session->kanbanview); + } + elseif($this->cookie->kanbanview) + { + $this->lang->TRActions = $this->getTRActions($this->cookie->kanbanview); + } + } $this->lang->modulePageNav = $modulePageNav; } diff --git a/extension/lite/group/ext/lang/resource.php b/extension/lite/group/ext/lang/resource.php index 8c9f89ce2b..442db9e851 100644 --- a/extension/lite/group/ext/lang/resource.php +++ b/extension/lite/group/ext/lang/resource.php @@ -435,8 +435,6 @@ $lang->resource->execution->tree = 'treeAction'; $lang->resource->execution->treeTask = 'treeOnlyTask'; $lang->resource->execution->treeStory = 'treeOnlyStory'; $lang->resource->execution->all = 'allExecutionAB'; -$lang->resource->execution->kanbanHideCols = 'kanbanHideCols'; -$lang->resource->execution->kanbanColsColor = 'kanbanColsColor'; $lang->resource->execution->export = 'exportAction'; $lang->resource->execution->storyKanban = 'storyKanban'; $lang->resource->execution->storySort = 'storySort'; @@ -444,8 +442,7 @@ $lang->resource->execution->whitelist = 'whitelist'; $lang->resource->execution->addWhitelist = 'addWhitelist'; $lang->resource->execution->unbindWhitelist = 'unbindWhitelist'; //$lang->resource->execution->storyEstimate = 'storyEstimate'; -$lang->resource->execution->executionkanban = 'kanbanAction'; -$lang->resource->execution->kanban = 'RDKanban'; +$lang->resource->execution->kanban = 'kanban'; //if($config->systemMode == 'classic') $lang->resource->project->list = 'list'; //$lang->execution->methodOrder[0] = 'index'; @@ -489,8 +486,6 @@ $lang->execution->methodOrder[180] = 'batchUnlinkStory'; $lang->execution->methodOrder[185] = 'updateOrder'; $lang->execution->methodOrder[190] = 'taskKanban'; $lang->execution->methodOrder[195] = 'printKanban'; -$lang->execution->methodOrder[200] = 'kanbanHideCols'; -$lang->execution->methodOrder[205] = 'kanbanColsColor'; $lang->execution->methodOrder[210] = 'tree'; $lang->execution->methodOrder[215] = 'treeTask'; $lang->execution->methodOrder[220] = 'treeStory'; @@ -502,7 +497,6 @@ $lang->execution->methodOrder[245] = 'whitelist'; $lang->execution->methodOrder[250] = 'addWhitelist'; $lang->execution->methodOrder[255] = 'unbindWhitelist'; $lang->execution->methodOrder[260] = 'storyEstimate'; -$lang->execution->methodOrder[265] = 'executionkanban'; $lang->execution->methodOrder[270] = 'kanban'; /* Task. */ diff --git a/framework/base/router.class.php b/framework/base/router.class.php index 09d2ec232c..3756752e26 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -1393,30 +1393,30 @@ class baseRouter if($this->checkModuleName($moduleName)) { - /* 1. 如果通用版本里有此模块,优先使用。 If module is in the open edition, use it. */ - $modulePath = $this->getModuleRoot($appName) . $moduleName . DS; - if(is_dir($modulePath)) return $modulePath; + /* 1. 最后尝试在定制开发中寻找。 Finally, try to find the module in the custom dir. */ + $modulePath = $this->getExtensionRoot() . 'custom' . DS . $moduleName . DS; + if(is_dir($modulePath) and (file_exists($modulePath . 'control.php') or file_exists($modulePath . 'model.php'))) return $modulePath; - /* 2. 尝试查找喧喧是否有此模块。 Try to find the module in xuan. */ - $modulePath = $this->getExtensionRoot() . 'xuan' . DS . $moduleName . DS; - if(is_dir($modulePath)) return $modulePath; + /* 2. 如果设置过vision,尝试在vision中查找。 If vision is set, try to find the module in the vision. */ + if($this->config->vision != 'rnd') + { + $modulePath = $this->getExtensionRoot() . $this->config->vision . DS . $moduleName . DS; + if(is_dir($modulePath) and (file_exists($modulePath . 'control.php') or file_exists($modulePath . 'model.php'))) return $modulePath; + } /* 3. 尝试查找商业版本是否有此模块。 Try to find the module in other editon. */ if($this->config->edition != 'open') { $modulePath = $this->getExtensionRoot() . $this->config->edition . DS . $moduleName . DS; - if(is_dir($modulePath)) return $modulePath; + if(is_dir($modulePath) and (file_exists($modulePath . 'control.php') or file_exists($modulePath . 'model.php'))) return $modulePath; } - /* 4. 如果设置过vision,尝试在vision中查找。 If vision is set, try to find the module in the vision. */ - if($this->config->vision != 'rnd') - { - $modulePath = $this->getExtensionRoot() . $this->config->vision . DS . $moduleName . DS; - if(is_dir($modulePath)) return $modulePath; - } + /* 4. 尝试查找喧喧是否有此模块。 Try to find the module in xuan. */ + $modulePath = $this->getExtensionRoot() . 'xuan' . DS . $moduleName . DS; + if(is_dir($modulePath) and (file_exists($modulePath . 'control.php') or file_exists($modulePath . 'model.php'))) return $modulePath; - /* 5. 最后尝试在定制开发中寻找。 Finally, try to find the module in the custom dir. */ - return $this->getExtensionRoot() . 'custom' . DS . $moduleName . DS; + /* 5. 如果通用版本里有此模块,优先使用。 If module is in the open edition, use it. */ + return $this->getModuleRoot($appName) . $moduleName . DS; } } diff --git a/module/block/control.php b/module/block/control.php index c5275638eb..d8a6a8e4e1 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -1528,7 +1528,7 @@ class block extends control count(assignedTo = '{$this->app->user->account}' or null) as assignedToMe, count(status != 'closed' or null) as unclosed, count((status != 'closed' and status != 'resolved') or null) as unresolved, - count(confirmed = '0' or null) as unconfirmed, + count((confirmed = '0' and toStory = '0') or null) as unconfirmed, count((resolvedDate >= '$yesterday' and resolvedDate < '$today') or null) as yesterdayResolved, count((closedDate >= '$yesterday' and closedDate < '$today') or null) as yesterdayClosed") ->from(TABLE_BUG) diff --git a/module/company/config.php b/module/company/config.php index 7ff4a97de4..475e57d824 100644 --- a/module/company/config.php +++ b/module/company/config.php @@ -37,6 +37,7 @@ $config->company->browse->search['fields']['dept'] = $lang->user->dept; $config->company->browse->search['fields']['account'] = $lang->user->account; $config->company->browse->search['fields']['role'] = $lang->user->role; $config->company->browse->search['fields']['phone'] = $lang->user->phone; +$config->company->browse->search['fields']['visions'] = $lang->user->visions; $config->company->browse->search['fields']['join'] = $lang->user->join; $config->company->browse->search['fields']['id'] = $lang->user->id; $config->company->browse->search['fields']['commiter'] = $lang->user->commiter; @@ -57,6 +58,7 @@ $config->company->browse->search['params']['account'] = array('operator' => 'in $config->company->browse->search['params']['role'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->user->roleList); $config->company->browse->search['params']['phone'] = array('operator' => 'include', 'control' => 'input', 'values' => ''); $config->company->browse->search['params']['join'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); +$config->company->browse->search['params']['visions'] = array('operator' => 'include', 'control' => 'select', 'values' => $lang->visionList); $config->company->browse->search['params']['id'] = array('operator' => '=', 'control' => 'input', 'values' => ''); $config->company->browse->search['params']['commiter'] = array('operator' => 'include', 'control' => 'select', 'values' => ''); $config->company->browse->search['params']['gender'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->user->genderList); diff --git a/module/company/model.php b/module/company/model.php index 7cf87d3d11..e189200163 100644 --- a/module/company/model.php +++ b/module/company/model.php @@ -162,7 +162,8 @@ class companyModel extends model { $this->config->company->browse->search['actionURL'] = $actionURL; $this->config->company->browse->search['queryID'] = $queryID; - $this->config->company->browse->search['params']['dept']['values'] = array('' => '') + $this->loadModel('dept')->getOptionMenu(); + $this->config->company->browse->search['params']['dept']['values'] = array('' => '') + $this->loadModel('dept')->getOptionMenu(); + $this->config->company->browse->search['params']['visions']['values'] = $this->loadModel('user')->getVisionList(); $this->loadModel('search')->setSearchParams($this->config->company->browse->search); } diff --git a/module/dept/control.php b/module/dept/control.php index c68439a309..4d1ab141ba 100644 --- a/module/dept/control.php +++ b/module/dept/control.php @@ -149,12 +149,13 @@ class dept extends control * * @param int $dept * @param string $user + * @param string $key id|account * @access public * @return void */ - public function ajaxGetUsers($dept, $user = '') + public function ajaxGetUsers($dept, $user = '', $key = 'account') { - $users = array('' => '') + $this->dept->getDeptUserPairs($dept); + $users = array('' => '') + $this->dept->getDeptUserPairs($dept, $key); return print(html::select('user', $users, $user, "class='form-control chosen'")); } } diff --git a/module/doc/model.php b/module/doc/model.php index 0467144b01..c6befca2f6 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -501,7 +501,11 @@ class docModel extends model */ public function getById($docID, $version = 0, $setImgSize = false) { - $doc = $this->dao->select('*')->from(TABLE_DOC)->where('id')->eq((int)$docID)->fetch(); + $doc = $this->dao->select('*')->from(TABLE_DOC) + ->where('id')->eq((int)$docID) + ->andWhere('vision')->eq($this->config->vision) + ->fetch(); + if(!$doc) return false; if(!$this->checkPrivDoc($doc)) { @@ -1265,7 +1269,7 @@ class docModel extends model ->beginIF($type == 'book')->orderBy('id_desc')->fi() ->fetchAll('id'); } - else if($type != 'product' and $type != 'project' and $type != 'execution') + elseif($type != 'product' and $type != 'project' and $type != 'execution') { return false; } @@ -1389,6 +1393,7 @@ class docModel extends model $executions = $this->dao->select('*')->from(TABLE_EXECUTION) ->where('deleted')->eq(0) ->andWhere('type')->in('sprint,stage,kanban') + ->andWhere('vision')->eq($this->config->vision) ->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->sprints)->fi() ->orderBy('order_asc') ->fetchAll('id'); diff --git a/module/doc/view/create.html.php b/module/doc/view/create.html.php index 7db9fbd853..59accb6c47 100644 --- a/module/doc/view/create.html.php +++ b/module/doc/view/create.html.php @@ -19,22 +19,19 @@ config->edition != 'open'):?>