diff --git a/db/update16.5.sql b/db/update16.5.sql index a7c74f7aa2..768572f590 100644 --- a/db/update16.5.sql +++ b/db/update16.5.sql @@ -90,7 +90,7 @@ DELETE FROM `zt_config` WHERE `section` = 'customMenu'; UPDATE `zt_story` SET `plan` = '' WHERE `plan` = 0; -UPDATE `zt_workflowfield` set `control` = 'datetime' WHERE `module` = 'testcase' and `field` IN ('openedDate','reviewedDate','lastEditedDate','lastRunDate'); +UPDATE `zt_workflowfield` set `type` = 'datetime', `control` = 'datetime' WHERE `module` = 'testcase' and `field` IN ('openedDate','reviewedDate','lastEditedDate','lastRunDate'); UPDATE `zt_workflowfield` set `control` = 'date' WHERE `module` = 'testtask' and `field` IN ('begin','end'); UPDATE `zt_workflowfield` set `control` = 'richtext' WHERE `module` = 'testtask' and `field` = 'desc'; @@ -112,7 +112,7 @@ UPDATE `zt_workflowfield` SET `control` = 'radio' WHERE `module` = 'release' and UPDATE `zt_workflowfield` SET `control` = 'datetime' WHERE `module` = 'story' and `field` = 'openedDate'; UPDATE `zt_workflowfield` SET `control` = 'datetime' WHERE `module` = 'story' and `field` = 'assignedDate'; UPDATE `zt_workflowfield` SET `control` = 'datetime' WHERE `module` = 'story' and `field` = 'lastEditedDate'; -UPDATE `zt_workflowfield` SET `control` = 'date' WHERE `module` = 'story' and `field` = 'reviewedDate'; +UPDATE `zt_workflowfield` SET `type` = 'datetime', `control` = 'datetime' WHERE `module` = 'story' and `field` = 'reviewedDate'; UPDATE `zt_workflowfield` SET `control` = 'datetime' WHERE `module` = 'story' and `field` = 'closedDate'; UPDATE `zt_workflowfield` SET `control` = 'radio' WHERE `module` = 'story' and `field` = 'deleted'; @@ -146,6 +146,11 @@ REPLACE INTO `zt_workflowdatasource` (`type`, `name`, `code`, `buildin`, `dataso ('lang', '反馈处理方案', 'feedbackSolution', '1', 'feedbackSolution', '', '', ''), ('lang', '反馈关闭原因', 'feedbackclosedReason', '1', 'feedbackclosedReason', '', '', ''); +INSERT INTO `zt_workflowdatasource` (`type`, `name`, `code`, `buildin`, `vision`, `datasource`, `view`, `keyField`, `valueField`) VALUES +('lang', '反馈类型', 'litefeedbackType', '1', 'lite', 'feedbackType', '', '', ''), +('lang', '反馈处理方案', 'litefeedbackSolution', '1', 'lite', 'feedbackSolution', '', '', ''), +('lang', '反馈关闭原因', 'litefeedbackclosedReason', '1', 'lite', 'feedbackclosedReason', '', '', ''); + REPLACE INTO `zt_workflowfield` (`module`, `field`, `type`, `length`, `name`, `control`, `expression`, `options`, `default`, `rules`, `placeholder`, `order`, `searchOrder`, `exportOrder`, `canExport`, `canSearch`, `isValue`, `readonly`, `buildin`, `desc`, `createdBy`, `createdDate`, `editedBy`, `editedDate`) VALUES ('execution', 'type', 'char', '30', '迭代类型', 'select', '', '16', 'sprint', '', '', 3, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('execution', 'begin', 'date', '', '计划开始', 'date', '', '', '', '', '', 14, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), @@ -205,16 +210,17 @@ REPLACE INTO `zt_workflowfield` (`module`, `field`, `type`, `length`, `name`, `c ('bug', 'lastEditedDate', 'datetime', '30', '修改日期', 'datetime', '', '', '', '', '', 58, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('bug', 'deleted', 'enum', '', '已删除', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 59, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('task', 'project', 'mediumint', '8', '所属项目', 'select', '', '2', '0', '', '', 2, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('task', 'parent', 'mediumint', '8', '父任务', 'select', '', '9', '0', '', '', 3, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('task', 'storyVersion', 'smallint', '6', '研发需求版本', 'integer', '', '', '1', '', '', 7, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('task', 'estimate', 'float', '', '最初预计', 'decimal', '', '', '', '', '', 13, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('task', 'consumed', 'float', '', '总计消耗', 'decimal', '', '', '', '', '', 14, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('task', 'left', 'float', '', '预计剩余', 'decimal', '', '', '', '', '', 15, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('task', 'estimate', 'float', '', '最初预计', 'input', '', '', '', '', '', 13, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('task', 'consumed', 'float', '', '总计消耗', 'input', '', '', '', '', '', 14, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('task', 'left', 'float', '', '预计剩余', 'input', '', '', '', '', '', 15, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('task', 'deadline', 'date', '', '截止日期', 'date', '', '', '', '', '', 16, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('task', 'desc', 'text', '', '任务描述', 'richtext', '', '', '', '', '', 20, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('task', 'openedDate', 'datetime', '', '创建日期', 'datetime', '', '', '', '', '', 23, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('task', 'assignedDate', 'datetime', '30', '指派日期', 'datetime', '', '', '', '', '', 25, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('task', 'estStarted', 'date', '', '预计开始', 'date', '', '', '', '', '', 26, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('task', 'realStarted', 'date', '', '实际开始', 'date', '', '', '', '', '', 27, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('task', 'realStarted', 'datetime', '', '实际开始', 'datetime', '', '', '', '', '', 27, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('task', 'finishedDate', 'datetime', '', '实际完成', 'datetime', '', '', '', '', '', 29, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('task', 'canceledDate', 'datetime', '', '取消时间', 'datetime', '', '', '', '', '', 32, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('task', 'closedDate', 'datetime', '', '关闭时间', 'datetime', '', '', '', '', '', 34, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), @@ -350,7 +356,7 @@ UPDATE `zt_workflowaction` SET `type`='single', `position`='browseandview', `sho UPDATE `zt_workflowaction` SET `type`='single', `position`='browseandview', `show`='direct', `open`='normal', `layout`='normal' WHERE `module`='execution' AND `action`='all'; UPDATE `zt_workflowaction` SET `type`='single', `position`='browseandview', `show`='direct', `open`='normal', `layout`='normal' WHERE `module`='task' AND `action`='browse'; UPDATE `zt_workflowaction` SET `type`='single', `position`='browseandview', `show`='direct', `open`='normal', `layout`='normal' WHERE `module`='task' AND `action`='create'; -UPDATE `zt_workflowaction` SET `type`='batch', `position`='browseandview', `show`='direct', `open`='normal', `layout`='normal' WHERE `module`='task' AND `action`='batchcreate'; +UPDATE `zt_workflowaction` SET `type`='batch', `position`='browse', `show`='direct', `open`='normal', `layout`='normal' WHERE `module`='task' AND `action`='batchcreate'; UPDATE `zt_workflowaction` SET `type`='batch', `position`='browse', `show`='direct', `open`='normal', `layout`='normal' WHERE `module`='task' AND `action`='batchedit'; UPDATE `zt_workflowaction` SET `type`='single', `position`='browse', `show`='direct', `open`='modal', `layout`='normal' WHERE `module`='task' AND `action`='exporttemplate'; UPDATE `zt_workflowaction` SET `type`='single', `position`='browse', `show`='direct', `open`='modal', `layout`='normal' WHERE `module`='task' AND `action`='import'; @@ -422,7 +428,7 @@ UPDATE `zt_workflowaction` SET `type`='batch' WHERE `module`IN ('feedback','case UPDATE `zt_workflowaction` SET `position`='browse' WHERE `module`IN ('feedback','caselib','testsuite','testtask','testcase') AND `action` IN ('batchedit','batchcreate','import','showimport'); UPDATE `zt_workflowfield` SET `control` = 'radio' WHERE `module` = 'program' and `field` = 'deleted'; -UPDATE `zt_workflowfield` SET `type` = 'char', `length` => '30', `control` = 'radio' WHERE `module` = 'program' and `field` = 'type'; +UPDATE `zt_workflowfield` SET `type` = 'char', `length` = '30', `control` = 'radio' WHERE `module` = 'program' and `field` = 'type'; UPDATE `zt_workflowfield` SET `control` = 'date' WHERE `module` = 'program' and `field` = 'begin'; UPDATE `zt_workflowfield` SET `control` = 'date' WHERE `module` = 'program' and `field` = 'end'; UPDATE `zt_workflowfield` SET `control` = 'integer' WHERE `module` = 'program' and `field` = 'days'; @@ -431,7 +437,7 @@ UPDATE `zt_workflowfield` SET `control` = 'richtext' WHERE `module` = 'program' UPDATE `zt_workflowfield` SET `control` = 'datetime' WHERE `module` = 'program' and `field` = 'openedDate'; UPDATE `zt_workflowfield` SET `control` = 'datetime' WHERE `module` = 'program' and `field` = 'closedDate'; UPDATE `zt_workflowfield` SET `control` = 'datetime' WHERE `module` = 'program' and `field` = 'canceledDate'; -UPDATE `zt_workflowfield` SET `type` => 'char', `length` => '30' WHERE `module` = 'program' and `field` = 'acl'; +UPDATE `zt_workflowfield` SET `type` = 'char', `length` = '30' WHERE `module` = 'program' and `field` = 'acl'; UPDATE `zt_workflowfield` SET `control` = 'multi-select', `options` = 'user' WHERE `module` = 'program' and `field` = 'whitelist'; REPLACE INTO `zt_workflowfield` (`module`, `field`, `type`, `length`, `name`, `control`, `expression`, `options`, `default`, `rules`, `placeholder`, `order`, `searchOrder`, `exportOrder`, `canExport`, `canSearch`, `isValue`, `readonly`, `buildin`, `desc`, `createdBy`, `createdDate`, `editedBy`, `editedDate`) VALUES @@ -459,10 +465,12 @@ UPDATE `zt_workflowaction` SET `position`='browse' WHERE `action`='create' AND ` UPDATE `zt_workflowaction` SET `method`=`action` WHERE `method`=''; UPDATE `zt_workflowaction` SET `method`='browse' WHERE `action`='admin'; -UPDATE `zt_workflowaction` SET `method`='operate' WHERE `action` IN ('review','assignTo','comment','close','activate','start','block', 'suspend', 'putoff', 'confirmBug', 'resolve', 'cancel', 'confirmStoryChange', 'finish', 'pause', 'restart'); +UPDATE `zt_workflowaction` SET `method`='operate' WHERE `action` IN ('review','assignTo','comment','close','activate','start','block', 'suspend', 'putoff', 'confirmBug', 'resolve', 'cancel', 'confirmStoryChange', 'finish', 'pause', 'restart', 'change'); UPDATE `zt_workflowaction` SET `method`='batchoperate' WHERE `action` IN('batchedit', 'batchconfirm', 'batchresolve'); UPDATE `zt_workflowaction` SET `method`='view' WHERE `action`='adminview'; UPDATE `zt_workflowaction` SET `method`='browse' WHERE module='execution' and `action` IN('all', 'task'); +UPDATE `zt_workflowaction` SET `method`='browse' WHERE module='product' and `action` = 'all'; + UPDATE `zt_workflowaction` SET `show`='direct' WHERE `buildin`=1; REPLACE INTO `zt_workflowaction` (`module`, `action`, `method`, `name`, `type`, `batchMode`, `extensionType`, `open`, `position`, `layout`, `show`, `order`, `buildin`, `virtual`, `conditions`, `verifications`, `hooks`, `linkages`, `js`, `css`, `toList`, `blocks`, `desc`, `status`, `vision`, `createdBy`, `createdDate`, `editedBy`, `editedDate`) VALUES ('story', 'exporttemplate', 'exporttemplate', '下载模板', 'single', 'different', 'extend', 'modal', 'browse', 'normal', 'dropdownlist', 0, 1, 0, '', '', '', '', '', '', '', '', '', 'enable', 'rnd', '', '2022-05-13 09:34:30', '', '0000-00-00 00:00:00'), diff --git a/db/zentao.sql b/db/zentao.sql index 00a2e1783a..fa4a834289 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -8763,22 +8763,29 @@ INSERT INTO `zt_workflowdatasource` (`type`, `name`, `code`, `buildin`, `datasou ('sql', '用例', 'cases', '1', 'select id,title from zt_case where deleted=\"0\"', 'view_datasource_41', 'id', 'title'), ('system', '反馈分支', 'feedbackModules', '1', '{\"app\":\"system\",\"module\":\"tree\",\"method\":\"getOptionMenu\",\"methodDesc\":\"Create an option menu in html.\",\"params\":[{\"name\":\"rootID\",\"type\":\"int\",\"desc\":\"\",\"value\":\"0\"},{\"name\":\"type\",\"type\":\"string\",\"desc\":\"\",\"value\":\"feedback\"},{\"name\":\"startModule\",\"type\":\"int\",\"desc\":\"\",\"value\":\"0\"},{\"name\":\"branch\",\"type\":\"\",\"desc\":\"\",\"value\":\"0\"}]}', '', '', ''), ('lang', '需求类型', 'storyType', '1', 'storyType', '', '', ''), -('system', '执行', 'executions', '1', '{\"app\":\"system\",\"module\":\"execution\",\"method\":\"getPairs\",\"methodDesc\":\"Get execution pairs.\",\"params\":[{\"name\":\"projectID\",\"type\":\"int\",\"desc\":\"\",\"value\":\"0\"},{\"name\":\"type\",\"type\":\"string\",\"desc\":\"all|sprint|stage|kanban\",\"value\":\"all\"},{\"name\":\"mode\",\"type\":\"string\",\"desc\":\"all|noclosed|stagefilter or empty\",\"value\":\"\"}]}', '', '', ''); +('system', '执行', 'executions', '1', '{\"app\":\"system\",\"module\":\"execution\",\"method\":\"getPairs\",\"methodDesc\":\"Get execution pairs.\",\"params\":[{\"name\":\"projectID\",\"type\":\"int\",\"desc\":\"\",\"value\":\"0\"},{\"name\":\"type\",\"type\":\"string\",\"desc\":\"all|sprint|stage|kanban\",\"value\":\"all\"},{\"name\":\"mode\",\"type\":\"string\",\"desc\":\"all|noclosed|stagefilter or empty\",\"value\":\"\"}]}', '', '', ''), +('lang', '项目模型', 'projectModel', '1', 'projectModel', '', '', ''), +('lang', '反馈类型', 'feedbackType', '1', 'feedbackType', '', '', ''), +('lang', '反馈处理方案', 'feedbackSolution', '1', 'feedbackSolution', '', '', ''), +('lang', '反馈关闭原因', 'feedbackclosedReason', '1', 'feedbackclosedReason', '', '', ''); INSERT INTO `zt_workflowdatasource` (`type`, `name`, `code`, `buildin`, `vision`, `datasource`, `view`, `keyField`, `valueField`) VALUES -('system', '项目', 'liteprojects', '1', 'lite', '{\"app\":\"system\",\"module\":\"project\",\"method\":\"getPairsByModel\",\"methodDesc\":\"Get project pairs by model and project.\",\"params\":[{\"name\":\"model\",\"type\":\"string\",\"desc\":\"all|scrum|waterfall\",\"value\":\"all\"},{\"name\":\"programID\",\"type\":\"int\",\"desc\":\"\",\"value\":\"0\"},{\"name\":\"param\",\"type\":\"\",\"desc\":\"\",\"value\":\"\"}]}', '', '', ''), -('sql', '任务', 'litetasks', '1', 'lite', 'select id,name from zt_task where deleted=\"0\" and vision=\"lite\"', 'view_datasource_46', 'id', 'name'), -('system', '权限分组', 'litegroups', '1', 'lite', '{\"app\":\"system\",\"module\":\"group\",\"method\":\"getPairs\",\"methodDesc\":\"\",\"params\":[]}', '', '', ''), -('system', '用户', 'liteusers', '1', 'lite', '{\"app\":\"system\",\"module\":\"user\",\"method\":\"getPairs\",\"methodDesc\":\"\",\"params\":[{\"name\":\"params\",\"type\":\"\",\"desc\":\"\",\"value\":\"noclosed|noletter\"},{\"name\":\"usersToAppended\",\"type\":\"\",\"desc\":\"\",\"value\":\"\"}]}', '', '', ''), -('sql', '模块', 'litemodules', '1', 'lite', 'select id,name from zt_module where deleted=\"0\"', 'view_datasource_11', 'id', 'name'), -('lang', '项目类型', 'liteprojectType', '1', 'lite', 'projectType', '', '', ''), -('lang', '项目状态', 'liteprojectStatus', '1', 'lite', 'projectStatus', '', '', ''), -('lang', '项目访问控制', 'liteprojectAcl', '1', 'lite', 'projectAcl', '', '', ''), -('lang', '任务类型', 'litetaskType', '1', 'lite', 'taskType', '', '', ''), -('lang', '任务优先级', 'litetaskPri', '1', 'lite', 'taskPri', '', '', ''), -('lang', '任务状态', 'litetaskStatus', '1', 'lite', 'taskStatus', '', '', ''), -('lang', '反馈状态', 'litefeedbackStatus', '1', 'lite', 'feedbackStatus', '', '', ''), -('system', '反馈分支', 'litefeedbackModules', '1', 'lite', '{\"app\":\"system\",\"module\":\"tree\",\"method\":\"getOptionMenu\",\"methodDesc\":\"Create an option menu in html.\",\"params\":[{\"name\":\"rootID\",\"type\":\"int\",\"desc\":\"\",\"value\":\"0\"},{\"name\":\"type\",\"type\":\"string\",\"desc\":\"\",\"value\":\"feedback\"},{\"name\":\"startModule\",\"type\":\"int\",\"desc\":\"\",\"value\":\"0\"},{\"name\":\"branch\",\"type\":\"\",\"desc\":\"\",\"value\":\"0\"}]}', '', '', ''); +('system', '项目', 'liteprojects', '1', 'lite', '{\"app\":\"system\",\"module\":\"project\",\"method\":\"getPairsByModel\",\"methodDesc\":\"Get project pairs by model and project.\",\"params\":[{\"name\":\"model\",\"type\":\"string\",\"desc\":\"all|scrum|waterfall\",\"value\":\"all\"},{\"name\":\"programID\",\"type\":\"int\",\"desc\":\"\",\"value\":\"0\"},{\"name\":\"param\",\"type\":\"\",\"desc\":\"\",\"value\":\"\"}]}', '', '', ''), +('sql', '任务', 'litetasks', '1', 'lite', 'select id,name from zt_task where deleted=\"0\" and vision=\"lite\"', 'view_datasource_46', 'id', 'name'), +('system', '权限分组', 'litegroups', '1', 'lite', '{\"app\":\"system\",\"module\":\"group\",\"method\":\"getPairs\",\"methodDesc\":\"\",\"params\":[]}', '', '', ''), +('system', '用户', 'liteusers', '1', 'lite', '{\"app\":\"system\",\"module\":\"user\",\"method\":\"getPairs\",\"methodDesc\":\"\",\"params\":[{\"name\":\"params\",\"type\":\"\",\"desc\":\"\",\"value\":\"noclosed|noletter\"},{\"name\":\"usersToAppended\",\"type\":\"\",\"desc\":\"\",\"value\":\"\"}]}', '', '', ''), +('sql', '模块', 'litemodules', '1', 'lite', 'select id,name from zt_module where deleted=\"0\"', 'view_datasource_11', 'id', 'name'), +('lang', '项目类型', 'liteprojectType', '1', 'lite', 'projectType', '', '', ''), +('lang', '项目状态', 'liteprojectStatus', '1', 'lite', 'projectStatus', '', '', ''), +('lang', '项目访问控制', 'liteprojectAcl', '1', 'lite', 'projectAcl', '', '', ''), +('lang', '任务类型', 'litetaskType', '1', 'lite', 'taskType', '', '', ''), +('lang', '任务优先级', 'litetaskPri', '1', 'lite', 'taskPri', '', '', ''), +('lang', '任务状态', 'litetaskStatus', '1', 'lite', 'taskStatus', '', '', ''), +('lang', '反馈状态', 'litefeedbackStatus', '1', 'lite', 'feedbackStatus', '', '', ''), +('system', '反馈分支', 'litefeedbackModules', '1', 'lite', '{\"app\":\"system\",\"module\":\"tree\",\"method\":\"getOptionMenu\",\"methodDesc\":\"Create an option menu in html.\",\"params\":[{\"name\":\"rootID\",\"type\":\"int\",\"desc\":\"\",\"value\":\"0\"},{\"name\":\"type\",\"type\":\"string\",\"desc\":\"\",\"value\":\"feedback\"},{\"name\":\"startModule\",\"type\":\"int\",\"desc\":\"\",\"value\":\"0\"},{\"name\":\"branch\",\"type\":\"\",\"desc\":\"\",\"value\":\"0\"}]}', '', '', ''), +('lang', '反馈类型', 'litefeedbackType', '1', 'lite', 'feedbackType', '', '', ''), +('lang', '反馈处理方案', 'litefeedbackSolution', '1', 'lite', 'feedbackSolution', '', '', ''), +('lang', '反馈关闭原因', 'litefeedbackclosedReason', '1', 'lite', 'feedbackclosedReason', '', '', ''); DROP VIEW IF EXISTS `view_datasource_4`; DROP VIEW IF EXISTS `view_datasource_5`; diff --git a/module/action/lang/en.php b/module/action/lang/en.php index 22f7363432..19cabc24e4 100755 --- a/module/action/lang/en.php +++ b/module/action/lang/en.php @@ -138,6 +138,7 @@ $lang->action->objectTypes['kanbancolumn'] = 'Kanban Column'; $lang->action->objectTypes['kanbancard'] = 'Kanban Card'; $lang->action->objectTypes['sonarqube'] = 'SonarQube Server'; $lang->action->objectTypes['sonarqubeproject'] = 'SonarQube Project'; +$lang->action->objectTypes['stage'] = 'Stage'; /* Used to describe operation history. */ $lang->action->desc = new stdclass(); diff --git a/module/action/lang/zh-cn.php b/module/action/lang/zh-cn.php index 1874ef290a..b70a9b69bd 100755 --- a/module/action/lang/zh-cn.php +++ b/module/action/lang/zh-cn.php @@ -138,6 +138,7 @@ $lang->action->objectTypes['kanbancolumn'] = '看板列'; $lang->action->objectTypes['kanbancard'] = '看板卡片'; $lang->action->objectTypes['sonarqube'] = 'SonarQube服务器'; $lang->action->objectTypes['sonarqubeproject'] = 'SonarQube项目'; +$lang->action->objectTypes['stage'] = '阶段'; /* 用来描述操作历史记录。*/ $lang->action->desc = new stdclass(); diff --git a/module/execution/control.php b/module/execution/control.php index 0f3f306bda..9811f255d1 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1149,7 +1149,7 @@ class execution extends control * @access public * @return void */ - public function burn($executionID = 0, $type = 'noweekend,nodelay', $interval = 0, $burnBy = 'left') + public function burn($executionID = 0, $type = 'noweekend', $interval = 0, $burnBy = 'left') { $this->loadModel('report'); $execution = $this->commonAction($executionID); @@ -1162,11 +1162,16 @@ class execution extends control $position[] = $this->lang->execution->burn; /* Get date list. */ - $executionInfo = $this->execution->getByID($executionID); - $deadline = $execution->status == 'closed' ? substr($execution->closedDate, 0, 10) : $execution->suspendedDate; - $deadline = strpos('closed,suspended', $execution->status) === false ? helper::today() : $deadline; - $endDate = strpos($type, 'withdelay') !== false ? $deadline : $executionInfo->end; - list($dateList, $interval) = $this->execution->getDateList($executionInfo->begin, $endDate, $type, $interval, 'Y-m-d'); + if(((strpos('closed,suspended', $execution->status) === false and helper::today() > $execution->end) + or ($execution->status == 'closed' and substr($execution->closedDate, 0, 10) > $execution->end) + or ($execution->status == 'suspended' and $execution->suspendedDate > $execution->end)) + and strpos($type, 'delay') === false) + $type .= ',withdelay'; + + $deadline = $execution->status == 'closed' ? substr($execution->closedDate, 0, 10) : $execution->suspendedDate; + $deadline = strpos('closed,suspended', $execution->status) === false ? helper::today() : $deadline; + $endDate = strpos($type, 'withdelay') !== false ? $deadline : $execution->end; + list($dateList, $interval) = $this->execution->getDateList($execution->begin, $endDate, $type, $interval, 'Y-m-d', $execution->end); $chartData = $this->execution->buildBurnData($executionID, $dateList, $type, $burnBy); $dayList = array_fill(1, floor((int)$execution->days / $this->config->execution->maxBurnDay) + 5, ''); diff --git a/module/execution/model.php b/module/execution/model.php index 9973811363..5296c17f03 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -2997,12 +2997,11 @@ class executionModel extends model public function getBurnDataFlot($executionID = 0, $burnBy = '', $showDelay = false, $dateList = array()) { /* Get execution and burn counts. */ - $execution = $this->getById($executionID); + $execution = $this->getById($executionID); /* If the burnCounts > $itemCounts, get the latest $itemCounts records. */ $sets = $this->dao->select("date AS name, `$burnBy` AS value, `$burnBy`")->from(TABLE_BURN)->where('execution')->eq((int)$executionID)->andWhere('task')->eq(0)->orderBy('date DESC')->fetchAll('name'); - $count = 0; $burnData = array(); foreach($sets as $date => $set) { @@ -3011,25 +3010,25 @@ class executionModel extends model if($showDelay and $date < $execution->end) $set->value = 'null'; $burnData[$date] = $set; - $count++; } - if($showDelay) + foreach($dateList as $date) { - foreach($dateList as $date) + if(!isset($burnData[$date])) { - if(!isset($burnData[$date])) + if(($showDelay and $date < $execution->end) or (!$showDelay and $date > $execution->end)) { $set = new stdClass(); - $set->name = $date; - $set->left = 0; - $set->value = 'null'; + $set->name = $date; + $set->value = 'null'; + $set->$burnBy = 0; $burnData[$date] = $set; } } } + krsort($burnData); $burnData = array_reverse($burnData); return $burnData; @@ -3257,10 +3256,11 @@ class executionModel extends model * @param string $type * @param string|int $interval * @param string $format + * @param string $executionDeadline * @access public * @return array */ - public function getDateList($begin, $end, $type, $interval = '', $format = 'm/d/Y') + public function getDateList($begin, $end, $type, $interval = '', $format = 'm/d/Y', $executionDeadline = '') { $this->app->loadClass('date', true); $dateList = date::getDateList($begin, $end, $format, $type, $this->config->execution->weekend); @@ -3276,6 +3276,7 @@ class executionModel extends model foreach($dateList as $i => $date) { $counter ++; + if($date == $executionDeadline) continue; if($counter <= $spaces) { unset($dateList[$i]); @@ -3698,9 +3699,9 @@ class executionModel extends model $this->loadModel('report'); $burnBy = $burnBy ? $burnBy : 'left'; - $sets = $this->getBurnDataFlot($executionID, $burnBy); - $limitJSON = '[]'; - $baselineJSON = '[]'; + $sets = $this->getBurnDataFlot($executionID, $burnBy, false, $dateList); + $limitJSON = '[]'; + $baselineJSON = '[]'; $firstBurn = empty($sets) ? 0 : reset($sets); $firstTime = !empty($firstBurn->$burnBy) ? $firstBurn->$burnBy : (!empty($firstBurn->value) ? $firstBurn->value : 0); diff --git a/module/execution/view/burn.html.php b/module/execution/view/burn.html.php index 81ea61c552..e059b7ce32 100644 --- a/module/execution/view/burn.html.php +++ b/module/execution/view/burn.html.php @@ -31,10 +31,7 @@ $weekend = strpos($type, 'noweekend') !== false ? 'withweekend' : 'noweekend'; $delay = strpos($type, 'withdelay') !== false ? 'nodelay' : 'withdelay'; echo html::a('#', $lang->execution->$weekend, '', "class='btn btn-link' id='weekend'"); - if((strpos('closed,suspended', $execution->status) === false and helper::today() > $execution->end) - or ($execution->status == 'closed' and substr($execution->closedDate, 0, 10) > $execution->end) - or ($execution->status == 'suspended' and $execution->suspendedDate > $execution->end)) - echo html::a('#', $lang->execution->$delay, '', "class='btn btn-link' id='delay'"); + if(strpos($type, 'delay') !== false) echo html::a('#', $lang->execution->$delay, '', "class='btn btn-link' id='delay'"); if(common::canModify('execution', $execution)) common::printLink('execution', 'fixFirst', "execution=$execution->id", $lang->execution->fixFirst, '', "class='btn btn-link iframe' data-width='700'"); echo $lang->execution->howToUpdateBurn; diff --git a/module/program/control.php b/module/program/control.php index 3c8d716d36..9c5db15563 100644 --- a/module/program/control.php +++ b/module/program/control.php @@ -47,14 +47,21 @@ class program extends control if(strtolower($status) == 'bysearch') { $queryID = (int)$param; - $programs = $this->program->getListBySearch($orderBy, $pager, $queryID); + $programs = $this->program->getListBySearch($orderBy, $queryID); } else { $topPrograms = $this->program->getList($status, $orderBy, $pager, 'top'); - $programIds = array(); - foreach($topPrograms as $programID => $program) $programIds[] = $programID; - $programs = $this->program->getList($status, $orderBy, null, 'child', $programIds); + $programs = $this->program->getList($status, $orderBy, null, 'child', $topPrograms); + + /* Get summary. */ + $topCount = $indCount = 0; + foreach($programs as $program) + { + if($program->type == 'program' and $program->parent == 0) $topCount ++; + if($program->type == 'project' and $program->parent == 0) $indCount ++; + } + $summary = sprintf($this->lang->program->summary, $topCount, $indCount); } } @@ -78,6 +85,7 @@ class program extends control $this->view->programs = $programs; $this->view->status = $status; $this->view->orderBy = $orderBy; + $this->view->summary = isset($summary) ? $summary : ''; $this->view->pager = $pager; $this->view->users = $this->user->getPairs('noletter'); $this->view->userIdPairs = $this->user->getPairs('noletter|showid'); diff --git a/module/program/js/browse.js b/module/program/js/browse.js index dc14dca89b..e716e7b4b2 100644 --- a/module/program/js/browse.js +++ b/module/program/js/browse.js @@ -43,13 +43,6 @@ $(function() $('#programForm').removeClass('has-row-checked'); } }); - - var myPager = $('.pager').data('zui.pager'); - if(status != 'bySearch' && myPager) - { - myPager.lang.pageSize = pageSize; - myPager.set(); - } }); function showEditCheckbox(show) @@ -76,13 +69,15 @@ function showEditCheckbox(show) }); if(show) { - var tableFooter = ""; - $('#programForm').attr('action', createLink('project', 'batchEdit', 'from=program')).append(tableFooter); + var tableFooter = "
"; + $('#programForm').attr('action', createLink('project', 'batchEdit', 'from=program')); + $('.table-footer').prepend(tableFooter).show(); $('body').scroll(); } else { - $('#programForm').find('.table-footer').remove(); + $('#programForm').find('.editCheckbox').remove(); + if($('#programForm .pager').length == 0) $('.table-footer').hide(); $('#programForm').removeAttr('action'); } } diff --git a/module/program/lang/en.php b/module/program/lang/en.php index 7f610919d4..7f3cb0dc2d 100644 --- a/module/program/lang/en.php +++ b/module/program/lang/en.php @@ -88,7 +88,7 @@ $lang->program->moreProgram = 'More program'; $lang->program->stakeholderType = 'Stakeholder type'; $lang->program->parentBudget = 'Parent program surplus budget:'; $lang->program->isStakeholderKey = 'Key stakeholder'; -$lang->program->pageSize = '{recPerPage} Top Programs per page'; +$lang->program->summary = 'This page contains %d top programs and %d independent projects.'; $lang->program->stakeholderTypeList['inside'] = 'Inside'; $lang->program->stakeholderTypeList['outside'] = 'Outside'; diff --git a/module/program/lang/zh-cn.php b/module/program/lang/zh-cn.php index bdbc4f48b3..a2666d36e9 100644 --- a/module/program/lang/zh-cn.php +++ b/module/program/lang/zh-cn.php @@ -88,7 +88,7 @@ $lang->program->moreProgram = '更多项目集'; $lang->program->stakeholderType = '干系人类型'; $lang->program->parentBudget = '所属项目集剩余预算:'; $lang->program->isStakeholderKey = '关键干系人'; -$lang->program->pageSize = '每页 {recPerPage} 项顶级项目集'; +$lang->program->summary = '本页共 %d 个顶级项目集,%d 个独立项目。'; $lang->program->stakeholderTypeList['inside'] = '内部'; $lang->program->stakeholderTypeList['outside'] = '外部'; diff --git a/module/program/model.php b/module/program/model.php index a34cce9774..457cdea101 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -140,9 +140,9 @@ class programModel extends model $projectIdList = array(); if($type === 'child') { - foreach($idList as $topID) + foreach($idList as $topID => $topProgram) { - $projectIdList += $this->dao->select('id')->from(TABLE_PROGRAM)->Where('path')->like(",$topID,%")->fetchPairs('id'); + $projectIdList += $topProgram->type == 'project' ? array($topID => $topID) : $this->dao->select('id')->from(TABLE_PROGRAM)->Where('path')->like(",$topID,%")->fetchPairs('id'); } } @@ -168,12 +168,11 @@ class programModel extends model * Get program list by search. * * @param string $orderBy - * @param object $pager * @param int $queryID * @access public * @return void */ - public function getListBySearch($orderBy = 'id_asc', $pager = NULL, $queryID = 0) + public function getListBySearch($orderBy = 'id_asc', $queryID = 0) { if($queryID) { @@ -194,7 +193,7 @@ class programModel extends model } $query = $this->session->programQuery; - return $this->dao->select('*')->from(TABLE_PROGRAM) + $programs = $this->dao->select('*')->from(TABLE_PROGRAM) ->where('deleted')->eq(0) ->andWhere('vision')->eq($this->config->vision) ->andWhere('((type')->eq('program') @@ -206,8 +205,14 @@ class programModel extends model ->beginIF(!$this->cookie->showClosed)->andWhere('status')->ne('closed')->fi() ->beginIF($query)->andWhere($query)->fi() ->orderBy($orderBy) - ->page($pager) ->fetchAll('id'); + + /* Do not display project separately. */ + foreach($programs as $id => $program) + { + if($program->type == 'project' and !isset($programs[$program->parent])) unset($programs[$id]); + } + return $programs; } /** diff --git a/module/program/view/browse.html.php b/module/program/view/browse.html.php index abbf959b56..75e70e538f 100644 --- a/module/program/view/browse.html.php +++ b/module/program/view/browse.html.php @@ -15,7 +15,6 @@ edit);?> selectAll);?> -program->pageSize);?> diff --git a/module/program/view/browsebylist.html.php b/module/program/view/browsebylist.html.php index 834d949a36..39511dc8fe 100644 --- a/module/program/view/browsebylist.html.php +++ b/module/program/view/browsebylist.html.php @@ -138,7 +138,10 @@ - +