Merge branch 'zentaopms_289' of https://gitlab.zcorp.cc/easycorp/zentaopms into zentaopms_289_langItem
This commit is contained in:
+3
-1
@@ -1,3 +1,5 @@
|
||||
ALTER TABLE `zt_project` drop COLUMN `product`, drop COLUMN `statge`, drop COLUMN `storyConcept`;
|
||||
ALTER TABLE `zt_project` drop COLUMN `product`;
|
||||
ALTER TABLE `zt_project` drop COLUMN `statge`;
|
||||
ALTER TABLE `zt_project` drop COLUMN `storyConcept`;
|
||||
ALTER TABLE `zt_product` drop COLUMN `storyConcept`;
|
||||
UPDATE zt_todo SET assignedTo=account,assignedBy=account,assignedDate=`date` WHERE assignedTo='';
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -125,3 +125,90 @@ REPLACE INTO `zt_chart` (`id`, `name`, `dimension`, `type`, `group`, `dataset`,
|
||||
(1081,'年度新增-执行年度新增和完成趋势图',1,'line',0,'','','{\r\n \"xaxis\":[{\"field\":\"month\",\"name\":\"月份\",\"group\":\"value\"}],\r\n \"yaxis\":[{\"type\":\"value\",\"field\":\"newExecution\",\"agg\":\"value\",\"name\":\"新增执行数\",\"valOrAgg\":\"value\"},\r\n {\"type\":\"value\",\"field\":\"closedExecution\",\"agg\":\"value\",\"name\":\"完成执行数\",\"valOrAgg\":\"value\"}\r\n]}','',NULL,'SELECT t1.year, CONCAT(t1.month, \'月\') AS `month`, IFNULL(t2.execution, 0) AS newExecution, IFNULL(t3.execution, 0) AS closedExecution\r\nFROM (SELECT DISTINCT YEAR(date) AS `year`, MONTH(date) AS `month` FROM zt_action) AS t1\r\nLEFT JOIN (SELECT YEAR(openedDate) AS `year`, MONTH(openedDate) AS `month`, COUNT(1) AS execution FROM zt_project WHERE deleted = \'0\' AND type IN (\'sprint\', \'stage\', \'kanban\') AND multiple = \'1\' GROUP BY `year`, `month`) AS t2 ON t1.year = t2.year AND t1.month = t2.month\r\nLEFT JOIN (SELECT YEAR(closedDate) AS `year`, MONTH(closedDate) AS `month`, COUNT(1) AS execution FROM zt_project WHERE deleted = \'0\' AND type IN (\'sprint\', \'stage\', \'kanban\') AND status = \'closed\' AND multiple = \'1\' GROUP BY `year`, `month`) AS t3 ON t1.year = t3.year AND t1.month = t3.month\r\nORDER BY `year`, t1.month',1,'','','0000-00-00 00:00:00','','0000-00-00 00:00:00',0),
|
||||
(1082,'年度新增-产品发布次数年度趋势图',1,'line',0,'','','{\r\n \"xaxis\":[{\"field\":\"month\",\"name\":\"月份\",\"group\":\"value\"}],\r\n \"yaxis\":[{\"type\":\"value\",\"field\":\"release\",\"agg\":\"value\",\"name\":\"发布次数\",\"valOrAgg\":\"value\"}\r\n]}','',NULL,'SELECT t1.year, CONCAT(t1.month, \'月\') AS `month`, IFNULL(t2.release, 0) AS `release`\r\nFROM (SELECT DISTINCT Year(date) AS `year`, MONTH(date) AS `month` FROM zt_action) AS t1\r\nLEFT JOIN (SELECT YEAR(createdDate) AS `year`, MONTH(createdDate) AS `month`, COUNT(1) AS `release` FROM zt_release WHERE deleted = \'0\' GROUP BY `year`, `month`) AS t2 ON t1.year = t2.year AND t1.month = t2.month\r\nORDER BY `year`, t1.month',1,'','','0000-00-00 00:00:00','','0000-00-00 00:00:00',0),
|
||||
(1083,'年度新增-年度投入产出比',1,'line',0,'','','{\r\n \"xaxis\":[{\"field\":\"month\",\"name\":\"月份\",\"group\":\"value\"}],\r\n \"yaxis\":[{\"type\":\"value\",\"field\":\"ratio\",\"agg\":\"value\",\"name\":\"投入产出比\",\"valOrAgg\":\"value\"},\r\n{\"type\":\"value\",\"field\":\"story\",\"agg\":\"value\",\"name\":\"需求交付\",\"valOrAgg\":\"value\"},\r\n{\"type\":\"value\",\"field\":\"consumed\",\"agg\":\"value\",\"name\":\"工时消耗\",\"valOrAgg\":\"value\"}\r\n]}','',NULL,'SELECT t1.`year`, CONCAT(t1.`month`, \'月\') AS `month`, IFNULL(t2.story, 0) AS story, IFNULL(t3.consumed, 0) AS consumed, ROUND(IF(IFNULL(t3.consumed, 0) = 0, 0, IFNULL(t2.story, 0) / IFNULL(t3.consumed, 0)), 2) AS ratio\r\nFROM (SELECT YEAR(`date`) AS \'year\', MONTH(`date`) AS \'month\' FROM zt_action GROUP BY `year`,`month`) AS t1\r\nLEFT JOIN (SELECT ROUND(SUM(estimate)) AS story, YEAR(`closedDate`) AS \'year\', MONTH(`closedDate`) AS \'month\' FROM zt_story WHERE deleted = \'0\' AND closedReason = \'done\' AND status = \'closed\' GROUP BY `year`,`month`) AS t2 ON t1.`year` = t2.`year` AND t1.`month` = t2.`month`\r\nLEFT JOIN (SELECT ROUND(SUM(consumed)) as consumed, YEAR(`date`) as \'year\', MONTH(`date`) AS \'month\' FROM zt_effort WHERE deleted = \'0\' GROUP BY `year`,`month`) AS t3 ON t1.`year` = t3.`year` AND t1.`month` = t3.`month`',1,'','','0000-00-00 00:00:00','','0000-00-00 00:00:00',0);
|
||||
|
||||
REPLACE INTO `zt_workflow` (`parent`, `child`, `type`, `navigator`, `app`, `position`, `module`, `table`, `name`, `flowchart`, `js`, `css`, `order`, `buildin`, `administrator`, `desc`, `version`, `status`, `approval`, `vision`, `createdBy`, `createdDate`, `editedBy`, `editedDate`, `titleField`, `contentField`) VALUES
|
||||
('', '', 'flow', 'secondary', 'feedback', '', 'ticket', 'zt_ticket', '工单', '', '', '', 0, 1, '', '', '1.0', 'normal', 'disabled', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', '', ''),
|
||||
('', '', 'flow', 'secondary', 'feedback', '', 'ticket', 'zt_ticket', '工单', '', '', '', 0, 1, '', '', '1.0', 'normal', 'disabled', 'lite', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', '', '');
|
||||
|
||||
REPLACE INTO `zt_workflowfield` (`module`, `field`, `type`, `length`, `name`, `control`, `expression`, `options`, `default`, `rules`, `placeholder`, `canExport`, `canSearch`, `isValue`, `order`, `searchOrder`, `exportOrder`, `buildin`, `role`, `desc`, `readonly`, `createdBy`, `createdDate`, `editedBy`, `editedDate`) VALUES
|
||||
('ticket', 'id', 'mediumint', '8', '编号', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'product', 'mediumint', '8', '所属产品', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'module', 'mediumint', '8', '所属模块', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'title', 'varchar', '255', '标题', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'type', 'varchar', '30', '类型', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'desc', 'text', '', '描述', 'textarea', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'openedBuild', 'varchar', '255', '影响版本', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'feedback', 'mediumint', '8', '来源反馈', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'assignedTo', 'varchar', '255', '指派给', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'assignedDate', 'datetime', '', '指派日期', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'realStarted', 'datetime', '', '实际开始', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'startedBy', 'varchar', '255', '由谁开始', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'startedDate', 'datetime', '', '开始日期', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'deadline', 'date', '', '截止日期', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'pri', 'tinyint', '3', '优先级', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'estimate', 'float', '', '最初预计', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'left', 'float', '', '预计剩余', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'status', 'varchar', '255', '状态', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'subStatus', 'varchar', '30', '子状态', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 0, 'buildin', '', '0', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'openedBy', 'varchar', '30', '由谁创建', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'openedDate', 'datetime', '', '创建日期', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'activatedCount', 'int', '10', '激活次数', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'activatedBy', 'varchar', '30', '由谁激活', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'activatedDate', 'datetime', '', '激活日期', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'closedBy', 'varchar', '30', '由谁关闭', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'closedDate', 'datetime', '', '关闭日期', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'closedReason', 'varchar', '30', '关闭原因', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'finishedBy', 'varchar', '30', '由谁完成', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'finishedDate', 'datetime', '', '完成日期', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'resolvedBy', 'varchar', '30', '由谁解决', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'resolvedDate', 'datetime', '', '解决日期', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'resolution', 'varchar', '1000', '解决方案', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'editedBy', 'varchar', '30', '由谁编辑', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'editedDate', 'datetime', '', '编辑日期', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'keywords', 'varchar', '255', '关键词', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'repeatTicket', 'mediumint', '8', '重复工单', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'mailto', 'varchar', '255', '抄送给', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'consumed', 'float', '', '消耗', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('ticket', 'deleted', 'enum', '', '是否删除', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00');
|
||||
|
||||
REPLACE INTO `zt_workflowaction` (`module`, `action`, `name`, `type`, `batchMode`, `extensionType`, `open`, `position`, `layout`, `show`, `order`, `buildin`, `role`, `virtual`, `conditions`, `verifications`, `hooks`, `linkages`, `js`, `css`, `toList`, `blocks`, `desc`, `status`, `vision`, `createdBy`, `createdDate`, `editedBy`, `editedDate`, `method`) VALUES
|
||||
('ticket', 'browse', '浏览工单', 'batch', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'browse'),
|
||||
('ticket', 'create', '创建工单', 'single', 'different', 'none', 'normal', 'browse', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'create'),
|
||||
('ticket', 'edit', '编辑工单', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'edit'),
|
||||
('ticket', 'batchedit', '批量编辑', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'operate'),
|
||||
('ticket', 'start', '开始工单', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'operate'),
|
||||
('ticket', 'finish', '完成工单', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'operate'),
|
||||
('ticket', 'activate', '激活工单', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'operate'),
|
||||
('ticket', 'assign', '指派工单', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'operate'),
|
||||
('ticket', 'close', '关闭工单', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'operate'),
|
||||
('ticket', 'view', '工单详情', 'single', 'different', 'none', 'normal', 'browse', 'side', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'view'),
|
||||
('ticket', 'browse', '浏览工单', 'batch', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'lite', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'browse'),
|
||||
('ticket', 'create', '创建工单', 'single', 'different', 'none', 'normal', 'browse', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'lite', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'create'),
|
||||
('ticket', 'edit', '编辑工单', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'lite', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'edit'),
|
||||
('ticket', 'batchedit', '批量编辑', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'lite', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'operate'),
|
||||
('ticket', 'start', '开始工单', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'lite', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'operate'),
|
||||
('ticket', 'finish', '完成工单', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'lite', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'operate'),
|
||||
('ticket', 'activate', '激活工单', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'lite', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'operate'),
|
||||
('ticket', 'assign', '指派工单', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'lite', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'operate'),
|
||||
('ticket', 'close', '关闭工单', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'lite', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'operate'),
|
||||
('ticket', 'view', '工单详情', 'single', 'different', 'none', 'normal', 'browse', 'side', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'lite', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'view');
|
||||
|
||||
UPDATE `zt_workflowfield` SET `name` = '类型' WHERE `module` = 'feedback' and `field` = 'type';
|
||||
UPDATE `zt_workflowfield` SET `name` = '创建者' WHERE `module` = 'feedback' and `field` = 'openedBy';
|
||||
UPDATE `zt_workflowfield` SET `name` = '创建时间' WHERE `module` = 'feedback' and `field` = 'openedDate';
|
||||
UPDATE `zt_workflowfield` SET `name` = '反馈邮箱' WHERE `module` = 'feedback' and `field` = 'notifyEmail';
|
||||
UPDATE `zt_workflowfield` SET `name` = '最后操作' WHERE `module` = 'feedback' and `field` = 'editedBy';
|
||||
UPDATE `zt_workflowfield` SET `name` = '最后操作时间' WHERE `module` = 'feedback' and `field` = 'editedDate';
|
||||
|
||||
REPLACE INTO `zt_workflowfield` (`module`, `field`, `type`, `length`, `name`, `control`, `expression`, `options`, `default`, `rules`, `placeholder`, `canExport`, `canSearch`, `isValue`, `order`, `searchOrder`, `exportOrder`, `buildin`, `role`, `desc`, `readonly`, `createdBy`, `createdDate`, `editedBy`, `editedDate`) VALUES
|
||||
('feedback', 'pri', 'tinyint', '3', '优先级', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('feedback', 'source', 'varchar', '30', '来源公司', 'input', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('feedback', 'repeatFeedback', 'varchar', '30', '重复反馈', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('feedback', 'activatedBy', 'varchar', '30', '由谁激活', 'select', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00'),
|
||||
('feedback', 'activatedDate', 'datetime', '', '激活时间', 'datetime', '', '', '', '', '', '0', '0', '0', 1, 0, 0, 1, 'buildin', '', '1', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00');
|
||||
|
||||
REPLACE INTO `zt_workflowaction` (`module`, `action`, `name`, `type`, `batchMode`, `extensionType`, `open`, `position`, `layout`, `show`, `order`, `buildin`, `role`, `virtual`, `conditions`, `verifications`, `hooks`, `linkages`, `js`, `css`, `toList`, `blocks`, `desc`, `status`, `vision`, `createdBy`, `createdDate`, `editedBy`, `editedDate`, `method`) VALUES
|
||||
('feedback', 'activate', '激活反馈', 'single', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'activate'),
|
||||
('feedback', 'import', '导入', 'single', 'different', 'none', 'normal', 'browse', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'import'),
|
||||
('feedback', 'exporttemplate', '导出模板', 'single', 'different', 'none', 'normal', 'browse', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'exporttemplate'),
|
||||
('feedback', 'batchclose', '批量关闭', 'batch', 'different', 'none', 'normal', 'browseandview', 'normal', 'direct', 0, 1, 'buildin', 0, '', '', '', '', '', '', '', '', '', 'enable', 'rnd', 'admin', '2022-12-19 14:13:30', '', '0000-00-00 00:00:00', 'batchclose');
|
||||
|
||||
@@ -851,7 +851,7 @@ class baseJS
|
||||
$message = str_replace("\\'", "'", $message);
|
||||
$message = str_replace("'", "\\'", $message);
|
||||
|
||||
return self::start($full) . "alert('" . $message . "')" . self::end() . self::resetForm();
|
||||
return static::start($full) . "alert('" . $message . "')" . static::end() . static::resetForm();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -864,7 +864,7 @@ class baseJS
|
||||
*/
|
||||
static public function close()
|
||||
{
|
||||
return self::start() . "window.close()" . self::end();
|
||||
return static::start() . "window.close()" . static::end();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -903,7 +903,7 @@ class baseJS
|
||||
{
|
||||
$alertMessage = $message;
|
||||
}
|
||||
return self::alert($alertMessage, $full);
|
||||
return static::alert($alertMessage, $full);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -916,7 +916,7 @@ class baseJS
|
||||
*/
|
||||
static public function resetForm()
|
||||
{
|
||||
return self::start() . 'if(window.parent) window.parent.$.enableForm();' . self::end();
|
||||
return static::start() . 'if(window.parent) window.parent.$.enableForm();' . static::end();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -954,7 +954,7 @@ class baseJS
|
||||
return json_encode($output);
|
||||
}
|
||||
|
||||
$js = self::start();
|
||||
$js = static::start();
|
||||
|
||||
$confirmAction = '';
|
||||
if(strtolower($okURL) == "back")
|
||||
@@ -1001,7 +1001,7 @@ EOT;
|
||||
$js .= $confirmAction;
|
||||
}
|
||||
|
||||
$js .= self::end();
|
||||
$js .= static::end();
|
||||
return $js;
|
||||
}
|
||||
|
||||
@@ -1038,7 +1038,7 @@ EOT;
|
||||
return json_encode($output);
|
||||
}
|
||||
|
||||
$js = self::start();
|
||||
$js = static::start();
|
||||
if(strtolower($url) == "back")
|
||||
{
|
||||
$js .= "history.back(-1);\n";
|
||||
@@ -1053,7 +1053,7 @@ EOT;
|
||||
if(strpos($url, '#app=') !== false) $url = substr($url, 0, strpos($url, '#app='));
|
||||
$js .= "$target.location='$url';\n";
|
||||
}
|
||||
return $js . self::end();
|
||||
return $js . static::end();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1066,7 +1066,7 @@ EOT;
|
||||
*/
|
||||
static public function closeWindow()
|
||||
{
|
||||
return self::start(). "window.close();" . self::end();
|
||||
return static::start(). "window.close();" . static::end();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1082,9 +1082,9 @@ EOT;
|
||||
*/
|
||||
static public function refresh($url, $target = "self", $time = 3000)
|
||||
{
|
||||
$js = self::start();
|
||||
$js = static::start();
|
||||
$js .= "setTimeout(\"$target.location='$url'\", $time);";
|
||||
$js .= self::end();
|
||||
$js .= static::end();
|
||||
return $js;
|
||||
}
|
||||
|
||||
@@ -1099,7 +1099,7 @@ EOT;
|
||||
*/
|
||||
static public function reload($window = 'self')
|
||||
{
|
||||
$js = self::start();
|
||||
$js = static::start();
|
||||
// See bug #2379 http://pms.zentao.net/bug-view-2379.html
|
||||
if($window !== 'self' && $window !== 'window')
|
||||
{
|
||||
@@ -1109,7 +1109,7 @@ EOT;
|
||||
{
|
||||
$js .= "$window.location.reload(true);\n";
|
||||
}
|
||||
$js .= self::end();
|
||||
$js .= static::end();
|
||||
return $js;
|
||||
}
|
||||
|
||||
@@ -1125,7 +1125,7 @@ EOT;
|
||||
*/
|
||||
static public function closeColorbox($window = 'self')
|
||||
{
|
||||
return self::closeModal($window);
|
||||
return static::closeModal($window);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1141,10 +1141,10 @@ EOT;
|
||||
*/
|
||||
static public function closeModal($window = 'self', $location = 'this', $callback = 'null')
|
||||
{
|
||||
$js = self::start();
|
||||
$js = static::start();
|
||||
$js .= "if($window.location.href == self.location.href){ $window.window.close();}";
|
||||
$js .= "else{ $window.$.cookie('selfClose', 1);$window.$.closeModal($callback, '$location');}";
|
||||
$js .= self::end();
|
||||
$js .= static::end();
|
||||
return $js;
|
||||
}
|
||||
|
||||
@@ -1201,10 +1201,10 @@ EOT;
|
||||
$jsLang->expand = isset($lang->expand) ? $lang->expand : '';
|
||||
$jsLang->timeout = isset($lang->timeout) ? $lang->timeout : '';
|
||||
|
||||
$js = self::start(false);
|
||||
$js = static::start(false);
|
||||
$js .= 'window.config=' . json_encode($jsConfig) . ";\n";
|
||||
$js .= 'window.lang=' . json_encode($jsLang) . ";\n";
|
||||
$js .= self::end();
|
||||
$js .= static::end();
|
||||
echo $js;
|
||||
}
|
||||
|
||||
@@ -1219,9 +1219,9 @@ EOT;
|
||||
*/
|
||||
static public function execute($code)
|
||||
{
|
||||
$js = self::start($full = false);
|
||||
$js = static::start($full = false);
|
||||
$js .= $code;
|
||||
$js .= self::end();
|
||||
$js .= static::end();
|
||||
echo $js;
|
||||
}
|
||||
|
||||
@@ -1241,7 +1241,7 @@ EOT;
|
||||
$prefix = (isset($config->framework->jsWithPrefix) and $config->framework->jsWithPrefix == false) ? '' : 'v.';
|
||||
|
||||
static $viewOBJOut;
|
||||
$js = self::start(false);
|
||||
$js = static::start(false);
|
||||
if(!$viewOBJOut and $prefix)
|
||||
{
|
||||
$js .= 'if(typeof(v) != "object") v = {};';
|
||||
@@ -1278,7 +1278,7 @@ EOT;
|
||||
$value = addslashes($value);
|
||||
$js .= "{$prefix}{$key} = '{$value}';";
|
||||
}
|
||||
$js .= self::end($newline = false);
|
||||
$js .= static::end($newline = false);
|
||||
echo $js;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -404,7 +404,42 @@ class js extends baseJS
|
||||
*/
|
||||
static public function openEntry($app, $url)
|
||||
{
|
||||
return self::start() . "$.apps.open('$url', '$app')" . self::end();
|
||||
return static::start() . "$.apps.open('$url', '$app')" . static::end();
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the start of a js block, injects code for zentao client.
|
||||
*
|
||||
* @param bool $full
|
||||
* @static
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
static public function start($full = true)
|
||||
{
|
||||
if($full)
|
||||
{
|
||||
$document = "<html><meta charset='utf-8'/><style>body{background:white}</style><script>";
|
||||
if(strpos($_SERVER['HTTP_USER_AGENT'], 'xuanxuan') != false)
|
||||
{
|
||||
/* Inject handler for confirm, prompt and alert. */
|
||||
$document .= <<<EOT
|
||||
window.confirm = function() {
|
||||
console.warn('\"window.confirm\" is disabled in webview.');
|
||||
return true;
|
||||
};
|
||||
window.prompt = function() {
|
||||
console.warn('\"window.prompt\" is disabled in webview.');
|
||||
};
|
||||
window.alert = function(msg) {
|
||||
const win = window.parent ? window.parent : window;
|
||||
win.open(`xxc://webview/alert/\${encodeURIComponent(msg)}`, '_blank');
|
||||
};
|
||||
EOT;
|
||||
}
|
||||
return $document;
|
||||
}
|
||||
return '<script>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -224,6 +224,7 @@ $lang->bug->tplResult = "<p>[Results]</p><br/>";
|
||||
$lang->bug->tplExpect = "<p>[Expectations]</p><br/>";
|
||||
|
||||
/* Value list for each field. */
|
||||
$lang->bug->severityList[0] = '';
|
||||
$lang->bug->severityList[1] = '1';
|
||||
$lang->bug->severityList[2] = '2';
|
||||
$lang->bug->severityList[3] = '3';
|
||||
|
||||
@@ -224,6 +224,7 @@ $lang->bug->tplResult = "<p>[Results]</p><br/>";
|
||||
$lang->bug->tplExpect = "<p>[Expectations]</p><br/>";
|
||||
|
||||
/* Value list for each field. */
|
||||
$lang->bug->severityList[0] = '';
|
||||
$lang->bug->severityList[1] = '1';
|
||||
$lang->bug->severityList[2] = '2';
|
||||
$lang->bug->severityList[3] = '3';
|
||||
|
||||
@@ -224,6 +224,7 @@ $lang->bug->tplResult = "<p>[Résultats]</p><br/>";
|
||||
$lang->bug->tplExpect = "<p>[Résultats attendus]</p><br/>";
|
||||
|
||||
/* Value list for each field. */
|
||||
$lang->bug->severityList[0] = '';
|
||||
$lang->bug->severityList[1] = '1';
|
||||
$lang->bug->severityList[2] = '2';
|
||||
$lang->bug->severityList[3] = '3';
|
||||
|
||||
@@ -194,6 +194,7 @@ $lang->bug->tplResult = "<p>[Kết quả]</p><br/>";
|
||||
$lang->bug->tplExpect = "<p>[Kỳ vọng]</p><br/>";
|
||||
|
||||
/* Value list for each field. */
|
||||
$lang->bug->severityList[0] = '';
|
||||
$lang->bug->severityList[1] = '1';
|
||||
$lang->bug->severityList[2] = '2';
|
||||
$lang->bug->severityList[3] = '3';
|
||||
|
||||
@@ -224,6 +224,7 @@ $lang->bug->tplResult = "<p>[结果]</p><br/>";
|
||||
$lang->bug->tplExpect = "<p>[期望]</p><br/>";
|
||||
|
||||
/* 各个字段取值列表。*/
|
||||
$lang->bug->severityList[0] = '';
|
||||
$lang->bug->severityList[1] = '1';
|
||||
$lang->bug->severityList[2] = '2';
|
||||
$lang->bug->severityList[3] = '3';
|
||||
|
||||
@@ -209,6 +209,7 @@ $lang->bug->tplResult = "<p>[結果]</p><br/>";
|
||||
$lang->bug->tplExpect = "<p>[期望]</p><br/>";
|
||||
|
||||
/* 各個欄位取值列表。*/
|
||||
$lang->bug->severityList[0] = '';
|
||||
$lang->bug->severityList[1] = '1';
|
||||
$lang->bug->severityList[2] = '2';
|
||||
$lang->bug->severityList[3] = '3';
|
||||
|
||||
@@ -209,6 +209,7 @@ if($this->app->tab == 'project') js::set('objectID', $projectID);
|
||||
$hasCustomSeverity = false;
|
||||
foreach($lang->bug->severityList as $severityKey => $severityValue)
|
||||
{
|
||||
if(empty($severityValue)) unset($lang->bug->severityList[$severityKey]);
|
||||
if(!empty($severityKey) and (string)$severityKey != (string)$severityValue)
|
||||
{
|
||||
$hasCustomSeverity = true;
|
||||
|
||||
+3
-3
@@ -1879,7 +1879,7 @@ class mrModel extends model
|
||||
$relation->BID = $storyID;
|
||||
|
||||
$this->dao->replace(TABLE_RELATION)->data($relation)->exec();
|
||||
$this->action->create('story', $linkID, 'createmr', '', $MRCreateAction);
|
||||
$this->action->create('story', $storyID, 'createmr', '', $MRCreateAction);
|
||||
}
|
||||
|
||||
foreach($bugs as $bugID)
|
||||
@@ -1893,7 +1893,7 @@ class mrModel extends model
|
||||
$relation->BID = $bugID;
|
||||
|
||||
$this->dao->replace(TABLE_RELATION)->data($relation)->exec();
|
||||
$this->action->create('bug', $linkID, 'createmr', '', $MRCreateAction);
|
||||
$this->action->create('bug', $bugID, 'createmr', '', $MRCreateAction);
|
||||
}
|
||||
|
||||
foreach($tasks as $taskID)
|
||||
@@ -1907,7 +1907,7 @@ class mrModel extends model
|
||||
$relation->BID = $taskID;
|
||||
|
||||
$this->dao->replace(TABLE_RELATION)->data($relation)->exec();
|
||||
$this->action->create('task', $linkID, 'createmr', '', $MRCreateAction);
|
||||
$this->action->create('task', $taskID, 'createmr', '', $MRCreateAction);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -114,10 +114,12 @@ class productplanModel extends model
|
||||
|
||||
$productplanQuery = $this->session->productplanQuery;
|
||||
|
||||
$date = date('Y-m-d');
|
||||
$plans = $this->dao->select('*')->from(TABLE_PRODUCTPLAN)
|
||||
$date = date('Y-m-d');
|
||||
$products = (strpos($param, 'noproduct') !== false and empty($product)) ? $this->loadModel('product')->getList() : array(0);
|
||||
$plans = $this->dao->select('*')->from(TABLE_PRODUCTPLAN)
|
||||
->where('deleted')->eq(0)
|
||||
->beginIF(strpos($param, 'noproduct') === false or !empty($product))->andWhere('product')->eq($product)->fi()
|
||||
->beginIF(strpos($param, 'noproduct') !== false and empty($product))->andWhere('product')->in(array_keys($products))->fi()
|
||||
->beginIF(!empty($branch) and $branch != 'all')->andWhere('branch')->eq($branch)->fi()
|
||||
->beginIF(strpos(',all,undone,bySearch,review,', ",$browseType,") === false)->andWhere('status')->eq($browseType)->fi()
|
||||
->beginIF($browseType == 'undone')->andWhere('status')->in('wait,doing')->fi()
|
||||
|
||||
+35
-17
@@ -1247,15 +1247,8 @@ class storyModel extends model
|
||||
if(empty($childrenStatus)) return $this->dao->update(TABLE_STORY)->set('parent')->eq('0')->where('id')->eq($parentID)->exec();
|
||||
|
||||
$status = $oldParentStory->status;
|
||||
if(count($childrenStatus) == 1)
|
||||
{
|
||||
$status = current($childrenStatus);
|
||||
if($status == 'draft' or $status == 'changing') $status = 'active';
|
||||
}
|
||||
elseif(count($childrenStatus) != 1 and $oldParentStory->status == 'closed')
|
||||
{
|
||||
$status = 'active';
|
||||
}
|
||||
if(count($childrenStatus) == 1 and current($childrenStatus) == 'closed') $status = current($childrenStatus); // Close parent story.
|
||||
if($oldParentStory->status == 'closed') $status = $this->getActivateStatus($parentID); // Activate parent story.
|
||||
|
||||
if($status and $oldParentStory->status != $status)
|
||||
{
|
||||
@@ -1263,7 +1256,7 @@ class storyModel extends model
|
||||
$story = new stdclass();
|
||||
$story->status = $status;
|
||||
$story->stage = 'wait';
|
||||
if($status == 'active')
|
||||
if(strpos('active,changing,draft', $status) !== false)
|
||||
{
|
||||
$story->assignedTo = $oldParentStory->openedBy;
|
||||
$story->assignedDate = $now;
|
||||
@@ -1293,13 +1286,21 @@ class storyModel extends model
|
||||
if(!$createAction) return $story;
|
||||
|
||||
$newParentStory = $this->dao->select('*')->from(TABLE_STORY)->where('id')->eq($parentID)->fetch();
|
||||
$changes = common::createChanges($oldParentStory, $newParentStory);
|
||||
$action = '';
|
||||
if($status == 'active') $action = 'Activated';
|
||||
if($status == 'closed') $action = 'closedbysystem';
|
||||
$changes = common::createChanges($oldParentStory, $newParentStory);
|
||||
$action = '';
|
||||
$preStatus = '';
|
||||
if(strpos('active,draft,changing', $status) !== false) $action = 'Activated';
|
||||
if($status == 'closed')
|
||||
{
|
||||
/* Record the status before closed. */
|
||||
$action = 'closedbysystem';
|
||||
$preStatus = $oldParentStory->status;
|
||||
$isChanged = $oldParentStory->changedBy ? true : false;
|
||||
if($preStatus == 'reviewing') $preStatus = $isChanged ? 'changing' : 'draft';
|
||||
}
|
||||
if($action)
|
||||
{
|
||||
$actionID = $this->loadModel('action')->create('story', $parentID, $action, '', '', '', false);
|
||||
$actionID = $this->loadModel('action')->create('story', $parentID, $action, '', $preStatus, '', false);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
|
||||
@@ -6410,7 +6411,8 @@ class storyModel extends model
|
||||
public function getActivateStatus($storyID, $hasTwins = true)
|
||||
{
|
||||
$status = 'active';
|
||||
$action = $hasTwins ? 'closed,reviewrejected,synctwins' : 'closed,reviewrejected';
|
||||
$action = 'closed,reviewrejected,closedbysystem';
|
||||
$action = $hasTwins ? $action . ',synctwins' : $action;
|
||||
$lastRecord = $this->dao->select('action,extra')->from(TABLE_ACTION)
|
||||
->where('objectType')->eq('story')
|
||||
->andWhere('objectID')->eq($storyID)
|
||||
@@ -6419,11 +6421,27 @@ class storyModel extends model
|
||||
->fetch();
|
||||
|
||||
$lastAction = $lastRecord->action;
|
||||
if(strpos('closed,reviewrejected', $lastAction) !== false)
|
||||
if(strpos(',closed,reviewrejected,', ",$lastAction,") !== false)
|
||||
{
|
||||
$status = strpos($lastRecord->extra, '|') !== false ? substr($lastRecord->extra, strpos($lastRecord->extra, '|') + 1) : 'active';
|
||||
}
|
||||
|
||||
/* Activate parent story. */
|
||||
if($lastAction == 'closedbysystem')
|
||||
{
|
||||
$status = $lastRecord->extra ? $lastRecord->extra : 'active';
|
||||
if($status == 'active')
|
||||
{
|
||||
/* If the parent story is not reviewed before closing, it will be activated to the status in changing. */
|
||||
$hasNotReviewed = $this->dao->select('t1.*')->from(TABLE_STORYREVIEW)->alias('t1')
|
||||
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id and t2.version = t1.version')
|
||||
->where('t1.story')->eq($storyID)
|
||||
->andWhere('t1.result')->eq('')
|
||||
->fetchAll();
|
||||
if(!empty($hasNotReviewed)) $status = 'changing';
|
||||
}
|
||||
}
|
||||
|
||||
/* When activating twin story, you need to check the status of the twin story selected when closing. */
|
||||
if($lastAction == 'synctwins')
|
||||
{
|
||||
|
||||
@@ -30,3 +30,4 @@ tbody > tr > td .icon-share {font-size: 9px;}
|
||||
|
||||
#mainMenu .pull-left .dividing-line {margin: 7px 5px 0 0;}
|
||||
.btn-toolbar>.btn, .btn-toolbar>.btn-group, .btn-toolbar>.dropdown {margin-right: 5px;}
|
||||
.checkbox-primary{float: left;}
|
||||
|
||||
@@ -265,6 +265,6 @@ $lang->testcase->featureBar['browse']['wait'] = 'Wartend';
|
||||
$lang->testcase->featureBar['browse']['needconfirm'] = $lang->testcase->needConfirm;
|
||||
$lang->testcase->featureBar['browse']['group'] = 'Group View';
|
||||
$lang->testcase->featureBar['browse']['zerocase'] = 'Zero Case Story';
|
||||
$lang->testcase->featureBar['browse']['autocase'] = $lang->testcase->showAutoCase;
|
||||
$lang->testcase->featureBar['browse']['suite'] = 'Suite';
|
||||
$lang->testcase->featureBar['browse']['autocase'] = $lang->testcase->showAutoCase;
|
||||
$lang->testcase->featureBar['groupcase'] = $lang->testcase->featureBar['browse'];
|
||||
|
||||
@@ -265,6 +265,6 @@ $lang->testcase->featureBar['browse']['wait'] = 'Waiting';
|
||||
$lang->testcase->featureBar['browse']['needconfirm'] = $lang->testcase->needConfirm;
|
||||
$lang->testcase->featureBar['browse']['group'] = 'Group View';
|
||||
$lang->testcase->featureBar['browse']['zerocase'] = 'Zero Case Story';
|
||||
$lang->testcase->featureBar['browse']['autocase'] = $lang->testcase->showAutoCase;
|
||||
$lang->testcase->featureBar['browse']['suite'] = 'Suite';
|
||||
$lang->testcase->featureBar['browse']['autocase'] = $lang->testcase->showAutoCase;
|
||||
$lang->testcase->featureBar['groupcase'] = $lang->testcase->featureBar['browse'];
|
||||
|
||||
@@ -265,6 +265,6 @@ $lang->testcase->featureBar['browse']['wait'] = 'En Attente';
|
||||
$lang->testcase->featureBar['browse']['needconfirm'] = $lang->testcase->needConfirm;
|
||||
$lang->testcase->featureBar['browse']['group'] = 'Group View';
|
||||
$lang->testcase->featureBar['browse']['zerocase'] = 'Zero Case Story';
|
||||
$lang->testcase->featureBar['browse']['autocase'] = $lang->testcase->showAutoCase;
|
||||
$lang->testcase->featureBar['browse']['suite'] = 'Suite';
|
||||
$lang->testcase->featureBar['browse']['autocase'] = $lang->testcase->showAutoCase;
|
||||
$lang->testcase->featureBar['groupcase'] = $lang->testcase->featureBar['browse'];
|
||||
|
||||
@@ -265,6 +265,6 @@ $lang->testcase->featureBar['browse']['wait'] = '待评审';
|
||||
$lang->testcase->featureBar['browse']['needconfirm'] = $lang->testcase->needConfirm;
|
||||
$lang->testcase->featureBar['browse']['group'] = '分组查看';
|
||||
$lang->testcase->featureBar['browse']['zerocase'] = "零用例{$lang->SRCommon}";
|
||||
$lang->testcase->featureBar['browse']['autocase'] = $lang->testcase->showAutoCase;
|
||||
$lang->testcase->featureBar['browse']['suite'] = '套件';
|
||||
$lang->testcase->featureBar['browse']['autocase'] = $lang->testcase->showAutoCase;
|
||||
$lang->testcase->featureBar['groupcase'] = $lang->testcase->featureBar['browse'];
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span title='<?php echo $lang->zanode->automation;?>'><?php echo $lang->zanode->automation;?></span>
|
||||
<span title='<?php echo $lang->zanode->automation;?>'><?php echo $lang->zanode->automation;?> <icon class='icon icon-help' data-toggle='popover' data-trigger='focus hover' data-placement='bottom' data-tip-class='text-muted popover-sm' data-content="<?php echo $lang->zanode->automationTips;?>"></icon></span>
|
||||
</h2>
|
||||
</div>
|
||||
<form method='post' target='hiddenwin'>
|
||||
|
||||
@@ -194,15 +194,9 @@
|
||||
<?php if(!isonlybody()):?>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<?php if(!empty($productID)): ?>
|
||||
<div class='btn-group'>
|
||||
<?php common::printLink('testcase', 'automation', "productID=$productID", "<i class='icon-wrench muted'> </i>" . $lang->testcase->automation, '', "class='btn btn-link iframe' data-width='50%'", true, true)?>
|
||||
<?php if(common::hasPriv('testcase', 'automation')):?>
|
||||
<icon class='icon icon-help' data-toggle='popover' data-trigger='focus hover' data-placement='bottom' data-tip-class='text-muted popover-sm' data-content="<?php echo $lang->zanode->automationTips;?>"></icon>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div class='btn-group'>
|
||||
<button type='button' class='btn btn-link dropdown-toggle' data-toggle='dropdown'>
|
||||
<i class='icon icon-export muted'></i> <?php echo $lang->export ?>
|
||||
<i class='icon icon-export muted'></i>
|
||||
<span class='caret'></span>
|
||||
</button>
|
||||
<ul class='dropdown-menu pull-right' id='exportActionMenu'>
|
||||
@@ -223,7 +217,7 @@
|
||||
<?php if(empty($productID) or common::canModify('product', $product)):?>
|
||||
<?php if(!empty($productID) and (common::hasPriv('testcase', 'import') or common::hasPriv('testcase', 'importFromLib'))): ?>
|
||||
<div class='btn-group'>
|
||||
<button type='button' class='btn btn-link dropdown-toggle' data-toggle='dropdown' id='importAction'><i class='icon icon-import muted'></i> <?php echo $lang->import ?><span class='caret'></span></button>
|
||||
<button type='button' class='btn btn-link dropdown-toggle' data-toggle='dropdown' id='importAction'><i class='icon icon-import muted'></i> <span class='caret'></span></button>
|
||||
<ul class='dropdown-menu pull-right' id='importActionMenu'>
|
||||
<?php
|
||||
if(common::hasPriv('testcase', 'import')) echo "<li>" . html::a($this->createlink('testcase', 'import', "productID=$productID&branch=$branch"), $lang->testcase->fileImport, '', "class='export' data-app={$app->tab}") . "</li>";
|
||||
@@ -234,6 +228,12 @@
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php if(!empty($productID)): ?>
|
||||
<div class='btn-group'>
|
||||
<?php common::printLink('testcase', 'automation', "productID=$productID", "<i class='icon-wrench muted'> </i>" . $lang->testcase->automation, '', "class='btn btn-link iframe' data-width='50%'", true, true)?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
<?php $initModule = isset($moduleID) ? (int)$moduleID : 0;?>
|
||||
<div class='btn-group dropdown'>
|
||||
<?php
|
||||
|
||||
@@ -118,7 +118,7 @@ if($viewType == 'doc' or $viewType == 'api')
|
||||
<?php if($viewType == 'story' and $allProduct and $canBeChanged):?>
|
||||
<div class="panel-actions btn-toolbar"><?php echo html::a('javascript:toggleCopy()', $lang->tree->syncFromProduct, '', "class='btn btn-sm btn-primary'")?></div>
|
||||
<?php elseif($viewType == 'feedback' and common::hasPriv('feedback', 'syncProduct') and !isset($syncConfig[$rootID])):?>
|
||||
<div class="panel-actions btn-toolbar"><?php echo html::a($this->createLink('feedback', 'syncProduct', "productID=$rootID&parent=$parent", '', true), $lang->tree->syncProductModule, '', "class='btn btn-sm btn-primary iframe' data-width='40%'");?></div>
|
||||
<div class="panel-actions btn-toolbar"><?php echo html::a($this->createLink('feedback', 'syncProduct', "productID=$rootID&module=feedback&parent=$parent", '', true), $lang->tree->syncProductModule, '', "class='btn btn-sm btn-primary iframe' data-width='40%'");?></div>
|
||||
<?php elseif($viewType == 'ticket' and common::hasPriv('ticket', 'syncProduct') and !isset($syncConfig[$rootID])):?>
|
||||
<div class="panel-actions btn-toolbar"><?php echo html::a($this->createLink('ticket', 'syncProduct', "productID=$rootID&parent=$parent", '', true), $lang->tree->syncProductModule, '', "class='btn btn-sm btn-primary iframe' data-width='40%'");?></div>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -5910,13 +5910,28 @@ class upgradeModel extends model
|
||||
if(empty($moduleBranchPairs)) return true;
|
||||
|
||||
$storyModulePairs = $this->dao->select('module')->from(TABLE_STORY)->where('module')->in(array_keys($moduleBranchPairs))->andWhere('branch')->eq(0)->fetchPairs();
|
||||
foreach($storyModulePairs as $moduleID) $this->dao->update(TABLE_STORY)->set('`branch`')->eq($moduleBranchPairs[$moduleID])->where('module')->eq($moduleID)->exec();
|
||||
foreach($storyModulePairs as $moduleID)
|
||||
{
|
||||
if(!isset($moduleBranchPairs[$moduleID])) continue;
|
||||
|
||||
$this->dao->update(TABLE_STORY)->set('`branch`')->eq($moduleBranchPairs[$moduleID])->where('module')->eq($moduleID)->exec();
|
||||
}
|
||||
|
||||
$bugModulePairs = $this->dao->select('module')->from(TABLE_BUG)->where('module')->in(array_keys($moduleBranchPairs))->andWhere('branch')->eq(0)->fetchPairs();
|
||||
foreach($bugModulePairs as $moduleID) $this->dao->update(TABLE_BUG)->set('`branch`')->eq($moduleBranchPairs[$moduleID])->where('module')->eq($moduleID)->exec();
|
||||
foreach($bugModulePairs as $moduleID)
|
||||
{
|
||||
if(!isset($moduleBranchPairs[$moduleID])) continue;
|
||||
|
||||
$this->dao->update(TABLE_BUG)->set('`branch`')->eq($moduleBranchPairs[$moduleID])->where('module')->eq($moduleID)->exec();
|
||||
}
|
||||
|
||||
$caseModulePairs = $this->dao->select('module')->from(TABLE_CASE)->where('module')->in(array_keys($moduleBranchPairs))->andWhere('branch')->eq(0)->fetchPairs();
|
||||
foreach($caseModulePairs as $moduleID) $this->dao->update(TABLE_CASE)->set('`branch`')->eq($moduleBranchPairs[$moduleID])->where('module')->eq($moduleID)->exec();
|
||||
foreach($caseModulePairs as $moduleID)
|
||||
{
|
||||
if(!isset($moduleBranchPairs[$moduleID])) continue;
|
||||
|
||||
$this->dao->update(TABLE_CASE)->set('`branch`')->eq($moduleBranchPairs[$moduleID])->where('module')->eq($moduleID)->exec();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -20,8 +20,10 @@ include '../../common/view/header.lite.html.php';
|
||||
<?php
|
||||
if($denyType == 'nopriv')
|
||||
{
|
||||
$this->app->loadLang('group');
|
||||
$groupPriv = isset($lang->resource->$module->$method) ? $lang->resource->$module->$method : $method;
|
||||
$moduleName = isset($lang->$module->common) ? $lang->$module->common : $module;
|
||||
$methodName = isset($lang->$module->$method) ? $lang->$module->$method : $method;
|
||||
$methodName = isset($lang->$module->$groupPriv) ? $lang->$module->$groupPriv : $method;
|
||||
|
||||
if($module == 'execution' && $method == 'gantt') $methodName = $methodName->common;
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ function updateProgress() {
|
||||
$('.image-download-' + imageID).addClass('disabled');
|
||||
$('.image-cancel-' + imageID).addClass('disabled');
|
||||
$('.image-cancel-' + imageID).attr('href', '#');
|
||||
$('.image-progress-' + imageID).text("100%");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -469,7 +469,9 @@ class zanode extends control
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return print(js::alert(dao::getError()) . js::reload('parent'));
|
||||
$errors = dao::getError();
|
||||
if(is_array($errors)) $errors = implode($errors, ',');
|
||||
return print(js::alert($errors) . js::reload('parent'));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -101,8 +101,9 @@ $lang->zanode->imageNameEmpty = 'Name can not be empty.';
|
||||
|
||||
$lang->zanode->runTimeout = 'Network connection timeout, please check the host and execution node status.';
|
||||
|
||||
$lang->zanode->apiError['-10100'] = 'ZenAgent Node not found.';
|
||||
$lang->zanode->apiError['fail'] = 'Connection timeout, Please check the host and execution node status.';
|
||||
$lang->zanode->apiError['-10100'] = 'ZenAgent Node not found.';
|
||||
$lang->zanode->apiError['fail'] = 'Connection timeout, Please check the host and execution node status.';
|
||||
$lang->zanode->apiError['notRunning'] = 'Please check the execution node status.';
|
||||
|
||||
$lang->zanode->publicList[0] = 'Private';
|
||||
$lang->zanode->publicList[1] = 'Public';
|
||||
|
||||
@@ -105,8 +105,9 @@ $lang->zanode->snapRestoring = 'Snapshot is restoring.';
|
||||
|
||||
$lang->zanode->runTimeout = 'Network connection timeout, please check the host and execution node status.';
|
||||
|
||||
$lang->zanode->apiError['-10100'] = 'ZenAgent Node not found.';
|
||||
$lang->zanode->apiError['fail'] = 'Connection timeout, Please check the host and execution node status.';
|
||||
$lang->zanode->apiError['-10100'] = 'ZenAgent Node not found.';
|
||||
$lang->zanode->apiError['fail'] = 'Connection timeout, Please check the host and execution node status.';
|
||||
$lang->zanode->apiError['notRunning'] = 'Please check the execution node status.';
|
||||
|
||||
$lang->zanode->publicList[0] = 'Private';
|
||||
$lang->zanode->publicList[1] = 'Public';
|
||||
|
||||
@@ -101,8 +101,9 @@ $lang->zanode->imageNameEmpty = 'Name can not be empty.';
|
||||
|
||||
$lang->zanode->runTimeout = 'Network connection timeout, please check the host and execution node status.';
|
||||
|
||||
$lang->zanode->apiError['-10100'] = 'ZenAgent Node not found.';
|
||||
$lang->zanode->apiError['fail'] = 'Connection timeout, Please check the host and execution node status.';
|
||||
$lang->zanode->apiError['-10100'] = 'ZenAgent Node not found.';
|
||||
$lang->zanode->apiError['fail'] = 'Connection timeout, Please check the host and execution node status.';
|
||||
$lang->zanode->apiError['notRunning'] = 'Please check the execution node status.';
|
||||
|
||||
$lang->zanode->publicList[0] = 'Private';
|
||||
$lang->zanode->publicList[1] = 'Public';
|
||||
|
||||
@@ -106,8 +106,9 @@ $lang->zanode->snapRestoring = '快照正在还原中';
|
||||
|
||||
$lang->zanode->runTimeout = '自动执行失败,请检查宿主机和执行节点状态';
|
||||
|
||||
$lang->zanode->apiError['-10100'] = '执行节点不存在';
|
||||
$lang->zanode->apiError['fail'] = '执行失败,请检查宿主机和执行节点状态';
|
||||
$lang->zanode->apiError['-10100'] = '执行节点不存在';
|
||||
$lang->zanode->apiError['fail'] = '执行失败,请检查宿主机和执行节点状态';
|
||||
$lang->zanode->apiError['notRunning'] = '请检查执行节点状态';
|
||||
|
||||
$lang->zanode->publicList[0] = '不共享';
|
||||
$lang->zanode->publicList[1] = '共享';
|
||||
|
||||
@@ -187,6 +187,9 @@ class zanodemodel extends model
|
||||
|
||||
$node = $this->getNodeByID($zanodeID);
|
||||
|
||||
if($node->status != 'running') dao::$errors['name'] = $this->lang->zanode->apiError['notRunning'];
|
||||
if(dao::isError()) return false;
|
||||
|
||||
$newSnapshot = new stdClass();
|
||||
$newSnapshot->host = $node->id;
|
||||
$newSnapshot->name = $data->name;
|
||||
|
||||
@@ -40,10 +40,10 @@
|
||||
$editAttr = $snapshot->status == 'failed' ? 'class="btn disabled"' : "title={$lang->zanode->editSnapshot} onclick='window.parent.editSnapshot(\"" . $this->createLink('zanode', 'editSnapshot', "snapshotID={$snapshot->id}") . "\")' class='btn'";
|
||||
|
||||
$restoreAttr = "title='{$lang->zanode->restoreSnapshot}' target='hiddenwin'";
|
||||
$restoreAttr .= ($node->status !='running' or $snapshot->status == 'restoring' or $snapshot->status == 'failed') ? ' class="btn disabled"' : 'class="btn"';
|
||||
$restoreAttr .= ($node->status !='running' or in_array($snapshot->status, array('creating', 'failed', 'restoring'))) ? ' class="btn disabled"' : 'class="btn"';
|
||||
|
||||
$deleteAttr = "title='{$lang->zanode->deleteSnapshot}' target='hiddenwin'";
|
||||
$deleteAttr .= (($snapshot->status == 'restoring' and (time() - strtotime($snapshot->restoreDate)) <= 600) or $snapshot->status == 'failed') ? ' class="btn disabled"' : 'class="btn"';
|
||||
$deleteAttr .= ($snapshot->status == 'restoring' or $snapshot->status == 'creating') ? ' class="btn disabled"' : 'class="btn"';
|
||||
?>
|
||||
<td title="<?php echo $snapshot->name;?>"><?php echo $snapshot->localName ? $snapshot->localName : $snapshot->name;?></td>
|
||||
<td class='<?php echo $snapshot->status;?>'><?php echo zget($lang->zanode->snapshot->statusList, $snapshot->status, '');?></td>
|
||||
|
||||
Reference in New Issue
Block a user