diff --git a/db/update16.5.sql b/db/update16.5.sql index 5d79c85913..ef50627048 100644 --- a/db/update16.5.sql +++ b/db/update16.5.sql @@ -90,6 +90,22 @@ DELETE FROM `zt_config` WHERE `section` = 'customMenu'; UPDATE `zt_story` SET `plan` = '' WHERE `plan` = 0; +REPLACE INTO `zt_workflowdatasource` (`type`, `name`, `code`, `buildin`, `datasource`, `view`, `keyField`, `valueField`) VALUES +('lang', '项目模型', 'projectModel', '1', 'projectModel', '', '', ''), +('lang', '反馈类型', 'feedbackType', '1', 'feedbackType', '', '', ''), +('lang', '反馈处理方案', 'feedbackSolution', '1', 'feedbackSolution', '', '', ''), +('lang', '反馈关闭原因', 'feedbackclosedReason', '1', 'feedbackclosedReason', '', '', ''), +('lang', '任务关闭原因', 'taskReason', '1', 'taskReason', '', '', ''), +('lang', '套件类型', 'testsuiteAuth', '1', 'testsuiteAuth', '', '', ''), +('system', '项目集', 'programs', '1', '{\"app\":\"system\",\"module\":\"program\",\"method\":\"getPairs\",\"methodDesc\":\"Get program pairs.\",\"params\":[{\"name\":\"isQueryAll\",\"type\":\"bool\",\"desc\":\"\",\"value\":\"\"},{\"name\":\"orderBy\",\"type\":\"string\",\"desc\":\"\",\"value\":\"id_desc\"}]}', '', '', ''), +('lang', '需求关闭原因', 'storyClosedReason', '1', 'storyClosedReason', '', '', ''); + +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', '', '', ''), +('lang', '任务关闭原因', 'litetaskReason', '1', 'lite', 'taskReason', '', '', ''); + 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'); @@ -117,53 +133,69 @@ UPDATE `zt_workflowfield` SET `type` = 'datetime', `control` = 'datetime' WHERE UPDATE `zt_workflowfield` SET `control` = 'datetime' WHERE `module` = 'story' and `field` = 'closedDate'; UPDATE `zt_workflowfield` SET `control` = 'radio' WHERE `module` = 'story' and `field` = 'deleted'; -UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'product' and `action` = 'all' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `type` = 'batch', `position` = 'browse' WHERE `module` = 'product' and `action` = 'batchedit' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'product' and `action` = 'browse' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'product' and `action` = 'view' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `show` = 'direct' WHERE `module` = 'product' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `type` = 'batch', `position` = 'browse' WHERE `module` = 'productplan' and `action` = 'batchedit' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'productplan' and `action` = 'browse' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `show` = 'direct' WHERE `module` = 'productplan' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'productplan' and `action` = 'view' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'release' and `action` = 'browse' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `show` = 'direct' WHERE `module` = 'release' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'release' and `action` = 'view' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `type` = 'batch' WHERE `module` = 'story' and `action` = 'batchcreate' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `type` = 'batch' WHERE `module` = 'story' and `action` = 'batchedit' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'story' and `action` = 'browse' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'story' and `action` = 'exporttemplate' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'story' and `action` = 'import' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'story' and `action` = 'view' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'story' and `action` = 'batchcreate' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'story' and `action` = 'batchedit' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `show` = 'direct' WHERE `module` = 'story' and `vision` = 'rnd' and action NOT IN ('exporttemplate', 'import'); -UPDATE `zt_workflowaction` SET `show` = 'direct' WHERE `module` = 'program' and `vision` = 'rnd'; -UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'program' and `vision` = 'rnd'; - -DELETE FROM `zt_workflowfield` WHERE `module`='execution' AND `field`='stage'; -DELETE FROM `zt_workflowfield` WHERE `module`='program' AND `field`='stage'; -DELETE FROM `zt_workflowfield` WHERE `module`='project' AND `field`='stage'; -DELETE FROM `zt_workflowfield` WHERE `module`='bug' AND `field`='feedback'; -DELETE FROM `zt_workflowfield` WHERE `module`='task' AND `field`='feedback'; - -REPLACE INTO `zt_workflowdatasource` (`type`, `name`, `code`, `buildin`, `datasource`, `view`, `keyField`, `valueField`) VALUES -('lang', '项目模型', 'projectModel', '1', 'projectModel', '', '', ''), -('lang', '反馈类型', 'feedbackType', '1', 'feedbackType', '', '', ''), -('lang', '反馈处理方案', 'feedbackSolution', '1', 'feedbackSolution', '', '', ''), -('lang', '反馈关闭原因', 'feedbackclosedReason', '1', 'feedbackclosedReason', '', '', ''), -('lang', '任务关闭原因', 'taskReason', '1', 'taskReason', '', '', ''), -('lang', '需求关闭原因', 'storyClosedReason', '1', 'storyClosedReason', '', '', ''), -('lang', '套件类型', 'testsuiteAuth', '1', 'testsuiteAuth', '', '', ''), -('system', '项目集', 'programs', '1', '{\"app\":\"system\",\"module\":\"program\",\"method\":\"getPairs\",\"methodDesc\":\"Get program pairs.\",\"params\":[{\"name\":\"isQueryAll\",\"type\":\"bool\",\"desc\":\"\",\"value\":\"\"},{\"name\":\"orderBy\",\"type\":\"string\",\"desc\":\"\",\"value\":\"id_desc\"}]}', '', '', ''); - -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', '', '', ''), -('lang', '任务关闭原因', 'litetaskReason', '1', 'lite', 'taskReason', '', '', ''); - 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 +('program', 'type', 'char', '30', '类型', 'select', '', '16', 'sprint', '', '', 2, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'begin', 'date', '', '计划开始', 'date', '', '', '', '', '', 15, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'end', 'date', '', '计划完成', 'date', '', '', '', '', '', 16, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'days', 'smallint', '5', '可用工作日', 'integer', '', '', '', '', '', 19, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'pri', 'enum', '', '优先级', 'select', '', '[1,2,3,4]', '1', '', '', 21, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'desc', 'text', '', '项目集描述', 'richtext', '', '', '', '', '', 22, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'openedDate', 'datetime', '', '创建日期', 'datetime', '', '', '', '', '', 28, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'closedDate', 'datetime', '', '关闭日期', 'datetime', '', '', '', '', '', 33, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'canceledDate', 'datetime', '', '取消日期', 'datetime', '', '', '', '', '', 35, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'whitelist', 'text', '', '白名单', 'multi-select', '', 'user', '', '', '', 43, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'deleted', 'enum', '', '已删除', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 48, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'lifetime', 'char', '30', '项目周期', 'input', '', '', '', '', '', 3, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'output', 'text', '', '输出', 'textarea', '', '', '', '', '', 9, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'auth', 'char', '30', '权限控制', 'input', '', '', '', '', '', 10, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'path', 'varchar', '255', '路径', 'input', '', '', '0', '', '', 12, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'grade', 'tinyint', '3', '层级', 'integer', '', '', '0', '', '', 13, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'realBegan', 'date', '', '实际开始日期', 'date', '', '', '', '', '', 17, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'realEnd', 'date', '', '实际完成日期', 'date', '', '', '', '', '', 18, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'version', 'smallint', '6', '版本', 'integer', '', '', '', '', '', 23, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'parentVersion', 'smallint', '6', '父版本', 'integer', '', '', '', '', '', 24, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'planDuration', 'int', '11', '计划周期天数', 'integer', '', '', '', '', '', 25, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'realDuration', 'int', '11', '实际周期天数', 'integer', '', '', '', '', '', 26, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'openedVersion', 'varchar', '20', '创建版本', 'input', '', '', '', '', '', 29, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'lastEditedBy', 'varchar', '30', '最后编辑人', 'select', '', 'user', '', '', '', 30, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'lastEditedDate', 'datetime', '', '最后编辑日期', 'datetime', '', '', '', '', '', 31, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'suspendedDate', 'date', '', '暂停日期', 'date', '', '', '', '', '', 36, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('program', 'vision', 'varchar', '10', '界面', 'input', '', '', 'rnd', '', '', 45, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'project', 'mediumint', '8', '所属项目集', 'input', '', '', '', '', '', 2, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'code', 'varchar', '45', '项目代号', 'input', '', '', '', '', '', 14, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', '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'), +('project', 'model', 'char', '30', '项目管理方式', 'input', '', '45', '', '', '', 2, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'name', 'varchar', '90', '项目名称', 'input', '', '', '', '', '', 15, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'begin', 'date', '', '计划开始', 'date', '', '', '', '', '', 16, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'end', 'date', '', '计划完成', 'date', '', '', '', '', '', 17, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'days', 'smallint', '5', '可用工作日', 'integer', '', '', '', '', '', 20, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'pri', 'enum', '', '优先级', 'select', '', '[1,2,3,4]', '1', '', '', 22, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'desc', 'text', '', '项目描述', 'richtext', '', '', '', '', '', 23, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'openedDate', 'datetime', '', '创建日期', 'datetime', '', '', '', '', '', 29, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'closedDate', 'datetime', '', '关闭日期', 'datetime', '', '', '', '', '', 34, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'canceledDate', 'datetime', '', '取消日期', 'datetime', '', '', '', '', '', 36, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'acl', 'char', '30', '访问控制', 'radio', '', '18', 'open', '', '', 43, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'whitelist', 'text', '', '项目白名单', 'multi-select', '', 'user', '', '', '', 44, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'deleted', 'enum', '', '已删除', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 49, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'lifetime', 'char', '30', '项目周期', 'input', '', '', '', '', '', 4, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'output', 'text', '', '输出', 'textarea', '', '', '', '', '', 10, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'auth', 'char', '30', '权限控制', 'input', '', '', '', '', '', 11, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'path', 'varchar', '255', '路径', 'input', '', '', '0', '', '', 13, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'grade', 'tinyint', '3', '层级', 'integer', '', '', '0', '', '', 14, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'realBegan', 'date', '', '实际开始日期', 'date', '', '', '', '', '', 18, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'realEnd', 'date', '', '实际完成日期', 'date', '', '', '', '', '', 19, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'version', 'smallint', '6', '版本', 'integer', '', '', '', '', '', 24, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'parentVersion', 'smallint', '6', '父版本', 'integer', '', '', '', '', '', 25, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'planDuration', 'int', '11', '计划周期天数', 'integer', '', '', '', '', '', 26, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'realDuration', 'int', '11', '实际周期天数', 'integer', '', '', '', '', '', 27, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'openedVersion', 'varchar', '20', '创建版本', 'input', '', '', '', '', '', 30, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'lastEditedBy', 'varchar', '30', '最后编辑人', 'select', '', 'user', '', '', '', 31, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'lastEditedDate', 'datetime', '', '最后编辑日期', 'datetime', '', '', '', '', '', 32, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'suspendedDate', 'date', '', '暂停日期', 'date', '', '', '', '', '', 37, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'vision', 'varchar', '10', '界面', 'input', '', '', 'rnd', '', '', 46, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'displayCards', 'smallint', '6', '每列最大卡片数', 'input', '', '', '0', '', '', 44, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('project', 'fluidBoard', 'enum', '', '列宽度', 'radio', '', '[\"\\u56fa\\u5b9a\\u5217\\u5bbd\",\"\\u81ea\\u9002\\u5e94\\u5217\\u5bbd\"]', '0', '', '', 45, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'project', 'mediumint', '8', '所属项目', 'input', '', '', '', '', '', 2, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('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'), ('execution', 'end', 'date', '', '计划完成', 'date', '', '', '', '', '', 15, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), @@ -176,31 +208,27 @@ REPLACE INTO `zt_workflowfield` (`module`, `field`, `type`, `length`, `name`, `c ('execution', 'acl', 'char', '30', '访问控制', 'radio', '', '18', 'open', '', '', 41, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('execution', 'whitelist', 'text', '', '白名单', 'multi-select', '', 'user', '', '', '', 42, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('execution', 'deleted', 'enum', '', '已删除', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 47, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'type', 'char', '30', '类型', 'select', '', '16', 'sprint', '', '', 2, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'begin', 'date', '', '计划开始', 'date', '', '', '', '', '', 15, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'end', 'date', '', '计划完成', 'date', '', '', '', '', '', 16, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'days', 'smallint', '5', '可用工作日', 'integer', '', '', '', '', '', 19, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'pri', 'enum', '', '优先级', 'select', '', '[1,2,3,4]', '1', '', '', 21, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'desc', 'text', '', '项目集描述', 'richtext', '', '', '', '', '', 22, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'openedDate', 'datetime', '', '创建日期', 'datetime', '', '', '', '', '', 28, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'closedDate', 'datetime', '', '关闭日期', 'datetime', '', '', '', '', '', 33, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'canceledDate', 'datetime', '', '取消日期', 'datetime', '', '', '', '', '', 35, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'whitelist', 'text', '', '白名单', 'multi-select', '', 'user', '', '', '', 43, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'deleted', 'enum', '', '已删除', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 48, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', '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'), -('project', 'model', 'char', '30', '项目管理方式', 'input', '', '45', '', '', '', 2, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'name', 'varchar', '90', '项目名称', 'input', '', '', '', '', '', 15, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'begin', 'date', '', '计划开始', 'date', '', '', '', '', '', 16, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'end', 'date', '', '计划完成', 'date', '', '', '', '', '', 17, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'days', 'smallint', '5', '可用工作日', 'integer', '', '', '', '', '', 20, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'pri', 'enum', '', '优先级', 'select', '', '[1,2,3,4]', '1', '', '', 22, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'desc', 'text', '', '项目描述', 'richtext', '', '', '', '', '', 23, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'openedDate', 'datetime', '', '创建日期', 'datetime', '', '', '', '', '', 29, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'closedDate', 'datetime', '', '关闭日期', 'datetime', '', '', '', '', '', 34, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'canceledDate', 'datetime', '', '取消日期', 'datetime', '', '', '', '', '', 36, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'acl', 'char', '30', '访问控制', 'radio', '', '18', 'open', '', '', 43, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'whitelist', 'text', '', '项目白名单', 'multi-select', '', 'user', '', '', '', 44, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'deleted', 'enum', '', '已删除', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 49, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'lifetime', 'char', '30', '项目周期', 'input', '', '', '', '', '', 4, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'attribute', 'varchar', '30', '阶段类型', 'input', '', '', '0', '', '', 5, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'percent', 'float', '', '工作量占比', 'input', '', '', '0', '', '', 6, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'milestone', 'enum', '', '里程碑', 'radio', '', '[\"\\u662f\",\"\\u5426\"]', '0', '', '', 7, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'output', 'text', '', '输出', 'textarea', '', '', '', '', '', 8, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'auth', 'char', '30', '权限控制', 'input', '', '', '', '', '', 9, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'path', 'varchar', '255', '路径', 'input', '', '', '0', '', '', 10, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'grade', 'tinyint', '3', '层级', 'integer', '', '', '0', '', '', 11, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'realBegan', 'date', '', '实际开始日期', 'date', '', '', '', '', '', 16, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'realEnd', 'date', '', '实际完成日期', 'date', '', '', '', '', '', 17, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'version', 'smallint', '6', '版本', 'integer', '', '', '', '', '', 22, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'parentVersion', 'smallint', '6', '父版本', 'integer', '', '', '', '', '', 23, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'planDuration', 'int', '11', '计划周期天数', 'integer', '', '', '', '', '', 24, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'realDuration', 'int', '11', '实际周期天数', 'integer', '', '', '', '', '', 25, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'openedVersion', 'varchar', '20', '创建版本', 'input', '', '', '', '', '', 28, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'lastEditedBy', 'varchar', '30', '最后编辑人', 'select', '', 'user', '', '', '', 29, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'lastEditedDate', 'datetime', '', '最后编辑日期', 'datetime', '', '', '', '', '', 30, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'suspendedDate', 'date', '', '暂停日期', 'date', '', '', '', '', '', 35, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'vision', 'varchar', '10', '界面', 'input', '', '', 'rnd', '', '', 44, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('execution', 'displayCards', 'smallint', '6', '每列最大卡片数', 'input', '', '', '0', '', '', 46, 0, 0, '0', '0', '0', '1', 1, '', 'wangyidong', '2022-05-17 11:05:43', '', '0000-00-00 00:00:00'), +('execution', 'fluidBoard', 'enum', '', '列宽度', 'radio', '', '[\"\\u56fa\\u5b9a\\u5217\\u5bbd\",\"\\u81ea\\u9002\\u5e94\\u5217\\u5bbd\"]', '0', '', '', 47, 0, 0, '0', '0', '0', '1', 1, '', 'wangyidong', '2022-05-17 11:05:43', '', '0000-00-00 00:00:00'), ('build', 'project', 'mediumint', '8', '所属项目', 'select', '', '2', '0', '', '', 4, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('build', 'date', 'date', '', '打包日期', 'date', '', '', '', '', '', 9, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('build', 'desc', 'text', '', '描述', 'richtext', '', '', '', '', '', 13, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), @@ -221,6 +249,19 @@ REPLACE INTO `zt_workflowfield` (`module`, `field`, `type`, `length`, `name`, `c ('bug', 'caseVersion', 'smallint', '6', '用例版本', 'integer', '', '', '', '', '', 46, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('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'), +('bug', 'confirmed', 'tinyint', '1', '是否确认', 'select', '', '[\"\\u662f\",\"\\u5426\"]', '0', '', '', 25, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('bug', 'hardware', 'varchar', '30', '硬件', 'input', '', '', '', '', '', 20, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('bug', 'feedbackBy', 'varchar', '100', '反馈者', 'input', '', '', '', '', '', 28, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('bug', 'notifyEmail', 'varchar', '100', '通知邮箱', 'input', '', '', '', '', '', 29, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('bug', 'result', 'mediumint', '8', '结果', 'input', '', '', '', '', '', 47, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('bug', 'repo', 'mediumint', '8', '所属版本库', 'input', '', '', '', '', '', 48, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('bug', 'mr', 'mediumint', '8', '合并请求', 'input', '', '', '', '', '', 49, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('bug', 'entry', 'text', '', '代码路径', 'input', '', '', '', '', '', 50, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('bug', 'lines', 'varchar', '10', '代码行', 'input', '', '', '', '', '', 51, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('bug', 'v1', 'varchar', '40', '版本1', 'input', '', '', '', '', '', 52, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('bug', 'v2', 'varchar', '40', '版本2', 'input', '', '', '', '', '', 53, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('bug', 'repoType', 'varchar', '30', '版本库类型', 'input', '', '', '', '', '', 54, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('bug', 'issueKey', 'varchar', '50', 'Sonarqube问题键值', 'input', '', '', '', '', '', 55, 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'), @@ -238,92 +279,19 @@ REPLACE INTO `zt_workflowfield` (`module`, `field`, `type`, `length`, `name`, `c ('task', 'closedDate', 'datetime', '', '关闭时间', 'datetime', '', '', '', '', '', 34, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('task', 'lastEditedDate', 'datetime', '', '最后修改日期', 'datetime', '', '', '', '', '', 39, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('task', 'deleted', 'enum', '', '已删除', 'select', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 48, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('bug', 'confirmed', 'tinyint', '1', '是否确认', 'select', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 25, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'lifetime', 'char', '30', 'lifetime', 'input', '', '', '', '', '', 4, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'lifetime', 'char', '30', 'lifetime', 'input', '', '', '', '', '', 3, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('task', 'designVersion', 'smallint', '6', '设计版本', 'integer', '', '', '', '', '', 8, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'attribute', 'varchar', '30', 'attribute', 'input', '', '', '0', '', '', 5, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'percent', 'float', '', 'percent', 'input', '', '', '0', '', '', 6, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'milestone', 'enum', '', 'milestone', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 7, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'output', 'text', '', 'output', 'textarea', '', '', '', '', '', 8, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'auth', 'char', '30', 'auth', 'input', '', '', '', '', '', 9, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'path', 'varchar', '255', 'path', 'input', '', '', '0', '', '', 10, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'grade', 'tinyint', '3', 'grade', 'integer', '', '', '0', '', '', 11, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'realBegan', 'date', '', '实际开始日期', 'date', '', '', '', '', '', 16, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'realEnd', 'date', '', '实际完成日期', 'date', '', '', '', '', '', 17, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'version', 'smallint', '6', 'version', 'integer', '', '', '', '', '', 22, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'parentVersion', 'smallint', '6', 'parentVersion', 'integer', '', '', '', '', '', 23, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'planDuration', 'int', '11', 'planDuration', 'integer', '', '', '', '', '', 24, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'realDuration', 'int', '11', 'realDuration', 'integer', '', '', '', '', '', 25, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'openedVersion', 'varchar', '20', 'openedVersion', 'input', '', '', '', '', '', 28, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'lastEditedBy', 'varchar', '30', 'lastEditedBy', 'select', '', 'user', '', '', '', 29, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'lastEditedDate', 'datetime', '', 'lastEditedDate', 'datetime', '', '', '', '', '', 30, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'suspendedDate', 'date', '', 'suspendedDate', 'date', '', '', '', '', '', 35, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'vision', 'varchar', '10', 'vision', 'input', '', '', 'rnd', '', '', 44, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'displayCards', 'enum', '', 'displayCards', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 45, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('execution', 'fluidBoard', 'enum', '', 'fluidBoard', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 46, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'output', 'text', '', 'output', 'textarea', '', '', '', '', '', 9, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'auth', 'char', '30', 'auth', 'input', '', '', '', '', '', 10, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'path', 'varchar', '255', 'path', 'input', '', '', '0', '', '', 12, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'grade', 'tinyint', '3', 'grade', 'integer', '', '', '0', '', '', 13, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'realBegan', 'date', '', 'realBegan', 'date', '', '', '', '', '', 17, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'realEnd', 'date', '', 'realEnd', 'date', '', '', '', '', '', 18, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'version', 'smallint', '6', 'version', 'integer', '', '', '', '', '', 23, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'parentVersion', 'smallint', '6', 'parentVersion', 'integer', '', '', '', '', '', 24, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'planDuration', 'int', '11', 'planDuration', 'integer', '', '', '', '', '', 25, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'realDuration', 'int', '11', 'realDuration', 'integer', '', '', '', '', '', 26, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'openedVersion', 'varchar', '20', 'openedVersion', 'input', '', '', '', '', '', 29, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'lastEditedBy', 'varchar', '30', 'lastEditedBy', 'select', '', 'user', '', '', '', 30, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'lastEditedDate', 'datetime', '', 'lastEditedDate', 'datetime', '', '', '', '', '', 31, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'suspendedDate', 'date', '', 'suspendedDate', 'date', '', '', '', '', '', 36, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'vision', 'varchar', '10', 'vision', 'input', '', '', 'rnd', '', '', 45, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'displayCards', 'enum', '', 'displayCards', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 46, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('program', 'fluidBoard', 'enum', '', 'fluidBoard', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 47, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'lifetime', 'char', '30', '项目周期', 'input', '', '', '', '', '', 4, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'attribute', 'varchar', '30', '阶段类型', 'input', '', '', '0', '', '', 7, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'percent', 'float', '', '工作量占比', 'input', '', '', '0', '', '', 8, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'milestone', 'enum', '', '里程碑', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 9, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'output', 'text', '', '输出', 'textarea', '', '', '', '', '', 10, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'auth', 'char', '30', '权限控制', 'input', '', '', '', '', '', 11, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'path', 'varchar', '255', '路径', 'input', '', '', '0', '', '', 13, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'grade', 'tinyint', '3', '层级', 'integer', '', '', '0', '', '', 14, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'realBegan', 'date', '', '实际开始日期', 'date', '', '', '', '', '', 18, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'realEnd', 'date', '', '实际完成日期', 'date', '', '', '', '', '', 19, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'version', 'smallint', '6', '版本', 'integer', '', '', '', '', '', 24, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'parentVersion', 'smallint', '6', '父版本', 'integer', '', '', '', '', '', 25, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'planDuration', 'int', '11', '计划周期天数', 'integer', '', '', '', '', '', 26, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'realDuration', 'int', '11', '实际周期天数', 'integer', '', '', '', '', '', 27, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'openedVersion', 'varchar', '20', '创建版本', 'input', '', '', '', '', '', 30, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'lastEditedBy', 'varchar', '30', '最后编辑人', 'select', '', 'user', '', '', '', 31, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'lastEditedDate', 'datetime', '', '最后编辑日期', 'datetime', '', '', '', '', '', 32, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'suspendedDate', 'date', '', 'suspendedDate', 'date', '', '', '', '', '', 37, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'vision', 'varchar', '10', 'vision', 'input', '', '', 'rnd', '', '', 46, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'displayCards', 'enum', '', 'displayCards', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 47, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('project', 'fluidBoard', 'enum', '', 'fluidBoard', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 48, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('bug', 'hardware', 'varchar', '30', '硬件', 'input', '', '', '', '', '', 20, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('bug', 'feedbackBy', 'varchar', '100', '反馈者', 'input', '', '', '', '', '', 28, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('bug', 'notifyEmail', 'varchar', '100', '通知邮箱', 'input', '', '', '', '', '', 29, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('bug', 'result', 'mediumint', '8', '结果', 'input', '', '', '', '', '', 47, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('bug', 'repo', 'mediumint', '8', '所属版本库', 'input', '', '', '', '', '', 48, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('bug', 'mr', 'mediumint', '8', 'mr', 'input', '', '', '', '', '', 49, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('bug', 'entry', 'text', '', 'entry', 'input', '', '', '', '', '', 50, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('bug', 'lines', 'varchar', '10', '代码行', 'input', '', '', '', '', '', 51, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('bug', 'v1', 'varchar', '40', '版本1', 'input', '', '', '', '', '', 52, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('bug', 'v2', 'varchar', '40', '版本2', 'input', '', '', '', '', '', 53, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('bug', 'repoType', 'varchar', '30', '版本库类型', 'input', '', '', '', '', '', 54, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('bug', 'issueKey', 'varchar', '50', 'issueKey', 'input', '', '', '', '', '', 55, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('task', 'version', 'smallint', '6', '版本', 'integer', '', '', '', '', '', 21, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('task', 'planDuration', 'int', '11', '计划持续天数', 'integer', '', '', '', '', '', 35, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('task', 'realDuration', 'int', '11', '实际持续天数', 'integer', '', '', '', '', '', 36, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('task', 'activatedDate', 'datetime', '', '激活日期', 'datetime', '', '', '', '', '', 40, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('task', 'repo', 'mediumint', '8', 'repo', 'input', '', '', '', '', '', 41, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('task', 'mr', 'mediumint', '8', 'mr', 'input', '', '', '', '', '', 42, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('task', 'entry', 'text', '', 'entry', 'input', '', '', '', '', '', 43, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('task', 'lines', 'varchar', '10', 'lines', 'input', '', '', '', '', '', 44, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('task', 'v1', 'varchar', '40', 'v1', 'input', '', '', '', '', '', 45, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('task', 'v2', 'varchar', '40', 'v2', 'input', '', '', '', '', '', 46, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('task', 'repo', 'mediumint', '8', '所属版本库', 'input', '', '', '', '', '', 41, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('task', 'mr', 'mediumint', '8', '合并请求', 'input', '', '', '', '', '', 42, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('task', 'entry', 'text', '', '代码路径', 'input', '', '', '', '', '', 43, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('task', 'lines', 'varchar', '10', '代码行', 'input', '', '', '', '', '', 44, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('task', 'v1', 'varchar', '40', '版本1', 'input', '', '', '', '', '', 45, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('task', 'v2', 'varchar', '40', '版本2', 'input', '', '', '', '', '', 46, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('task', 'closedReason', 'varchar', '30', '关闭原因', 'select', '', 49, '', '', '', 37, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), -('task', 'vision', 'varchar', '10', 'vision', 'input', '', '', '', '', '', 47, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), +('task', 'vision', 'varchar', '10', '界面', 'input', '', '', '', '', '', 47, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('feedback', 'type', 'char', '30', '反馈类型', 'select', '', '', '', '', '', 4, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('feedback', 'notifyEmail', 'varchar', '100', '通知邮箱', 'input', '', '', '', '', '', 9, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('feedback', 'faq', 'mediumint', '8', 'FAQ', 'input', '', '', '', '', '', 11, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), @@ -342,17 +310,49 @@ REPLACE INTO `zt_workflowfield` (`module`, `field`, `type`, `length`, `name`, `c ('testcase', 'precondition', 'text', '', '前置条件', 'textarea', '', '', '', '', '', 5, 0, 0, '0', '0', '0', '1', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'), ('testcase', 'subStatus', 'varchar', '30', '子状态', 'select', '', '', '', '', '', 17, 0, 0, '0', '0', '0', '0', 1, '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'); -UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='projectModel' ORDER BY id DESC LIMIT 1) WHERE `module`='project' AND `field`='model'; -UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='feedbackType' ORDER BY id DESC LIMIT 1) WHERE `module`='feedback' AND `field`='type'; -UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='feedbackSolution' ORDER BY id DESC LIMIT 1) WHERE `module`='feedback' AND `field`='solution'; -UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='storyClosedReason' ORDER BY id DESC LIMIT 1) WHERE `module`='story' AND `field`='closedReason'; -UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='taskReason' ORDER BY id DESC LIMIT 1) WHERE `module`='task' AND `field`='closedReason'; -UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='programs' ORDER BY id DESC LIMIT 1), `control`='select' WHERE `module`='program' AND `field`='parent'; -UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='programs' ORDER BY id DESC LIMIT 1), `control`='select' WHERE `module`='project' AND `field`='parent'; -UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='projects' ORDER BY id DESC LIMIT 1), `control`='select' WHERE `module`='execution' AND `field`='parent'; -UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='feedbackclosedReason' ORDER BY id DESC LIMIT 1), `control`='select' WHERE `module`='feedback' AND `field`='closedReason'; -UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='testsuiteAuth' ORDER BY id DESC LIMIT 1), `control`='radio' WHERE `module`='testsuite' AND `field`='type'; +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 `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'; +UPDATE `zt_workflowfield` SET `control` = 'select', `options` = '[1,2,3,4]' WHERE `module` = 'program' and `field` = 'pri'; +UPDATE `zt_workflowfield` SET `control` = 'richtext' WHERE `module` = 'program' and `field` = 'desc'; +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', `control`='radio' WHERE `module` = 'program' and `field` = 'acl'; +UPDATE `zt_workflowfield` SET `control`='radio' WHERE `module` = 'product' and `field` = 'acl'; +UPDATE `zt_workflowfield` SET `control` = 'multi-select', `options` = 'user' WHERE `module` = 'program' and `field` = 'whitelist'; +UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='projectModel' ORDER BY `id` DESC LIMIT 1) WHERE `module`='project' AND `field`='model'; +UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='feedbackType' ORDER BY `id` DESC LIMIT 1) WHERE `module`='feedback' AND `field`='type'; +UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='feedbackSolution' ORDER BY `id` DESC LIMIT 1) WHERE `module`='feedback' AND `field`='solution'; +UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='taskReason' ORDER BY `id` DESC LIMIT 1) WHERE `module`='task' AND `field`='closedReason'; +UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='storyClosedReason' ORDER BY `id` DESC LIMIT 1) WHERE `module`='story' AND `field`='closedReason'; +UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='programs' ORDER BY `id` DESC LIMIT 1), `control`='select' WHERE `module`='program' AND `field`='parent'; +UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='programs' ORDER BY `id` DESC LIMIT 1), `control`='select' WHERE `module`='project' AND `field`='parent'; +UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='projects' ORDER BY `id` DESC LIMIT 1), `control`='select' WHERE `module`='execution' AND `field`='parent'; +UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='feedbackclosedReason' ORDER BY `id` DESC LIMIT 1), `control`='select' WHERE `module`='feedback' AND `field`='closedReason'; +UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='testsuiteAuth' ORDER BY `id` DESC LIMIT 1), `control`='radio' WHERE `module`='testsuite' AND `field`='type'; + +UPDATE `zt_workflowaction` SET `show`='direct' WHERE `buildin`=1; +UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'product' and `action` = 'all' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `type` = 'batch', `position` = 'browse' WHERE `module` = 'product' and `action` = 'batchedit' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'product' and `action` = 'browse' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `show` = 'direct' WHERE `module` = 'product' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `type` = 'batch', `position` = 'browse' WHERE `module` = 'productplan' and `action` = 'batchedit' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'productplan' and `action` = 'browse' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `show` = 'direct' WHERE `module` = 'productplan' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'release' and `action` = 'browse' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `show` = 'direct' WHERE `module` = 'release' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `type` = 'batch', `position` = 'browseandview' WHERE `module` = 'story' and `action` = 'batchcreate' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `type` = 'batch' WHERE `module` = 'story' and `action` = 'batchedit' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'story' and `action` = 'browse' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'story' and `action` = 'exporttemplate' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'story' and `action` = 'import' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'story' and `action` = 'view' and `vision` = 'rnd'; +UPDATE `zt_workflowaction` SET `show` = 'direct' WHERE `module` = 'story' and `vision` = 'rnd' and action NOT IN ('exporttemplate', 'import'); +UPDATE `zt_workflowaction` SET `show` = 'direct' WHERE `module` = 'program' and `vision` = 'rnd'; UPDATE `zt_workflowaction` SET `type`='single', `position`='browseandview', `show`='direct', `open`='normal', `layout`='normal' WHERE `module`='project' AND `action`='browse'; UPDATE `zt_workflowaction` SET `type`='single', `position`='browse', `show`='direct', `open`='normal', `layout`='normal' WHERE `module`='project' AND `action`='create'; UPDATE `zt_workflowaction` SET `type`='batch', `position`='browse', `show`='direct', `open`='normal', `layout`='normal' WHERE `module`='project' AND `action`='batchedit'; @@ -377,7 +377,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`='browse', `show`='direct', `open`='normal', `layout`='normal' WHERE `module`='task' AND `action`='batchcreate'; +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`='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'; @@ -416,43 +416,9 @@ UPDATE `zt_workflowaction` SET `type`='single', `position`='browseandview', `sho UPDATE `zt_workflowaction` SET `type`='single', `position`='browseandview', `show`='direct', `open`='modal', `layout`='normal' WHERE `module`='bug' AND `action`='resolve'; UPDATE `zt_workflowaction` SET `type`='batch', `position`='browse', `show`='direct', `open`='none', `layout`='normal' WHERE `module`='bug' AND `action`='batchconfirm'; UPDATE `zt_workflowaction` SET `type`='batch', `position`='browse', `show`='direct', `open`='none', `layout`='normal' WHERE `module`='bug' AND `action`='batchresolve'; -UPDATE `zt_workflowaction` SET `type`='batch' WHERE `module`IN ('feedback','caselib','testsuite','testtask','testcase') AND `action` IN ('admin','browse','batchedit','batchcreate','import','showimport'); +UPDATE `zt_workflowaction` SET `type`='batch' WHERE `module`IN ('feedback','caselib','testsuite','testtask','testcase') AND `action` IN ('batchedit','batchcreate'); 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 `control` = 'radio', `type` = 'char', `length` = '30' 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'; -UPDATE `zt_workflowfield` SET `control` = 'select', `options` = '[1,2,3,4]' WHERE `module` = 'program' and `field` = 'pri'; -UPDATE `zt_workflowfield` SET `control` = 'richtext' WHERE `module` = 'program' and `field` = 'desc'; -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', `control`='radio' WHERE `module` = 'program' and `field` = 'acl'; -UPDATE `zt_workflowfield` SET `control`='radio' WHERE `module` = 'product' 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 -('program', 'lifetime', 'char', '30', '项目周期', 'input', '', '', '', '', '', 29, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'output', 'text', '', '输出', 'textarea', '', '', '', '', '', 30, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'auth', 'char', '30', '权限控制', 'input', '', '', '', '', '', 31, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'path', 'varchar', '255', '路径', 'input', '', '', '', '', '', 32, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'grade', 'tinyint', '3', '层级', 'integer', '', '', '', '', '', 33, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'realBegan', 'date', '', '实际开始日期', 'date', '', '', '', '', '', 34, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'realEnd', 'date', '', '实际完成日期', 'date', '', '', '', '', '', 35, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'version', 'smallint', '6', '版本', 'integer', '', '', '', '', '', 36, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'parentVersion', 'smallint', '6', '父版本', 'integer', '', '', '', '', '', 37, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'planDuration', 'smallint', '6', '计划周期天数', 'integer', '', '', '', '', '', 38, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'realDuration', 'smallint', '6', '实际周期天数', 'integer', '', '', '', '', '', 39, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'openedVersion', 'smallint', '6', '创建版本', 'integer', '', '', '', '', '', 40, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'lastEditedBy', 'varchar', '30', '最后编辑人', 'select', '', 'user', '', '', '', 41, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'lastEditedDate', 'datetime', '', '最后编辑日期', 'datetime', '', '', '', '', '', 42, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'suspendedDate', 'date', '', 'suspendedDate', 'date', '', '', '', '', '', 43, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'vision', 'varchar', '10', 'vision', 'input', '', '', 'rnd', '', '', 44, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'displayCards', 'enum', '', 'displayCards', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 45, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'), -('program', 'fluidBoard', 'enum', '', 'fluidBoard', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 46, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'); - UPDATE `zt_workflowaction` SET `position`='browse' WHERE `action` IN ('view','exporttemplate'); UPDATE `zt_workflowaction` SET `position`='browse' WHERE `action`='create' AND `module` IN ('testtask','feedback'); @@ -466,9 +432,10 @@ UPDATE `zt_workflowaction` SET `type` ='single' WHERE `action`='browse' AND mod UPDATE `zt_workflowaction` SET `method`='browse' WHERE module='product' and `action` = 'all'; UPDATE `zt_workflowaction` SET `type` ='single' WHERE `action`='browse' AND `type`='batch' AND `buildin`=1; -UPDATE `zt_workflowaction` SET `show`='direct' WHERE `buildin`=1; +UPDATE `zt_workflowlayout` SET `mobileShow`='0' WHERE `mobileShow`='1' AND `module` IN('product', 'story', 'productplan', 'release', 'project', 'task', 'build', 'bug', 'testcase', 'testtask', 'testsuite', 'caselib', 'feedback'); +UPDATE `zt_workflowfield` SET `canSearch` = '1' WHERE `buildin` = '1'; -UPDATE `zt_project` SET `status` = 'doing' WHERE `type` = 'program' and `status` = 'wait' and `realBegan` != '0000-00-00' and `realBegan` != ''; +UPDATE `zt_project` SET `status` = 'doing' WHERE `type` = 'program' and `status` = 'wait' and `realBegan` != '0000-00-00'; CREATE TABLE `zt_approval` ( `id` mediumint(8) NOT NULL AUTO_INCREMENT, diff --git a/db/update17.0.beta1.sql b/db/update17.0.beta1.sql new file mode 100644 index 0000000000..6ad66f1b12 --- /dev/null +++ b/db/update17.0.beta1.sql @@ -0,0 +1,7 @@ +ALTER TABLE `zt_task` ADD `fromIssue` mediumint(8) unsigned NOT NULL DEFAULT '0' AFTER `fromBug`; + +ALTER TABLE `zt_kanbanspace` ADD COLUMN `activatedBy` char(30) NOT NULL AFTER `closedDate`; +ALTER TABLE `zt_kanbanspace` ADD COLUMN `activatedDate` datetime NOT NULL AFTER `activatedBy`; + +ALTER TABLE `zt_kanban` ADD COLUMN `activatedBy` char(30) NOT NULL AFTER `closedDate`; +ALTER TABLE `zt_kanban` ADD COLUMN `activatedDate` datetime NOT NULL AFTER `activatedBy`; diff --git a/db/zentao.sql b/db/zentao.sql old mode 100644 new mode 100755 index 05fdae8af7..f0f9e8605d --- a/db/zentao.sql +++ b/db/zentao.sql @@ -760,6 +760,8 @@ CREATE TABLE `zt_kanbanspace` ( `lastEditedDate` datetime NOT NULL, `closedBy` char(30) NOT NULL, `closedDate` datetime NOT NULL, + `activatedBy` char(30) NOT NULL, + `activatedDate` datetime NOT NULL, `deleted` enum('0', '1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; @@ -786,6 +788,8 @@ CREATE TABLE `zt_kanban` ( `lastEditedDate` datetime NOT NULL, `closedBy` char(30) NOT NULL, `closedDate` datetime NOT NULL, + `activatedBy` char(30) NOT NULL, + `activatedDate` datetime NOT NULL, `deleted` enum('0', '1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; @@ -1457,6 +1461,7 @@ CREATE TABLE IF NOT EXISTS `zt_task` ( `storyVersion` smallint(6) NOT NULL default '1', `designVersion` smallint(6) unsigned NOT NULL, `fromBug` mediumint(8) unsigned NOT NULL default '0', + `fromIssue` mediumint(8) unsigned NOT NULL default '0', `name` varchar(255) NOT NULL, `type` varchar(20) NOT NULL, `pri` tinyint(3) unsigned NOT NULL default '0', diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 81cb0cb7c0..91a8c8f0c5 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -1,7 +1,49 @@ 2022-05-06 17.0.beta1 修复的bug - +11398 批量移除需求的权限无法单独设置 +17341 经典模式下研发需求分解任务时同上模块之后相关需求联动错误 +14677 产品汇总表不应该统计父需求 +16176 编辑用户密码小于系统设定也可以保存成功 +16424 项目权限控制选择重新定义不生效 +16648 项目列表中项目名称完全折叠隐藏 +17448 草稿状态需求先关闭再激活后无法进行后续操作 +17976 复制bug不能修改【所属项目】和【所属迭代】 +18756 专业研发看板中移除白名单用户后该用户还可以访问看板 +19745 需求接口参数修改 +19841 创建瀑布类型的项目,设置阶段时权限设置没有继承项目权限 +19860 富文本框里面 % 这个符号被过滤了 +20015 维护项目的基础信息字段团队成员会变化 +20043 父需求变更后无法进行评审 +20175 搜索框内输入多个id且结尾为英文逗号时有报错 +20385 提Bug弹窗切换产品或分支时点击创建版本弹窗有报错 +20591 联系人列表删除列表名称点击保存有报错 +20724 升级后执行关联需求报错 +20742 不填写用户名保存后再补充用户名登录用户没有权限 +21006 一个需求拆分为多个研发任务和测试任务且研发任务有执行开始状态后,需求状态被置为了已立项 完成的需求 +32522 回收站增加检索标签 +32387 旗舰版安装向导页面检测到数据库环境变量后跳过数据库配置页面 +32343 产品发布的日期不做限制 +31983 自定义任务必填项时增加所属模块选项 +31603 参与需求评审的每个人都可以在我的地盘待评审列表看到 +31577 专业研发看板中需求泳道需求的拖动规则 +31576 Scrum看板需求泳道的需求卡片可以进行拖动 +31551 更改燃尽图的更新逻辑 +31367 执行切换组件中瀑布项目的子阶段展现方式优化 +31365 执行切换组件中瀑布的阶段按正序排列,敏捷的执行按倒序排列 +30783 通用看板中导入的卡片可以执行更多操作 +30438 关闭执行前更新燃尽图数据 +30104 看板中的横向的滚动条采用执行看板中的全局滚动条 +29788 项目列表增加搜索功能 +29787 产品列表增加搜索功能 +29786 项目集列表增加搜索功能 +29577 产品列表增加分页功能 +29215 文档库的目录中文档和目录支持拖动排序功能 +28961 产品的发布列表增加分页功能 +28564 项目集列表页面增加分页功能 +28363 切换项目后的页面保持和切换前的页面一致 +27850 批量修改执行所属项目时提示用户该操作的影响 +15239 Bug搜索条件中增加按关联需求搜索字段 2022-03-24 16.5 修复的bug diff --git a/extension/lite/execution/ext/lang/en/lite.php b/extension/lite/execution/ext/lang/en/lite.php index 77fd87e1bf..5eba267b99 100644 --- a/extension/lite/execution/ext/lang/en/lite.php +++ b/extension/lite/execution/ext/lang/en/lite.php @@ -7,6 +7,7 @@ $lang->execution->createKanban = 'Create Kanban'; $lang->execution->noExecution = "No Executions."; $lang->execution->importTask = 'Import Tsak'; $lang->execution->batchCreateTask = 'Batch Create Task'; +$lang->execution->linkStory = "Create {$lang->SRCommon}"; $lang->execution->kanbanGroup['default'] = 'Default'; $lang->execution->kanbanGroup['story'] = 'Target'; @@ -24,4 +25,3 @@ $lang->execution->icons['grouptask'] = 'sitemap'; $lang->execution->aclList['private'] = "Private (Accessible to team members and project leaders)"; $lang->execution->common = 'Project Execution'; -$lang->execution->gantt = 'Gantt Chart'; \ No newline at end of file diff --git a/framework/base/router.class.php b/framework/base/router.class.php index ae8918d02f..3b63bf756a 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -617,6 +617,20 @@ class baseRouter */ public function setSuperVars() { + $URI = $_SERVER['REQUEST_URI']; + if(strpos($URI, '?') !== false) + { + $parsedURL = parse_url($URI); + if(isset($parsedURL['query'])) + { + parse_str($parsedURL['query'], $parsedQuery); + foreach($parsedQuery as $key => $value) + { + if(!isset($_GET[$key])) $_GET[$key] = $value; + } + } + } + $this->post = new super('post'); $this->get = new super('get'); $this->server = new super('server'); @@ -724,7 +738,7 @@ class baseRouter */ public function getInstalledVersion() { - $version = $this->dbh->query("SELECT value FROM " . TABLE_CONFIG . " WHERE owner = 'system' AND `key` = 'version' LIMIT 1")->fetch(); + $version = $this->dbh->query("SELECT value FROM " . TABLE_CONFIG . " WHERE `owner` = 'system' AND `key` = 'version' AND `module` = 'common' AND `section` = 'global' LIMIT 1")->fetch(); $version = $version ? $version->value : '0.3.beta'; // No version, set as 0.3.beta. if($version == '3.0.stable') $version = '3.0'; // convert 3.0.stable to 3.0. return $version; @@ -987,7 +1001,11 @@ class baseRouter $this->sessionID = isset($ztSessionHandler) ? $ztSessionHandler->getSessionID() : session_id(); - if(isset($_GET[$this->config->sessionVar])) helper::restartSession($_GET[$this->config->sessionVar]); + if(isset($_GET[$this->config->sessionVar])) + { + helper::restartSession($_GET[$this->config->sessionVar]); + $this->sessionID = isset($ztSessionHandler) ? $ztSessionHandler->getSessionID() : session_id(); + } define('SESSION_STARTED', true); } @@ -3153,9 +3171,7 @@ class ztSessionHandler ($this->tagID and file_exists($this->rawFile)) ? copy($this->rawFile, $sessFile) : touch($sessFile); } - $sessContent = (string) file_get_contents($sessFile); - if(!file_exists($this->rawFile) and strpos($sessContent, 'user|') !== false) copy($sessFile, $this->rawFile); - return $sessContent; + return (string) file_get_contents($sessFile); } /** @@ -3169,7 +3185,23 @@ class ztSessionHandler public function write($id, $sessData) { $sessFile = $this->getSessionFile($id); - if(file_put_contents($sessFile, $sessData)) return true; + if(file_put_contents($sessFile, $sessData)) + { + if(strpos($sessData, 'user|') !== false) + { + if(file_exists($this->rawFile)) + { + $rawSessContent = (string) file_get_contents($this->rawFile); + if(strpos($rawSessContent, 'user|') === false) copy($sessFile, $this->rawFile); + } + else + { + copy($sessFile, $this->rawFile); + } + } + + return true; + } return false; } diff --git a/framework/model.class.php b/framework/model.class.php index 71eddbd925..aa59671506 100644 --- a/framework/model.class.php +++ b/framework/model.class.php @@ -63,13 +63,16 @@ class model extends baseModel * @param string $type * @param string $icon * @param string $target - * @param string $misc + * @param string $class * @param bool $onlyBody + * @param string $misc + * @param string $title + * @param bool $returnHtml * @access public * @return string */ - public function buildMenu($moduleName, $methodName, $params, $data, $type = 'view', $icon = '', $target = '', $class = '', $onlyBody = false, $misc = '' , $title = '') + public function buildMenu($moduleName, $methodName, $params, $data, $type = 'view', $icon = '', $target = '', $class = '', $onlyBody = false, $misc = '' , $title = '', $returnHtml = true) { if(strpos($moduleName, '.') !== false) list($appName, $moduleName) = explode('.', $moduleName); @@ -115,6 +118,8 @@ class model extends baseModel if(method_exists($this, 'isClickable')) $enabled = $this->isClickable($data, $method, $module); } + if(!$returnHtml) return $enabled; + $html = ''; $type = $type == 'browse' ? 'list' : 'button'; $html = common::buildIconButton($module, $method, $params, $data, $type, $icon, $target, $class, $onlyBody, $misc, $title, '', $enabled); @@ -139,6 +144,7 @@ class model extends baseModel if(strpos($module, '.') !== false) list($appName, $moduleName) = explode('.', $module); static $actions; + static $relations; if(empty($actions)) { $actions = $this->dao->select('*')->from(TABLE_WORKFLOWACTION) @@ -149,6 +155,7 @@ class model extends baseModel ->orderBy('order_asc') ->fetchAll(); } + if(empty($relations)) $relations = $this->dao->select('next, actions')->from(TABLE_WORKFLOWRELATION)->where('prev')->eq($moduleName)->fetchPairs(); $menu = ''; if($show) @@ -157,7 +164,7 @@ class model extends baseModel { if(strpos($action->position, $type) === false || $action->show != $show) continue; - $menu .= $this->loadModel('flow')->buildActionMenu($moduleName, $action, $data, $type); + $menu .= $this->loadModel('flow')->buildActionMenu($moduleName, $action, $data, $type, $relations); } } else @@ -167,8 +174,8 @@ class model extends baseModel { if(strpos($action->position, $type) === false) continue; - if($type == 'view' || $action->show == 'direct') $menu .= $this->loadModel('flow')->buildActionMenu($moduleName, $action, $data, $type); - if($type == 'browse' && $action->show == 'dropdownlist') $dropdownMenu .= $this->loadModel('flow')->buildActionMenu($moduleName, $action, $data, $type); + if($type == 'view' || $action->show == 'direct') $menu .= $this->loadModel('flow')->buildActionMenu($moduleName, $action, $data, $type, $relations); + if($type == 'browse' && $action->show == 'dropdownlist') $dropdownMenu .= $this->loadModel('flow')->buildActionMenu($moduleName, $action, $data, $type, $relations); } if($type == 'browse' && $dropdownMenu) @@ -293,6 +300,6 @@ class model extends baseModel } $flow = $this->loadModel('workflow')->getByModule($moduleName); - if($flow && $action) $this->loadModel('workflowhook')->execute($flow, $action, $objectID); + if($flow && $action) return $this->loadModel('workflowhook')->execute($flow, $action, $objectID); } } diff --git a/lib/dao/dao.class.php b/lib/dao/dao.class.php index 6443a4d5f2..537484e1a5 100644 --- a/lib/dao/dao.class.php +++ b/lib/dao/dao.class.php @@ -181,54 +181,54 @@ class dao extends baseDAO } /** - * check workflow field rule. + * Check workFlow field rule. * * @access public * @return object the dao object self. */ - public function checkflow() + public function checkFlow() { - global $app, $config; + global $app, $config, $lang; if(!isset($config->bizVersion)) return $this; - $module = $app->getmodulename(); - $method = $app->getmethodname(); + $module = $app->getModuleName(); + $method = $app->getMethodName(); - $flowaction = $this->dbh->query("select * from " . TABLE_WORKFLOWACTION . " where `module` = '{$module}' and `action` = '{$method}' and `buildin` = '1' and `extensiontype` = 'extend'")->fetch(PDO::FETCH_OBJ); - if(!$flowaction) return $this; + $flowAction = $this->dbh->query("SELECT * FROM " . TABLE_WORKFLOWACTION . " WHERE `module` = '{$module}' AND `action` = '{$method}' AND `buildin` = '1' AND `extensionType` = 'extend'")->fetch(PDO::FETCH_OBJ); + if(!$flowAction) return $this; - $flowfields = $this->dbh->query("select t2.name,t2.rules,t2.control,t2.field,t1.layoutrules from " . TABLE_WORKFLOWLAYOUT . " as t1 left join " . TABLE_WORKFLOWFIELD . " as t2 on t1.module = t2.module and t1.field = t2.field where t1.module = '{$module}' and t1.action = '{$method}' and t1.readonly = '0'")->fetchall(); - if(!$flowfields) return $this; + $flowFields = $this->dbh->query("SELECT t2.name,t2.rules,t2.control,t2.field,t1.layoutRules FROM " . TABLE_WORKFLOWLAYOUT . " AS t1 LEFT JOIN " . TABLE_WORKFLOWFIELD . " AS t2 ON t1.module = t2.module AND t1.field = t2.field WHERE t1.module = '{$module}' AND t1.action = '{$method}' AND t1.readonly = '0'")->fetchAll(); + if(!$flowFields) return $this; $rules = array(); - $rawrules = $this->dbh->query("select * from " . TABLE_WORKFLOWRULE)->fetchall(); - foreach($rawrules as $rule) $rules[$rule->id] = $rule; + $rawRules = $this->dbh->query("SELECT * FROM " . TABLE_WORKFLOWRULE)->fetchAll(); + foreach($rawRules as $rule) $rules[$rule->id] = $rule; - foreach($flowfields as $key => $field) + foreach($flowFields as $key => $field) { if(!$field) { - unset($flowfields[$key]); + unset($flowFields[$key]); continue; } - $ruleids = explode(',', trim($field->rules, ',') . ',' . trim($field->layoutrules, ',')); - $ruleids = array_unique($ruleids); + $ruleIDs = explode(',', trim($field->rules, ',') . ',' . trim($field->layoutRules, ',')); + $ruleIDs = array_unique($ruleIDs); - $fieldrules = array(); - foreach($ruleids as $ruleid) + $fieldRules = array(); + foreach($ruleIDs as $ruleID) { - if(!$ruleid || !isset($rules[$ruleid])) continue; + if(!$ruleID || !isset($rules[$ruleID])) continue; - $fieldrules[] = $rules[$ruleid]; + $fieldRules[] = $rules[$ruleID]; } - $field->ruledata = $fieldrules; - $field->rules = join(',', $ruleids); + $field->ruleData = $fieldRules; + $field->rules = join(',', $ruleIDs); } - return $this->checkextend($flowfields); + return $this->checkExtend($flowFields); } /** @@ -239,24 +239,24 @@ class dao extends baseDAO * @access public * @return object the dao object self */ - public function checkextend($fields) + public function checkExtend($fields) { global $lang; if(!$fields) return $this; foreach($fields as $field) { - /* if the field don't have rule, don't check it. */ + /* If the field don't have rule, don't check it. */ if(empty($field->rules)) continue; if($field->control == 'file') { - foreach($field->ruledata as $rule) + foreach($field->ruleData as $rule) { if(empty($rule)) continue; if($rule->type != 'system' || $rule->rule != 'notempty') continue; - $files = !empty($_files[$field->field]) ? $_files[$field->field] : ''; + $files = !empty($_FILES[$field->field]) ? $_FILES[$field->field] : ''; if(empty($files)) dao::$errors[$field->field][] = sprintf($lang->error->notempty, $field->name); break; } @@ -265,8 +265,8 @@ class dao extends baseDAO if(!isset($this->sqlobj->data->{$field->field})) $this->sqlobj->data->{$field->field} = false; - /* check rules of fields. */ - foreach($field->ruledata as $rule) + /* Check rules of fields. */ + foreach($field->ruleData as $rule) { if(empty($rule)) continue; diff --git a/module/bug/control.php b/module/bug/control.php index b44c94a57b..bbaa636ad9 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -397,7 +397,8 @@ class bug extends control $this->action->create('todo', $output['todoID'], 'finished', '', "BUG:$bugID"); } - $this->executeHooks($bugID); + $message = $this->executeHooks($bugID); + if($message) $this->lang->saveSuccess = $message; /* Return bug id when call the API. */ if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $bugID)); diff --git a/module/bug/lang/en.php b/module/bug/lang/en.php index 392c7ec082..7647b31a3b 100644 --- a/module/bug/lang/en.php +++ b/module/bug/lang/en.php @@ -34,9 +34,12 @@ $lang->bug->browser = 'Browser'; $lang->bug->hardware = 'Hardware'; $lang->bug->result = 'Result'; $lang->bug->repo = 'Repo'; +$lang->bug->mr = 'Merge Request'; +$lang->bug->entry = 'Code Path'; $lang->bug->lines = 'Lines'; $lang->bug->v1 = 'Version A'; $lang->bug->v2 = 'Version B'; +$lang->bug->issueKey = 'Sonarqube Issue Key'; $lang->bug->repoType = 'Repo Type'; $lang->bug->steps = 'Repro Steps'; $lang->bug->status = 'Status'; diff --git a/module/bug/lang/zh-cn.php b/module/bug/lang/zh-cn.php index 25d19e7ed1..279caed209 100644 --- a/module/bug/lang/zh-cn.php +++ b/module/bug/lang/zh-cn.php @@ -34,9 +34,12 @@ $lang->bug->browser = '浏览器'; $lang->bug->hardware = '硬件'; $lang->bug->result = '结果'; $lang->bug->repo = '所属版本库'; +$lang->bug->mr = '合并请求'; +$lang->bug->entry = '代码路径'; $lang->bug->lines = '代码行'; $lang->bug->v1 = '版本1'; $lang->bug->v2 = '版本2'; +$lang->bug->issueKey = 'Sonarqube问题键值'; $lang->bug->repoType = '版本库类型'; $lang->bug->steps = '重现步骤'; $lang->bug->status = 'Bug状态'; diff --git a/module/bug/model.php b/module/bug/model.php index a98a034349..ee586c068b 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -2792,6 +2792,7 @@ class bugModel extends model ->orWhere('t2.spec')->like("%$searchValue%") ->orWhere('t2.verify')->like("%$searchValue%") ->fetchPairs('id'); + if(empty($story)) $story = array(0); $bugQuery = preg_replace("/`story`[ ]+(NOT[ ]*)?LIKE[ ]+'%$searchValue%'/Ui", '`story` $1 IN (' . implode(',', $story) .')', $bugQuery); } diff --git a/module/bug/view/batchcreate.html.php b/module/bug/view/batchcreate.html.php index f0f4267291..dd09aa4bb5 100755 --- a/module/bug/view/batchcreate.html.php +++ b/module/bug/view/batchcreate.html.php @@ -131,12 +131,7 @@ '> loadModel('flow'); - foreach($extendFields as $extendField) - { - $object = new stdclass(); - $object->{$extendField->field} = $extendField->default; - echo "control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, $object, $extendField->field . "[$i]") . ""; - } + foreach($extendFields as $extendField) echo "control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[$i]") . ""; ?> @@ -186,12 +181,7 @@ '> loadModel('flow'); - foreach($extendFields as $extendField) - { - $object = new stdclass(); - $object->{$extendField->field} = $extendField->default; - echo "control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, $object, $extendField->field . "[$i]") . ""; - } + foreach($extendFields as $extendField) echo "control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[$i]") . ""; ?> @@ -240,12 +230,7 @@ '> loadModel('flow'); - foreach($extendFields as $extendField) - { - $object = new stdclass(); - $object->{$extendField->field} = $extendField->default; - echo "control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, $object, $extendField->field . "[%s]") . ""; - } + foreach($extendFields as $extendField) echo "control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[%s]") . ""; ?> diff --git a/module/build/control.php b/module/build/control.php index b918fdf58e..1105dc34a3 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -38,7 +38,8 @@ class build extends control if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); $this->loadModel('action')->create('build', $buildID, 'opened'); - $this->executeHooks($buildID); + $message = $this->executeHooks($buildID); + if($message) $this->lang->saveSuccess = $message; if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $buildID)); if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => "parent.loadExecutionBuilds($executionID, $buildID)")); // Code for task #5126. @@ -130,7 +131,8 @@ class build extends control if(!empty($changes)) $this->action->logHistory($actionID, $changes); } - $this->executeHooks($buildID); + $message = $this->executeHooks($buildID); + if($message) $this->lang->saveSuccess = $message; return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('view', "buildID=$buildID"))); } @@ -316,7 +318,8 @@ class build extends control $build = $this->build->getById($buildID); $this->build->delete(TABLE_BUILD, $buildID); - $this->executeHooks($buildID); + $message = $this->executeHooks($buildID); + if($message) $response['message'] = $message; /* if ajax request, send result. */ if($this->server->ajax) diff --git a/module/build/model.php b/module/build/model.php index 2f10fc4067..3283ec5786 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -526,20 +526,47 @@ class buildModel extends model * * @param object $build * @param string $type + * @param string $extra * @access public * @return string */ - public function buildOperateMenu($build, $type = 'view') + public function buildOperateMenu($build, $type = 'view', $extra = '') { - $canBeChanged = common::canBeChanged('build', $build); - if($build->deleted || !$canBeChanged) return ''; + $extraParams = array(); + if($extra) parse_str($extra, $extraParams); $menu = ''; $params = "buildID=$build->id"; - $menu .= $this->buildFlowMenu('build', $build, 'view', 'direct'); - $menu .= $this->buildMenu('build', 'edit', $params, $build, $type); - $menu .= $this->buildMenu('build', 'delete', $params, $build, $type, 'trash', 'hiddenwin'); + global $app; + $tab = $app->tab; + + if($type == 'browse') + { + $executionID = $tab == 'execution' ? $extraParams['executionID'] : $build->execution; + + if(common::hasPriv('build', 'linkstory') and common::canBeChanged('build', $build)) $menu .= $this->buildMenu('build', 'view', "{$params}&type=story&link=true", $build, $type, 'link', '', '', '', "data-app={$tab}", $this->lang->build->linkStory); + + $menu .= $this->buildMenu('testtask', 'create', "product=$build->product&execution={$executionID}&build=$build->id", $build, $type, 'bullhorn', '', '', '', "data-app='{$tab}'"); + + if($tab == 'execution') $menu .= $this->buildMenu('execution', 'bug', "execution={$extraParams['executionID']}&productID={$extraParams['productID']}&orderBy=status&build=$build->id", $build, $type, '', '', '', '', $this->lang->execution->viewBug); + if($tab == 'project') $menu .= $this->buildMenu('build', 'view', "{$params}&type=generatedBug", $build, $type, 'bug', '', '', '', "data-app='project'", $this->lang->project->bug); + + $menu .= $this->buildMenu('build', 'edit', $params, $build, $type); + $menu .= $this->buildMenu('build', 'delete', $params, $build, $type, 'trash', 'hiddenwin'); + } + else + { + $canBeChanged = common::canBeChanged('build', $build); + if($build->deleted || !$canBeChanged) return ''; + + $menu .= $this->buildFlowMenu('build', $build, 'view', 'direct'); + + $editClickable = $this->buildMenu('build', 'edit', $params, $build, $type, '', '', '', '', '', '', false); + $deleteClickable = $this->buildMenu('build', 'delete', $params, $build, $type, '', '', '', '', '', '', false); + if(common::hasPriv('build', 'edit') and $editClickable) $menu .= html::a(helper::createLink('build', 'edit', $params), " " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->build->edit}' data-app='{$app->tab}'"); + if(common::hasPriv('build', 'delete') and $deleteClickable) $menu .= html::a(helper::createLink('build', 'delete', $params), " " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->build->delete}' target='hiddenwin' data-app='{$app->tab}'"); + } return $menu; } diff --git a/module/caselib/control.php b/module/caselib/control.php index c6766c3411..8d31fe904e 100644 --- a/module/caselib/control.php +++ b/module/caselib/control.php @@ -92,7 +92,8 @@ class caselib extends control $this->action->logHistory($actionID, $changes); } - $this->executeHooks($libID); + $message = $this->executeHooks($libID); + if($message) $response['message'] = $message; $response['locate'] = inlink('view', "libID=$libID"); return $this->send($response); @@ -130,7 +131,8 @@ class caselib extends control { $this->caselib->delete($libID); - $this->executeHooks($libID); + $message = $this->executeHooks($libID); + if($message) $response['message'] = $message; /* if ajax request, send result. */ if($this->server->ajax) diff --git a/module/caselib/model.php b/module/caselib/model.php index 9e19a18c39..c087eb1974 100644 --- a/module/caselib/model.php +++ b/module/caselib/model.php @@ -647,10 +647,13 @@ class caselibModel extends model $menu .= $this->buildMenu('testcase', 'review', $params, $case, 'browse', 'glasses', '', 'iframe'); } $menu .= $this->buildMenu('testcase', 'edit', $params, $case, 'browse'); + $clickable = $this->buildMenu('testcase', 'delete', $params, $case, 'browse', '', '', '', '', '', '', false); if(common::hasPriv('testcase', 'delete')) { $deleteURL = helper::createLink('testcase', 'delete', "$params&confirm=yes"); - $menu .= html::a("javascript:ajaxDelete(\"$deleteURL\", \"caseList\", confirmDelete)", '', '', "title='{$this->lang->testcase->delete}' class='btn'"); + $class = 'btn'; + if(!$clickable) $class .= ' disabled'; + $menu .= html::a("javascript:ajaxDelete(\"$deleteURL\", \"caseList\", confirmDelete)", '', '', "title='{$this->lang->testcase->delete}' class='{$class}'"); } return $menu; diff --git a/module/common/model.php b/module/common/model.php index 97f1010422..27e2443cc6 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -918,6 +918,9 @@ class commonModel extends model public static function getMainNavList($moduleName) { global $lang; + global $app; + + $app->loadLang('my'); $menuOrder = $lang->mainNav->menuOrder; ksort($menuOrder); @@ -963,8 +966,24 @@ class commonModel extends model } } + /* Check whether other preference item under the module have permissions. If yes, point to other methods. */ + $moduleLinkList = $currentModule . 'LinkList'; + if(!$display and isset($lang->my->$moduleLinkList)) + { + foreach($lang->my->$moduleLinkList as $key => $linkList) + { + $method = explode('-', $key)[1]; + if(common::hasPriv($currentModule, $method)) + { + $display = true; + $currentMethod = $method; + break; + } + } + } + /* Check whether other methods under the module have permissions. If yes, point to other methods. */ - if($display == false and isset($lang->$currentModule->menu)) + if($display == false and isset($lang->$currentModule->menu) and !in_array($currentModule, array('program', 'product', 'project', 'execution'))) { foreach($lang->$currentModule->menu as $menu) { @@ -1529,7 +1548,7 @@ class commonModel extends model '; } diff --git a/module/execution/config.php b/module/execution/config.php index a0d653269c..fb00ff4e8f 100644 --- a/module/execution/config.php +++ b/module/execution/config.php @@ -7,7 +7,7 @@ $config->execution->weekend = '2'; $config->execution->ownerFields = array('PO', 'PM', 'QD', 'RD'); $config->execution->list = new stdclass(); -$config->execution->list->exportFields = 'id,name,projectName,code,PM,end,status,totalEstimate,totalConsumed,totalLeft,progress'; +$config->execution->list->exportFields = 'id,name,projectName,code,PM,begin,end,status,totalEstimate,totalConsumed,totalLeft,progress'; $config->execution->modelList['scrum'] = 'sprint'; $config->execution->modelList['waterfall'] = 'stage'; diff --git a/module/execution/control.php b/module/execution/control.php index 89b484c60e..629c8af8f0 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -679,7 +679,7 @@ class execution extends control * @access public * @return void */ - public function story($executionID = 0, $orderBy = 'order_asc', $type = 'all', $param = 0, $recTotal = 0, $recPerPage = 50, $pageID = 1) + public function story($executionID = 0, $orderBy = 'order_desc', $type = 'all', $param = 0, $recTotal = 0, $recPerPage = 50, $pageID = 1) { /* Load these models. */ $this->loadModel('story'); @@ -1419,7 +1419,8 @@ class execution extends control $this->loadModel('action')->create($this->objectType, $executionID, 'opened', '', join(',', $_POST['products'])); - $this->executeHooks($executionID); + $message = $this->executeHooks($executionID); + if($message) $this->lang->saveSuccess = $message; if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $executionID)); @@ -1593,7 +1594,9 @@ class execution extends control $this->productplan->linkProject($projectID, $newPlans); } - $this->executeHooks($executionID); + $message = $this->executeHooks($executionID); + if($message) $this->lang->saveSuccess = $message; + if($_POST['status'] == 'doing') $this->loadModel('common')->syncPPEStatus($executionID); if($execution->type == 'kanban') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent')); return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('view', "executionID=$executionID"))); @@ -2593,7 +2596,8 @@ class execution extends control $this->execution->updateUserView($executionID); $this->session->set('execution', ''); - $this->executeHooks($executionID); + $message = $this->executeHooks($executionID); + if($message) $this->lang->saveSuccess = $message; if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess)); return print(js::reload('parent')); @@ -3291,6 +3295,7 @@ class execution extends control $orderBy = $this->post->orderBy; $order = $this->dao->select('*')->from(TABLE_PROJECTSTORY)->where('story')->in($idList)->andWhere('project')->eq($executionID)->orderBy('order_asc')->fetch('order'); + if(strpos($orderBy, 'order_desc') !== false) $idList = array_reverse($idList); foreach($idList as $storyID) { $this->dao->update(TABLE_PROJECTSTORY)->set('`order`')->eq($order)->where('story')->eq($storyID)->andWhere('project')->eq($executionID)->exec(); diff --git a/module/execution/css/create.css b/module/execution/css/create.css index d482356317..f3544e54ed 100644 --- a/module/execution/css/create.css +++ b/module/execution/css/create.css @@ -1,4 +1,5 @@ -#tipsModal {margin-top: 10%;} +[lang^='en'] #tipsModal {margin-top: 10%; max-width: 620px;} +[lang^='zh-cn'] #tipsModal {margin-top: 10%; max-width: 530px;} .chosen-container-single .chosen-single > span {max-width: 100%;} #copyProjectModal {padding: 0;} diff --git a/module/execution/js/common.js b/module/execution/js/common.js index 52736ceca1..250b57fc8b 100644 --- a/module/execution/js/common.js +++ b/module/execution/js/common.js @@ -184,7 +184,7 @@ function loadPlans(product, branchID) var branchID = typeof(branchID) == 'undefined' ? 0 : branchID; var index = $(product).attr('id').replace('products', ''); - $.get(createLink('product', 'ajaxGetPlans', "productID=" + productID + '&branch=0,' + branchID + '&planID=0&fieldID&needCreate=&expired=noclosed|' + (config.currentMethod == 'create' ? 'unexpired' : '') + '¶m=skipParent'), function(data) + $.get(createLink('product', 'ajaxGetPlans', "productID=" + productID + '&branch=0,' + branchID + '&planID=0&fieldID&needCreate=&expired=noclosed,' + (config.currentMethod == 'create' ? 'unexpired' : '') + '¶m=skipParent'), function(data) { if(data) { diff --git a/module/execution/js/kanban.js b/module/execution/js/kanban.js index ccf3d875bb..9d26eab02d 100644 --- a/module/execution/js/kanban.js +++ b/module/execution/js/kanban.js @@ -233,15 +233,14 @@ $('.c-group').change(function() */ function createLaneMenu(options) { - var lane = options.$trigger.closest('.kanban-lane').data('lane'); - var laneCount = options.$trigger.closest('.kanban-board').children('.kanban-lane').length; + var lane = options.$trigger.closest('.kanban-lane').data('lane'); var privs = lane.actions; if(!privs.length) return []; var items = []; if(privs.includes('setLane')) items.push({label: kanbanLang.setLane, icon: 'edit', url: createLink('kanban', 'setLane', 'laneID=' + lane.id + '&executionID=0&from=kanban'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '635px'}}); - if(privs.includes('deleteLane') && laneCount > 1) items.push({label: kanbanLang.deleteLane, icon: 'trash', url: createLink('kanban', 'deleteLane', 'lane=' + lane.id), attrs: {'target': 'hiddenwin'}}); + if(privs.includes('deleteLane')) items.push({label: kanbanLang.deleteLane, icon: 'trash', url: createLink('kanban', 'deleteLane', 'lane=' + lane.id), attrs: {'target': 'hiddenwin'}}); var bounds = options.$trigger[0].getBoundingClientRect(); items.$options = {x: bounds.right, y: bounds.top}; diff --git a/module/execution/js/story.js b/module/execution/js/story.js index 85903c09fb..d7d80f5096 100644 --- a/module/execution/js/story.js +++ b/module/execution/js/story.js @@ -9,7 +9,7 @@ $(function() var $target = $(data.element[0]); $target.hide(); $target.fadeIn(1000); - order = 'order_asc' + order = 'order_desc' history.pushState({}, 0, createLink('execution', 'story', "executionID=" + executionID + '&orderBy=' + order)); }); }); diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index 8bd05725fe..f9bb7c45d1 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -17,9 +17,29 @@ $lang->execution->type = $lang->executionCommon . 'Type'; $lang->execution->name = "{$lang->executionCommon} Name"; $lang->execution->code = "{$lang->executionCommon} Code"; $lang->execution->projectName = 'Project'; +$lang->execution->project = 'Project'; $lang->execution->execName = "{$lang->execution->common} Name"; $lang->execution->execCode = "{$lang->execution->common} Code"; $lang->execution->execType = 'Execution Type'; +$lang->execution->lifetime = 'Project Cycle'; +$lang->execution->attribute = 'Stage Type'; +$lang->execution->percent = 'Workload %'; +$lang->execution->milestone = 'Milestone'; +$lang->execution->parent = 'Project'; +$lang->execution->path = 'Path'; +$lang->execution->grade = 'Grade'; +$lang->execution->output = 'Output'; +$lang->execution->version = 'Version'; +$lang->execution->parentVersion = 'Parent Version'; +$lang->execution->planDuration = 'Plan Duration'; +$lang->execution->realDuration = 'Real Duration'; +$lang->execution->openedVersion = 'Opened Version'; +$lang->execution->lastEditedBy = 'Last EditedBy'; +$lang->execution->lastEditedDate = 'Last EditedDate'; +$lang->execution->suspendedDate = 'Suspended Date'; +$lang->execution->vision = 'Vision'; +$lang->execution->displayCards = 'Max cards per column'; +$lang->execution->fluidBoard = 'Column Width'; $lang->execution->stage = 'Stage'; $lang->execution->pri = 'Priority'; $lang->execution->openedBy = 'OpenedBy'; @@ -55,6 +75,7 @@ $lang->execution->QD = 'Test Manager'; $lang->execution->RD = 'Release Manager'; $lang->execution->release = 'Release'; $lang->execution->acl = 'Access Control'; +$lang->execution->auth = 'Privileges'; $lang->execution->teamname = 'Team Name'; $lang->execution->updateOrder = 'Rank'; $lang->execution->order = "Rank {$lang->executionCommon}"; diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index ca0c943c14..5d248f81f0 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -17,9 +17,29 @@ $lang->execution->type = $lang->executionCommon . '类型'; $lang->execution->name = $lang->executionCommon . '名称'; $lang->execution->code = $lang->executionCommon . '代号'; $lang->execution->projectName = '所属项目'; +$lang->execution->project = '所属项目'; $lang->execution->execName = "{$lang->execution->common}名称"; $lang->execution->execCode = "{$lang->execution->common}代号"; $lang->execution->execType = "{$lang->execution->common}类型"; +$lang->execution->lifetime = '项目周期'; +$lang->execution->attribute = '阶段类型'; +$lang->execution->percent = '工作量占比'; +$lang->execution->milestone = '里程碑'; +$lang->execution->parent = '所属项目'; +$lang->execution->path = '路径'; +$lang->execution->grade = '层级'; +$lang->execution->output = '输出'; +$lang->execution->version = '版本'; +$lang->execution->parentVersion = '父版本'; +$lang->execution->planDuration = '计划周期天数'; +$lang->execution->realDuration = '实际周期天数'; +$lang->execution->openedVersion = '创建版本'; +$lang->execution->lastEditedBy = '最后编辑人'; +$lang->execution->lastEditedDate = '最后编辑日期'; +$lang->execution->suspendedDate = '暂停日期'; +$lang->execution->vision = '界面'; +$lang->execution->displayCards = '每列最大卡片数'; +$lang->execution->fluidBoard = '列宽度'; $lang->execution->stage = '阶段'; $lang->execution->pri = '优先级'; $lang->execution->openedBy = '由谁创建'; @@ -55,6 +75,7 @@ $lang->execution->QD = '测试负责人'; $lang->execution->RD = '发布负责人'; $lang->execution->release = '发布'; $lang->execution->acl = '访问控制'; +$lang->execution->auth = '权限控制'; $lang->execution->teamname = '团队名称'; $lang->execution->updateOrder = '排序'; $lang->execution->order = $lang->executionCommon . '排序'; diff --git a/module/execution/model.php b/module/execution/model.php index 108f02118b..38257a2002 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -369,12 +369,12 @@ class executionModel extends model $this->lang->project->code = $this->lang->execution->execCode; } - $sprintProject = isset($sprint->project) ? $sprint->project : ''; + $sprintProject = isset($sprint->project) ? $sprint->project : '0'; $this->dao->insert(TABLE_EXECUTION)->data($sprint) ->autoCheck($skipFields = 'begin,end') ->batchcheck($this->config->execution->create->requiredFields, 'notempty') ->checkIF((!empty($sprint->name) and $this->config->systemMode == 'new'), 'name', 'unique', "`type` in ('sprint','stage', 'kanban') and `project` = $sprintProject") - ->checkIF(!empty($sprint->code), 'code', 'unique', "`type` in ('sprint','stage')") + ->checkIF(!empty($sprint->code), 'code', 'unique', "`type` in ('sprint','stage', 'kanban')") ->checkIF($sprint->begin != '', 'begin', 'date') ->checkIF($sprint->end != '', 'end', 'date') ->checkIF($sprint->end != '', 'end', 'ge', $sprint->begin) @@ -511,18 +511,17 @@ class executionModel extends model } /* Update data. */ - $executionProject = isset($execution->project) ? $execution->project : ''; + $executionProject = isset($execution->project) ? $execution->project : '0'; $this->dao->update(TABLE_EXECUTION)->data($execution) ->autoCheck($skipFields = 'begin,end') ->batchcheck($this->config->execution->edit->requiredFields, 'notempty') ->checkIF($execution->begin != '', 'begin', 'date') ->checkIF($execution->end != '', 'end', 'date') ->checkIF($execution->end != '', 'end', 'ge', $execution->begin) - ->checkIF((!empty($execution->name) and $this->config->systemMode == 'new'), 'name', 'unique', "id != $executionID and type in ('sprint','stage') and `project` = $executionProject") - ->checkIF(!empty($execution->code), 'code', 'unique', "id != $executionID and type in ('sprint','stage')") + ->checkIF((!empty($execution->name) and $this->config->systemMode == 'new'), 'name', 'unique', "id != $executionID and type in ('sprint','stage', 'kanban') and `project` = $executionProject") + ->checkIF(!empty($execution->code), 'code', 'unique', "id != $executionID and type in ('sprint','stage', 'kanban')") ->checkFlow() ->where('id')->eq($executionID) - ->checkFlow() ->limit(1) ->exec(); @@ -961,6 +960,16 @@ class executionModel extends model } } + /* Update the status of the parent stage. */ + if($oldExecution->type == 'stage') + { + $parent = $this->getByID($oldExecution->parent); + if($parent->type == 'stage' and $parent->status == 'closed') + { + $this->dao->update(TABLE_EXECUTION)->set('status')->eq('doing')->where('id')->eq($parent->id)->exec(); + } + } + if(!dao::isError()) return common::createChanges($oldExecution, $execution); } @@ -1002,6 +1011,23 @@ class executionModel extends model if(!dao::isError()) { + /* Update the status of the parent stage. */ + if($oldExecution->type == 'stage') + { + $parent = $this->getByID($oldExecution->parent); + if($parent->type == 'stage') + { + $isClosed = true; + $children = $this->getChildExecutions($oldExecution->parent); + foreach($children as $childID => $childExecution) + { + if($childExecution->status != 'closed') $isClosed = false; + } + + if($isClosed) $this->dao->update(TABLE_EXECUTION)->set('status')->eq('closed')->where('id')->eq($parent->id)->exec(); + } + } + $this->loadModel('score')->create('execution', 'close', $oldExecution); return common::createChanges($oldExecution, $execution); } @@ -1575,7 +1601,7 @@ class executionModel extends model */ public function getChildExecutions($executionID) { - return $this->dao->select('id, name')->from(TABLE_EXECUTION)->where('parent')->eq((int)$executionID)->fetchPairs(); + return $this->dao->select('id, name, status')->from(TABLE_EXECUTION)->where('deleted')->eq(0)->andWhere('parent')->eq((int)$executionID)->fetchAll('id'); } /** diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php index 102388d861..c3f27fc413 100644 --- a/module/execution/view/all.html.php +++ b/module/execution/view/all.html.php @@ -185,12 +185,21 @@ echo common::hasPriv('programplan', 'create') ? html::a('javascript:alert("' . $this->lang->programplan->error->createdTask . '");', '', '', 'class="btn ' . $disabled . '"') : ''; } - common::printIcon('programplan', 'edit', "planID=$execution->id&projectID=$projectID", $execution, 'list', '', '', 'iframe', true); + common::printIcon('programplan', 'edit', "stageID=$execution->id&projectID=$projectID", $execution, 'list', '', '', 'iframe', true); $disabled = !empty($execution->children) ? ' disabled' : ''; + if($execution->status != 'closed' and common::hasPriv('execution', 'close', $execution)) + { + common::printIcon('execution', 'close', "stageID=$execution->id", $execution, 'list', 'off', 'hiddenwin' , $disabled . ' iframe', true, '', $this->lang->programplan->close); + } + elseif($execution->status == 'closed' and common::hasPriv('execution', 'activate', $execution)) + { + common::printIcon('execution', 'activate', "stageID=$execution->id", $execution, 'list', 'magic', 'hiddenwin' , $disabled . ' iframe', true, '', $this->lang->programplan->activate); + } + if(common::hasPriv('execution', 'delete', $execution)) { - common::printIcon('execution', 'delete', "planID=$execution->id&confirm=no", $execution, 'list', 'trash', 'hiddenwin' , $disabled, '', '', $this->lang->programplan->delete); + common::printIcon('execution', 'delete', "stageID=$execution->id&confirm=no", $execution, 'list', 'trash', 'hiddenwin' , $disabled, '', '', $this->lang->programplan->delete); } ?> @@ -257,7 +266,7 @@ if($child->grade == 1 && $this->loadModel('programplan')->isCreateTask($child->id)) { - common::printIcon('programplan', 'create', "program={$child->parent}&productID=$productID&planID=$child->id", $child, 'list', 'split', '', '', '', '', $this->lang->programplan->createSubPlan); + common::printIcon('programplan', 'create', "program={$child->parent}&productID=$productID&stageID=$child->id", $child, 'list', 'split', '', '', '', '', $this->lang->programplan->createSubPlan); } else { @@ -265,12 +274,21 @@ echo html::a('javascript:alert("' . $this->lang->programplan->error->createdTask . '");', '', '', 'class="btn ' . $disabled . '"'); } - common::printIcon('programplan', 'edit', "planID=$child->id&projectID=$projectID", $child, 'list', '', '', 'iframe', true); + common::printIcon('programplan', 'edit', "stageID=$child->id&projectID=$projectID", $child, 'list', '', '', 'iframe', true); $disabled = !empty($child->children) ? ' disabled' : ''; + if(common::hasPriv('execution', 'close', $child) and $execution->status != 'closed') + { + common::printIcon('execution', 'close', "stageID=$child->id", $child, 'list', 'off', '' , $disabled . ' iframe', true, '', $this->lang->programplan->close); + } + elseif(common::hasPriv('execution', 'activate', $child) and $execution->status == 'closed') + { + common::printIcon('execution', 'activate', "stageID=$child->id", $child, 'list', 'magic', 'hiddenwin' , $disabled . ' iframe', true, '', $this->lang->programplan->activate); + } + if(common::hasPriv('execution', 'delete', $child)) { - common::printIcon('execution', 'delete', "planID=$child->id&confirm=no", $child, 'list', 'trash', 'hiddenwin' , $disabled, '', '', $this->lang->programplan->delete); + common::printIcon('execution', 'delete', "stageID=$child->id&confirm=no", $child, 'list', 'trash', 'hiddenwin' , $disabled, '', '', $this->lang->programplan->delete); } ?> diff --git a/module/execution/view/build.html.php b/module/execution/view/build.html.php index 8f39edef65..b74accd8c1 100644 --- a/module/execution/view/build.html.php +++ b/module/execution/view/build.html.php @@ -72,19 +72,7 @@ filePath, 'http') === 0 ? html::a($build->filePath) : $build->filePath;?> date?> builder);?> - - createLink('build', 'view', "buildID=$build->id&type=story&link=true"), "", '', "class='btn' title='{$lang->build->linkStory}'"); - } - common::printIcon('testtask', 'create', "product=$build->product&execution=$execution->id&build=$build->id", $build, 'list', 'bullhorn'); - $lang->execution->bug = $lang->execution->viewBug; - common::printIcon('execution', 'bug', "execution=$execution->id&productID=$productID&orderBy=status&build=$build->id", $build, 'list'); - common::printIcon('build', 'edit', "buildID=$build->id", $build, 'list'); - common::printIcon('build', 'delete', "buildID=$build->id", $build, 'list', 'trash', 'hiddenwin'); - ?> - + build->buildOperateMenu($build, 'browse', "executionID={$execution->id}&productID={$productID}");?> diff --git a/module/execution/view/create.html.php b/module/execution/view/create.html.php index 92bcc82447..8f162c33b6 100644 --- a/module/execution/view/create.html.php +++ b/module/execution/view/create.html.php @@ -15,7 +15,7 @@ createLink('execution', 'task', "execution=$executionID");?> -