diff --git a/framework/sdk-parent/frontend/src/i18n/lang/en-US.js b/framework/sdk-parent/frontend/src/i18n/lang/en-US.js index ce07173313..4f99d2c788 100644 --- a/framework/sdk-parent/frontend/src/i18n/lang/en-US.js +++ b/framework/sdk-parent/frontend/src/i18n/lang/en-US.js @@ -616,6 +616,7 @@ const message = { option_check: 'Please add option values', option_value_check: 'Please fill in the full option values', sync_issue_tips: 'Note: The system will automatically synchronize at 00:00:00 every day', + case_priority_option_check_error: 'Use case levels need to add option values in order, for example: P', }, workspace: { id: 'Workspace ID', diff --git a/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js b/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js index 48b356d588..c6311a4b06 100644 --- a/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js +++ b/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js @@ -622,6 +622,7 @@ const message = { option_check: '请添加选项值', option_value_check: '请填写完整选项值', sync_issue_tips: '注: 系统在每天00:00:00会自动同步一次', + case_priority_option_check_error: '用例等级需按照顺序添加选项值, 例: P', }, workspace: { id: '工作空间ID', diff --git a/framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js b/framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js index a188e0800b..cf8c98f0dc 100644 --- a/framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js +++ b/framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js @@ -619,6 +619,7 @@ const message = { option_check: '請添加選項值', option_value_check: '請填寫完整選項值', sync_issue_tips: '注:系統在每天00:00:00會自動同步一次', + case_priority_option_check_error: '用例等級需按照順序添加選項值, 例: P', }, workspace: { id: '工作空間ID', diff --git a/project-management/frontend/src/business/menu/template/CustomFieldEdit.vue b/project-management/frontend/src/business/menu/template/CustomFieldEdit.vue index 5b249bb058..b6e745f398 100644 --- a/project-management/frontend/src/business/menu/template/CustomFieldEdit.vue +++ b/project-management/frontend/src/business/menu/template/CustomFieldEdit.vue @@ -63,7 +63,6 @@ prop="options" :label-width="labelWidth"> @@ -178,6 +177,14 @@ export default { this.$error("名称不能包含'.'号"); return; } + if (this.form.name === i18n.t('custom_field.case_priority')) { + for (let i = 0; i < this.form.options.length; i++) { + if (this.form.options[i].text !== "P" + i) { + this.$warning(this.$t('custom_field.case_priority_option_check_error') + i); + return; + } + } + } Object.assign(param, this.form); param.projectId = getCurrentProjectID(); if (['select', 'multipleSelect', 'radio', 'checkbox'].indexOf(param.type) > -1) {