From afb85d83e007498e2f2a7e1f3ec480762b0e8a50 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 25 Mar 2025 16:45:18 +0800 Subject: [PATCH] * [perf story #72223] Adjust testcase workflow fields. --- db/update21.6.beta.sql | 9 +++++++++ db/zentao.sql | 26 ++++++++++++++------------ 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/db/update21.6.beta.sql b/db/update21.6.beta.sql index a0344dbd04..f79c1dbaad 100644 --- a/db/update21.6.beta.sql +++ b/db/update21.6.beta.sql @@ -3,3 +3,12 @@ REPLACE INTO `zt_workflowaction` (`module`, `action`, `method`, `name`, `type`, ('feedback', 'exporttemplate', 'exporttemplate', '导出模板', 'single', 'different', 'none', 'modal', 'browse', 'normal', 'direct', 0, 1, 'buildin', 0, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, '', 'enable', 'rnd', 'admin', '2025-03-24 14:50:45', '', NULL), ('feedback', 'import', 'import', '导入', 'single', 'different', 'none', 'modal', 'browse', 'normal', 'direct', 0, 1, 'buildin', 0, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, 'enable', 'rnd', 'admin', '2025-03-24 14:50:45', '', NULL), ('feedback', 'showimport', 'showimport', '显示导入内容', 'single', 'different', 'none', 'modal', 'browse', 'normal', 'direct', 0, 1, 'buildin', 0, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, 'enable', 'rnd', 'admin', '2025-03-24 14:50:45', '', NULL); + +INSERT INTO `zt_workflowdatasource` (`type`, `name`, `code`, `buildin`, `vision`, `createdBy`, `createdDate`, `datasource`, `view`, `keyField`, `valueField`) VALUES +('option', '颜色', 'color', '1', 'rnd', 'admin', '1970-01-01 00:00:01', '{"#ef4444":"#ef4444","#f97316":"#f97316","#eab308":"#eab308","#84cc16":"#84cc16","#22c55e":"#22c55e","#14b8a6":"#14b8a6","#0ea5e9":"#0ea5e9","#6366f1":"#6366f1","#a855f7":"#a855f7","#d946ef":"#d946ef","#ec4899":"#ec4899"}', '', '', ''), +('option', '颜色', 'litecolor', '1', 'lite', 'admin', '1970-01-01 00:00:01', '{"#ef4444":"#ef4444","#f97316":"#f97316","#eab308":"#eab308","#84cc16":"#84cc16","#22c55e":"#22c55e","#14b8a6":"#14b8a6","#0ea5e9":"#0ea5e9","#6366f1":"#6366f1","#a855f7":"#a855f7","#d946ef":"#d946ef","#ec4899":"#ec4899"}', '', '', ''); + +UPDATE `zt_workflowfield` SET `control` = 'select', `options` = (SELECT id FROM `zt_workflowdatasource` WHERE `code` = 'color' limit 1) WHERE `module` = 'testcase' AND `field` = 'color'; +UPDATE `zt_workflowfield` SET `control` = 'select', `options` = (SELECT id FROM `zt_workflowdatasource` WHERE `code` = 'bugs' limit 1) WHERE `module` = 'testcase' AND `field` = 'fromBug'; +DELETE FROM `zt_workflowfield` WHERE `module` = 'testcase' AND `field` = 'order'; +DELETE FROM `zt_workflowfield` WHERE `module` = 'testcase' AND `field` = 'frequency'; diff --git a/db/zentao.sql b/db/zentao.sql index 7e444a92a7..70846edda6 100755 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -13633,18 +13633,20 @@ INSERT INTO `zt_workflowdatasource` (`type`, `name`, `code`, `buildin`, `vision` ('lang', '反馈处理方案', 'litefeedbackSolution', '1', 'lite', 'admin', '1970-01-01 00:00:01', 'feedbackSolution', '', '', ''), ('lang', '反馈关闭原因', 'litefeedbackclosedReason', '1', 'lite', 'admin', '1970-01-01 00:00:01', 'feedbackclosedReason', '', '', ''), ('lang', '任务关闭原因', 'litetaskReason', '1', 'lite', 'admin', '1970-01-01 00:00:01', 'taskReason', '', '', ''), -('lang', '工单类型', 'ticketType', '1', 'rnd', 'admin', '1970-01-01 00:00:01', 'ticketType', '', '', ''), -('lang', '工单优先级', 'ticketPri', '1', 'rnd', 'admin', '1970-01-01 00:00:01', 'ticketPri', '', '', ''), -('lang', '工单状态', 'ticketStatus', '1', 'rnd', 'admin', '1970-01-01 00:00:01', 'ticketStatus', '', '', ''), -('sql', '反馈', 'feedbacks', '1', 'rnd', 'admin', '1970-01-01 00:00:01', 'select `id`,`title` from zt_feedback where `deleted`=\'0\'', 'view_datasource_55', 'id', 'title'), -('lang', '需求优先级', 'demandPri', '1', 'or', 'admin', '1970-01-01 00:00:01', 'demandPri', '', '', ''), -('lang', '需求来源', 'demandSource', '1', 'or', 'admin', '1970-01-01 00:00:01', 'demandSource', '', '', ''), -('lang', '需求类别', 'demandCategory', '1', 'or', 'admin', '1970-01-01 00:00:01', 'demandCategory', '', '', ''), -('lang', '需求状态', 'demandStatus', '1', 'or', 'admin', '1970-01-01 00:00:01', 'demandStatus', '', '', ''), -('lang', '需求管理周期', 'demandDuration', '1', 'or', 'admin', '1970-01-01 00:00:01', 'demandDuration', '', '', ''), -('lang', '需求BSA', 'demandBSA', '1', 'or', 'admin', '1970-01-01 00:00:01', 'demandBSA', '', '', ''), -('sql', '用户需求', 'requirements', '1', 'rnd', 'admin', '1970-01-01 00:00:01', 'select `id`,`title` from zt_story where `deleted`=\'0\' and `type`=\'requirement\'', 'view_datasource_3', 'id', 'title'), -('sql', '业务需求', 'epics', '1', 'rnd', 'admin', '1970-01-01 00:00:01', 'select `id`,`title` from zt_story where `deleted`=\'0\' and `type`=\'epic\'', 'view_datasource_2', 'id', 'title'); +('lang', '工单类型', 'ticketType', '1', 'rnd', 'admin', '1970-01-01 00:00:01', 'ticketType', '', '', ''), +('lang', '工单优先级', 'ticketPri', '1', 'rnd', 'admin', '1970-01-01 00:00:01', 'ticketPri', '', '', ''), +('lang', '工单状态', 'ticketStatus', '1', 'rnd', 'admin', '1970-01-01 00:00:01', 'ticketStatus', '', '', ''), +('sql', '反馈', 'feedbacks', '1', 'rnd', 'admin', '1970-01-01 00:00:01', 'select `id`,`title` from zt_feedback where `deleted`=\'0\'', 'view_datasource_55', 'id', 'title'), +('lang', '需求优先级', 'demandPri', '1', 'or', 'admin', '1970-01-01 00:00:01', 'demandPri', '', '', ''), +('lang', '需求来源', 'demandSource', '1', 'or', 'admin', '1970-01-01 00:00:01', 'demandSource', '', '', ''), +('lang', '需求类别', 'demandCategory', '1', 'or', 'admin', '1970-01-01 00:00:01', 'demandCategory', '', '', ''), +('lang', '需求状态', 'demandStatus', '1', 'or', 'admin', '1970-01-01 00:00:01', 'demandStatus', '', '', ''), +('lang', '需求管理周期', 'demandDuration', '1', 'or', 'admin', '1970-01-01 00:00:01', 'demandDuration', '', '', ''), +('lang', '需求BSA', 'demandBSA', '1', 'or', 'admin', '1970-01-01 00:00:01', 'demandBSA', '', '', ''), +('sql', '用户需求', 'requirements', '1', 'rnd', 'admin', '1970-01-01 00:00:01', 'select `id`,`title` from zt_story where `deleted`=\'0\' and `type`=\'requirement\'', 'view_datasource_3', 'id', 'title'), +('sql', '业务需求', 'epics', '1', 'rnd', 'admin', '1970-01-01 00:00:01', 'select `id`,`title` from zt_story where `deleted`=\'0\' and `type`=\'epic\'', 'view_datasource_2', 'id', 'title'), +('option', '颜色', 'color', '1', 'rnd', 'admin', '1970-01-01 00:00:01', '{"#ef4444":"#ef4444","#f97316":"#f97316","#eab308":"#eab308","#84cc16":"#84cc16","#22c55e":"#22c55e","#14b8a6":"#14b8a6","#0ea5e9":"#0ea5e9","#6366f1":"#6366f1","#a855f7":"#a855f7","#d946ef":"#d946ef","#ec4899":"#ec4899"}', '', '', ''), +('option', '颜色', 'litecolor', '1', 'lite', 'admin', '1970-01-01 00:00:01', '{"#ef4444":"#ef4444","#f97316":"#f97316","#eab308":"#eab308","#84cc16":"#84cc16","#22c55e":"#22c55e","#14b8a6":"#14b8a6","#0ea5e9":"#0ea5e9","#6366f1":"#6366f1","#a855f7":"#a855f7","#d946ef":"#d946ef","#ec4899":"#ec4899"}', '', '', ''); DROP VIEW IF EXISTS `view_datasource_2`; DROP VIEW IF EXISTS `view_datasource_3`;