diff --git a/project-management/frontend/src/business/menu/template/CustomFieldFormList.vue b/project-management/frontend/src/business/menu/template/CustomFieldFormList.vue
index 6812253d5d..b4e8b65e6c 100644
--- a/project-management/frontend/src/business/menu/template/CustomFieldFormList.vue
+++ b/project-management/frontend/src/business/menu/template/CustomFieldFormList.vue
@@ -43,7 +43,7 @@
width="80"
prop="type">
-
+
diff --git a/project-management/frontend/src/business/menu/template/FieldTemplateEdit.vue b/project-management/frontend/src/business/menu/template/FieldTemplateEdit.vue
index fae66b2f13..68aebdadf7 100644
--- a/project-management/frontend/src/business/menu/template/FieldTemplateEdit.vue
+++ b/project-management/frontend/src/business/menu/template/FieldTemplateEdit.vue
@@ -197,6 +197,9 @@ export default {
this.loading = getCustomFieldTemplates(condition).then((response) => {
this.relateFields = response.data;
this.relateFields.forEach(item => {
+ if (item.name === '用例等级' && item.system) {
+ item.disabled = true;
+ }
if (item.options) {
item.options = JSON.parse(item.options);
}
@@ -221,6 +224,10 @@ export default {
this.loading = getCustomFieldDefault(condition).then((response) => {
let data = response.data;
data.forEach(item => {
+ if (item.name === '用例等级' && item.system && item.scene === 'TEST_CASE') {
+ item.required = true;
+ item.disabled = true;
+ }
if (item.id) {
this.templateContainIds.add(item.id);
}
diff --git a/test-track/backend/src/main/resources/db/migration/2.8.0/dml/V10_1__edit_custom_field_test_case_priority_require.sql b/test-track/backend/src/main/resources/db/migration/2.8.0/dml/V10_1__edit_custom_field_test_case_priority_require.sql
new file mode 100644
index 0000000000..6b7b0201fb
--- /dev/null
+++ b/test-track/backend/src/main/resources/db/migration/2.8.0/dml/V10_1__edit_custom_field_test_case_priority_require.sql
@@ -0,0 +1,8 @@
+SET SESSION innodb_lock_wait_timeout = 7200;
+
+-- 修改自定义字段用例等级为必填字段
+UPDATE custom_field_template SET required = 1 WHERE field_id IN (
+ SELECT id FROM custom_field WHERE scene = 'TEST_CASE' AND name = '用例等级' AND `system` is true
+);
+
+SET SESSION innodb_lock_wait_timeout = DEFAULT;
diff --git a/test-track/frontend/src/business/case/components/public/PublicTestCaseList.vue b/test-track/frontend/src/business/case/components/public/PublicTestCaseList.vue
index 5dcd313685..59295b6d98 100644
--- a/test-track/frontend/src/business/case/components/public/PublicTestCaseList.vue
+++ b/test-track/frontend/src/business/case/components/public/PublicTestCaseList.vue
@@ -142,7 +142,7 @@
:fields-width="fieldsWidth"
:label="$t('commons.tag')"
:show-overflow-tooltip="false"
- min-width="80">
+ min-width="180">