fix: 批量更新用例的责任人失败

--bug=1008903 --user=陈建星 【功能用例】-批量更新用例的责任人失败 https://www.tapd.cn/55049933/s/1082080
This commit is contained in:
chenjianxing 2021-12-17 14:50:54 +08:00 committed by jianxing
parent eac9557c95
commit cf6c247ca8
7 changed files with 53 additions and 52 deletions

View File

@ -1280,7 +1280,7 @@ public class TestCaseService {
List<TestCaseWithBLOBs> testCases = extTestCaseMapper.getCustomFieldsByIds(ids); List<TestCaseWithBLOBs> testCases = extTestCaseMapper.getCustomFieldsByIds(ids);
testCases.forEach((testCase) -> { testCases.forEach((testCase) -> {
String customFields = testCase.getCustomFields(); String customFields = testCase.getCustomFields();
List<TestCaseBatchRequest.CustomFiledRequest> fields = null; List<TestCaseBatchRequest.CustomFiledRequest> fields;
if (StringUtils.isBlank(customFields)) { if (StringUtils.isBlank(customFields)) {
fields = new ArrayList<>(); fields = new ArrayList<>();
} else { } else {
@ -1289,7 +1289,7 @@ public class TestCaseService {
boolean hasField = false; boolean hasField = false;
for (TestCaseBatchRequest.CustomFiledRequest field : fields) { for (TestCaseBatchRequest.CustomFiledRequest field : fields) {
if (StringUtils.equals(request.getCustomTemplateFieldId(), field.getId())) { if (StringUtils.equals(request.getCustomField().getName(), field.getName())) {
field.setValue(request.getCustomField().getValue()); field.setValue(request.getCustomField().getValue());
hasField = true; hasField = true;
break; break;

View File

@ -9,14 +9,9 @@ ALTER TABLE project
ADD third_part_template tinyint(1) DEFAULT 0 NULL COMMENT '是否使用第三方平台缺陷模板'; ADD third_part_template tinyint(1) DEFAULT 0 NULL COMMENT '是否使用第三方平台缺陷模板';
-- 处理历史数据 -- 处理历史数据
UPDATE issue_template UPDATE issue_template SET platform = 'Local' WHERE platform = 'metersphere';
SET platform = 'Local' UPDATE project p JOIN issue_template it on p.issue_template_id = it.id SET p.platform = it.platform;
WHERE platform = 'metersphere'; UPDATE custom_field SET `type` = 'date' WHERE `type` = 'data';
UPDATE project p JOIN issue_template it
on p.issue_template_id = it.id SET p.platform = it.platform;
UPDATE custom_field
SET `type` = 'date'
WHERE `type` = 'data';
-- 公共用例库 -- 公共用例库
ALTER TABLE project ALTER TABLE project

View File

@ -228,7 +228,7 @@ import MsTableOperatorButton from "../../../common/components/MsTableOperatorBut
import MsTableButton from "../../../common/components/MsTableButton"; import MsTableButton from "../../../common/components/MsTableButton";
import {TEST_CASE_CONFIGS} from "../../../common/components/search/search-components"; import {TEST_CASE_CONFIGS} from "../../../common/components/search/search-components";
import BatchEdit from "./BatchEdit"; import BatchEdit from "./BatchEdit";
import {PROJECT_NAME, TEST_CASE_LIST} from "@/common/js/constants"; import {TEST_CASE_LIST} from "@/common/js/constants";
import StatusTableItem from "@/business/components/track/common/tableItems/planview/StatusTableItem"; import StatusTableItem from "@/business/components/track/common/tableItems/planview/StatusTableItem";
import TestCaseDetail from "./TestCaseDetail"; import TestCaseDetail from "./TestCaseDetail";
import ReviewStatus from "@/business/components/track/case/components/ReviewStatus"; import ReviewStatus from "@/business/components/track/case/components/ReviewStatus";

View File

@ -545,7 +545,7 @@ export function handleMinderIssueDelete(commandName, isPlan) {
} }
}); });
Promise.all(promises).then(() => { Promise.all(promises).then(() => {
success('取消缺陷关联成功'); success(i18n.t('test_track.case.minder_create_tip'));
}); });
return isAllIssue; return isAllIssue;
} }

View File

@ -1744,6 +1744,7 @@ export default {
text_describe_tip: "For simple test scenarios, there are no clear test steps", text_describe_tip: "For simple test scenarios, there are no clear test steps",
change_type: "Change Type", change_type: "Change Type",
minder_create_tip: "failed, unable to create its parent module in minder", minder_create_tip: "failed, unable to create its parent module in minder",
minder_issue_delete_tip: "Successfully cancel the defect association",
check_select: "Please check the case", check_select: "Please check the case",
export_all_cases: 'Are you sure you want to export all use cases?', export_all_cases: 'Are you sure you want to export all use cases?',
input_test_case: 'Please enter the associated case name', input_test_case: 'Please enter the associated case name',

View File

@ -1747,6 +1747,7 @@ export default {
text_describe_tip: "使用于简单的测试场景,没有明确的测试步骤", text_describe_tip: "使用于简单的测试场景,没有明确的测试步骤",
change_type: "更改类型", change_type: "更改类型",
minder_create_tip: "失败, 无法在脑图创建其父模块", minder_create_tip: "失败, 无法在脑图创建其父模块",
minder_issue_delete_tip: "取消缺陷关联成功",
check_select: "请勾选用例", check_select: "请勾选用例",
export_all_cases: '确定要导出全部用例吗?', export_all_cases: '确定要导出全部用例吗?',
input_test_case: '请输入关联用例名称', input_test_case: '请输入关联用例名称',

View File

@ -76,7 +76,7 @@ export default {
update_time: '更新時間', update_time: '更新時間',
delete_time: '刪除時間', delete_time: '刪除時間',
delete_user: '刪除人', delete_user: '刪除人',
delete_user_id:'除人ID', delete_user_id:'除人ID',
add: '添加', add: '添加',
preview: '預覽', preview: '預覽',
member: '成員', member: '成員',
@ -86,7 +86,7 @@ export default {
group: '用戶組', group: '用戶組',
personal_info: '個人信息', personal_info: '個人信息',
api_keys: 'API Keys', api_keys: 'API Keys',
third_account: '第三方平賬號', third_account: '第三方平賬號',
quota: '配額管理', quota: '配額管理',
status: '狀態', status: '狀態',
show_all: '顯示全部', show_all: '顯示全部',
@ -103,12 +103,12 @@ export default {
enable_settings: '啟用設置', enable_settings: '啟用設置',
view_settings: '顯示設置', view_settings: '顯示設置',
functional: '功能測試', functional: '功能測試',
my_workstation: '我的工作臺',
input_content: '請輸入內容', input_content: '請輸入內容',
my_workstation: '我的工作台',
create: '新建', create: '新建',
edit: '編輯', edit: '編輯',
copy: '復製', copy: '復製',
follow: '關', follow: '關',
refresh: '刷新', refresh: '刷新',
remark: '備註', remark: '備註',
delete: '刪除', delete: '刪除',
@ -206,8 +206,8 @@ export default {
run_success: "執行成功", run_success: "執行成功",
run_completed: "執行完成", run_completed: "執行完成",
run_fail: "執行失敗", run_fail: "執行失敗",
follow_success:"關成功", follow_success:"關成功",
cancel_follow_success: "取消關注成功", cancel_follow_success:"取消關註成功",
type: "類型", type: "類型",
relationship: { relationship: {
name: '依賴關系', name: '依賴關系',
@ -224,10 +224,10 @@ export default {
current_case: '本用例', current_case: '本用例',
}, },
generate_test_data: "生成測試數據", generate_test_data: "生成測試數據",
project_setting: '項目設置',
table: { table: {
select_tip: "已選中 {0} 條數據" select_tip: "已選中 {0} 條數據"
}, },
project_setting: '項目設置',
selector: { selector: {
required: "必填", required: "必填",
not_required: "非必填", not_required: "非必填",
@ -366,13 +366,14 @@ export default {
system_project: "項目", system_project: "項目",
user_unit: "人", user_unit: "人",
workspace_unit: "個", workspace_unit: "個",
dash_board:'儀盤', dash_board:'儀盤',
all_project:'全部項目', all_project:'全部項目',
to_be_completed:'待完成', to_be_completed:'待完成',
pending_upgrade:'待更新', pending_upgrade:'待更新',
information:'信息', information:'信息',
nick_name:'稱', nick_name:'稱',
resourceId:'資源ID', resourceId:'資源ID',
level:'級別',
num:'數量', num:'數量',
original_state:'原始狀態', original_state:'原始狀態',
custom_num:'自定義編號', custom_num:'自定義編號',
@ -396,14 +397,14 @@ export default {
expired: '已過期', expired: '已過期',
}, },
workstation:{ workstation:{
dash_board: '我的儀盤', dash_board: '我的儀盤',
upcoming: '我的待辦', upcoming: '我的待辦',
focus: '我的關', focus: '我的關',
creation: '我創建的', creation: '我創建的',
creation_case:'我創建的用例', creation_case:'我創建的用例',
creation_issue:'我創建的缺陷', creation_issue:'我創建的缺陷',
creation_case_tip: '暫時還沒有創建用例,马上創建', creation_case_tip:'暫時還沒有創建用例,馬上創建',
creation_issue_tip:'暫時還沒有創建缺陷,上創建', creation_issue_tip:'暫時還沒有創建缺陷,上創建',
table_name:{ table_name:{
track_case:'功能用例', track_case:'功能用例',
track_plan:'測試計劃', track_plan:'測試計劃',
@ -512,20 +513,20 @@ export default {
env_group: { env_group: {
name: "環境組", name: "環境組",
create: "創建環境組", create: "創建環境組",
not_intact: "項目與環境對應關不完整!", not_intact: "項目與環境對應關不完整!",
cascader_tip: "若環境組中已經包含此次將要加入的項目,則該項目環境將被覆蓋", cascader_tip: "若環境組中已經包含此次將要加入的項目,則該項目環境將被覆蓋",
search_tip: "請輸入名稱搜索環境組", search_tip: "請輸入名稱搜索環境組",
fast_create_tip: "請輸入名稱搜索環境組", fast_create_tip: "請輸入環境組名稱快速創建",
quickly_add: "快速添加", quickly_add: "快速添加",
select: "請選擇環境組", select: "請選擇環境組",
name_not_null: "環境組名不能為空", name_not_null: "環境組名不能為空",
delete: "刪除環境組", delete: "刪除環境組",
please_select_project: "請選擇項目", please_select_project: "請選擇項目",
please_select_env: "請選擇環境", please_select_env: "請選擇環境",
view_details: "請選擇環境", view_details: "查看域名詳情",
domain_list: "域名列表", domain_list: "域名列表",
batch_add_to_ws: "批量添加到環境組", batch_add_to_ws: "批量添加到環境組",
choice_conflict: "環境選擇突,一個項目選擇一個對應環境!", choice_conflict: "環境選擇突,一個項目選擇一個對應環境!",
env_list: "環境列表", env_list: "環境列表",
confirm: "確 定", confirm: "確 定",
please_select_env_for_current_scenario: "請為當前場景選擇一個運行環境!", please_select_env_for_current_scenario: "請為當前場景選擇一個運行環境!",
@ -598,7 +599,7 @@ export default {
input_zentao_request: '請輸入Zentao請求方式', input_zentao_request: '請輸入Zentao請求方式',
input_zentao_url: '請輸入Zentao地址http://xx.xx.xx.xx/zentao/', input_zentao_url: '請輸入Zentao地址http://xx.xx.xx.xx/zentao/',
zentao_info:'禪道信息', zentao_info:'禪道信息',
zentao_account:'禪道賬', zentao_account:'禪道賬',
zentao_password:'禪道密碼', zentao_password:'禪道密碼',
zentao_prompt_information:'該信息為通過禪道提交缺陷的的用戶名、密碼,若未填寫,則使用工作空間中配置的默認信息', zentao_prompt_information:'該信息為通過禪道提交缺陷的的用戶名、密碼,若未填寫,則使用工作空間中配置的默認信息',
use_tip: '使用指引:', use_tip: '使用指引:',
@ -637,7 +638,6 @@ export default {
edit: '編輯項目', edit: '編輯項目',
delete: '刪除項目', delete: '刪除項目',
delete_confirm: '確定要刪除這個項目嗎?', delete_confirm: '確定要刪除這個項目嗎?',
group_permission: '用戶組與許可權',
delete_tip: '刪除該項目,會刪除該項目下所有測試資源,確定要刪除嗎?', delete_tip: '刪除該項目,會刪除該項目下所有測試資源,確定要刪除嗎?',
file_delete_tip: '刪除該項目的文件: {0}', file_delete_tip: '刪除該項目的文件: {0}',
search_by_name: '根據名稱搜索', search_by_name: '根據名稱搜索',
@ -655,10 +655,12 @@ export default {
azureDevops_info: 'AzureDevops 信息', azureDevops_info: 'AzureDevops 信息',
azureDevops_tip: '該信息為通過Azure Devops提交缺陷的用戶令牌信息若未填寫則使用工作空間中配置的默認信息', azureDevops_tip: '該信息為通過Azure Devops提交缺陷的用戶令牌信息若未填寫則使用工作空間中配置的默認信息',
manager: '項目管理', manager: '項目管理',
group_permission: '用戶組與權限',
global: '全局',
no_data: '無數據', no_data: '無數據',
select: '選擇項目', select: '選擇項目',
repeatable: '接口定義URL可重復', repeatable: '接口定義URL可重復',
repeatable_info: '接口定義URL可重復 \n 啟用後介面定義重複性校驗將不校驗URL', repeatable_info: '接口定義URL可重復 \n 啟用後接口定義重復性校驗將不校驗URL',
case_public: '公共用例庫', case_public: '公共用例庫',
public_info: '啟動公共用例庫 \n 可以使用公共用例庫數據,也可以自行添加用例至公共用例庫', public_info: '啟動公共用例庫 \n 可以使用公共用例庫數據,也可以自行添加用例至公共用例庫',
upload_file_again: '重新上傳', upload_file_again: '重新上傳',
@ -698,10 +700,10 @@ export default {
creator: '創建人', creator: '創建人',
create_time: '創建時間', create_time: '創建時間',
member_desc: '添加項目成員以及項目成員管理', member_desc: '添加項目成員以及項目成員管理',
group_desc: '添加用戶組與權限以及全局配置',
env_desc: '項目運行環境以及全局配置', env_desc: '項目運行環境以及全局配置',
file_desc: 'jar包以及資源文件管理', file_desc: 'jar包以及資源文件管理',
log_desc: '項目全部操作過程', log_desc: '項目全部操作過程',
group_desc: '添加用戶組與許可權以及全局配置',
code_segment_desc: '自定義代碼片段', code_segment_desc: '自定義代碼片段',
test_case_custom_id: '測試用例自定義ID', test_case_custom_id: '測試用例自定義ID',
test_case_custom_id_info: '測試用例自定義ID \n 用例ID默認為系統自增ID', test_case_custom_id_info: '測試用例自定義ID \n 用例ID默認為系統自增ID',
@ -733,7 +735,7 @@ export default {
no_such_user: '無此用戶信息, 請輸入正確的用戶 ID 或者 用戶郵箱!', no_such_user: '無此用戶信息, 請輸入正確的用戶 ID 或者 用戶郵箱!',
}, },
user: { user: {
id:"用户ID", id:'用戶ID',
create: '創建用戶', create: '創建用戶',
modify: '修改用戶', modify: '修改用戶',
input_name: '請輸入用戶姓名', input_name: '請輸入用戶姓名',
@ -753,8 +755,8 @@ export default {
add_user_role_batch: '批量添加角色', add_user_role_batch: '批量添加角色',
}, },
select_project: '請選擇項目', select_project: '請選擇項目',
select_group: '請選擇用戶組',
select_workspace: '請選擇工作空間', select_workspace: '請選擇工作空間',
select_group: '請選擇用戶組',
add_user_group_batch: '批量添加用戶組', add_user_group_batch: '批量添加用戶組',
add_project_batch: '批量添加到項目', add_project_batch: '批量添加到項目',
add_workspace_batch: "批量添加到工作空間", add_workspace_batch: "批量添加到工作空間",
@ -790,7 +792,7 @@ export default {
permission: '權限', permission: '權限',
please_select_group: '請選擇用戶組', please_select_group: '請選擇用戶組',
global: '全局', global: '全局',
ws_admin_global: '工作空間管理員才可以創建全用戶組' ws_admin_global: '工作空間管理員才可以創建全用戶組'
}, },
role: { role: {
please_choose_role: '請選擇角色', please_choose_role: '請選擇角色',
@ -900,6 +902,7 @@ export default {
resource_strategy: '分配策略', resource_strategy: '分配策略',
run_mode: '執行方式', run_mode: '執行方式',
input_rps_limit: '請輸入限製', input_rps_limit: '請輸入限製',
ramp_up_time: '預熱時間',
ramp_up_time_within: '在', ramp_up_time_within: '在',
ramp_up_time_minutes: '秒內,分', ramp_up_time_minutes: '秒內,分',
ramp_up_time_seconds: '秒內增加並發用戶', ramp_up_time_seconds: '秒內增加並發用戶',
@ -977,7 +980,7 @@ export default {
LatencyChart: '延遲', LatencyChart: '延遲',
BytesThroughputChart: '字節數', BytesThroughputChart: '字節數',
Network: '網絡', Network: '網絡',
url:'路徑', url:'路徑'
}, },
project_file_update_type_error: '更新的文件類型必須一致', project_file_update_type_error: '更新的文件類型必須一致',
add_monitor: '添加監控', add_monitor: '添加監控',
@ -1224,7 +1227,7 @@ export default {
update_time: "最後更新時間", update_time: "最後更新時間",
step: "步驟數", step: "步驟數",
last_result: "最後結果", last_result: "最後結果",
last_result_id:'最後果ID', last_result_id:'最後果ID',
passing_rate: "通過率", passing_rate: "通過率",
success: "通過", success: "通過",
fail: "失敗", fail: "失敗",
@ -1285,7 +1288,6 @@ export default {
common_config: "通用配置", common_config: "通用配置",
http_config: "HTTP配置", http_config: "HTTP配置",
database_config: "數據庫配置", database_config: "數據庫配置",
tips: "Tips: 執行多條SQL語句需配寘allowMultiQueries=true",
tcp_config: "TCP配置", tcp_config: "TCP配置",
import: "導入環境", import: "導入環境",
request_timeout: "鏈接超時", request_timeout: "鏈接超時",
@ -1733,11 +1735,6 @@ export default {
report_statistics: "報告統計", report_statistics: "報告統計",
sort:'種類', sort:'種類',
other_test_name:'其他測試名稱', other_test_name:'其他測試名稱',
demand:{
id:'需求ID',
name:'需求名稱'
},
step_model:'步驟模型',
automatic_status_update:"自動狀態更新", automatic_status_update:"自動狀態更新",
case: { case: {
list: "列表", list: "列表",
@ -1750,6 +1747,7 @@ export default {
text_describe_tip: "使用於簡單的測試場景,沒有明確的測試步驟", text_describe_tip: "使用於簡單的測試場景,沒有明確的測試步驟",
change_type: "更改類型", change_type: "更改類型",
minder_create_tip: "失敗, 無法在腦圖創建其父模塊", minder_create_tip: "失敗, 無法在腦圖創建其父模塊",
minder_issue_delete_tip: "取消缺陷關聯成功",
check_select: "請勾選用例", check_select: "請勾選用例",
export_all_cases: '確定要導出全部用例嗎?', export_all_cases: '確定要導出全部用例嗎?',
input_test_case: '請輸入關聯用例名稱', input_test_case: '請輸入關聯用例名稱',
@ -1807,11 +1805,11 @@ export default {
please_select_attr_value: '請選擇屬性對應的值', please_select_attr_value: '請選擇屬性對應的值',
batch_edit_case: '批量編輯', batch_edit_case: '批量編輯',
batch_move_case: '批量移動', batch_move_case: '批量移動',
batch_copy: '批量複製',
generate_dependencies: '生成依賴關係',
batch_add_public: '批量添加到公共用例庫',
public_warning: '未開啟公共用例庫配寘',
batch_delete_case: '批量刪除', batch_delete_case: '批量刪除',
batch_copy: '批量復製',
batch_add_public: '批量添加到公共用例庫',
public_warning: '未開啟公共庫用例配置',
generate_dependencies: '生成依賴關系',
batch_unlink: '批量取消關聯', batch_unlink: '批量取消關聯',
unlink: '取消關聯', unlink: '取消關聯',
project_name: '所屬項目', project_name: '所屬項目',
@ -1825,7 +1823,7 @@ export default {
upload_tip: "只能上傳jpg、jpeg、png、docx、doc、pdf、xlsx、txt文件", upload_tip: "只能上傳jpg、jpeg、png、docx、doc、pdf、xlsx、txt文件",
attachment: "附件", attachment: "附件",
upload_time: "上傳時間", upload_time: "上傳時間",
total: "用例總數", total:"用例總數",
node_id:"節點ID", node_id:"節點ID",
node_path:"節點路徑", node_path:"節點路徑",
match_rule:"測試用例匹配規則", match_rule:"測試用例匹配規則",
@ -1861,6 +1859,7 @@ export default {
}, },
case_desc: "用例描述", case_desc: "用例描述",
passing_rate:'用例通過率' passing_rate:'用例通過率'
}, },
plan: { plan: {
test_plan: "測試計劃", test_plan: "測試計劃",
@ -1902,9 +1901,9 @@ export default {
scenario_case: "場景測試用例", scenario_case: "場景測試用例",
execute_result: "執行結果", execute_result: "執行結果",
execute_time:'執行時間', execute_time:'執行時間',
is_api_case_executing:"是否行接口用例", is_api_case_executing:"是否行接口用例",
is_scenario_executing:'是否执行场景', is_scenario_executing:'是否執行場景',
is_performance_executing:'是否行性能', is_performance_executing:'是否行性能',
test_plan_test_case_count: "功能用例數", test_plan_test_case_count: "功能用例數",
test_plan_api_case_count: "接口用例數", test_plan_api_case_count: "接口用例數",
test_plan_api_scenario_count: "場景用例數", test_plan_api_scenario_count: "場景用例數",
@ -1921,6 +1920,11 @@ export default {
report_not_found: "報告不存在", report_not_found: "報告不存在",
} }
}, },
demand:{
id:'需求ID',
name:'需求名稱'
},
step_model:'步驟模型',
review: { review: {
test_review: "用例評審", test_review: "用例評審",
create_review: "創建用例評審", create_review: "創建用例評審",