From fc4e67864511bb4586ef512a11316eb1a5daac2a Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Tue, 5 Mar 2024 11:15:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=BC=BA=E9=99=B7=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E7=BC=BA=E9=99=B7=E8=AF=A6=E6=83=85ID=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E6=9C=89=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1036415 --user=宋昌昌 【缺陷管理】缺陷详情-ID展示错误 https://www.tapd.cn/55049933/s/1469203 --- .../bug/dto/response/BugDetailDTO.java | 3 + .../metersphere/bug/service/BugService.java | 1 + .../components/bug-detail-drawer.vue | 78 +++++++++---------- 3 files changed, 43 insertions(+), 39 deletions(-) diff --git a/backend/services/bug-management/src/main/java/io/metersphere/bug/dto/response/BugDetailDTO.java b/backend/services/bug-management/src/main/java/io/metersphere/bug/dto/response/BugDetailDTO.java index 8ed9f05c96..6f6fd8b3a2 100644 --- a/backend/services/bug-management/src/main/java/io/metersphere/bug/dto/response/BugDetailDTO.java +++ b/backend/services/bug-management/src/main/java/io/metersphere/bug/dto/response/BugDetailDTO.java @@ -17,6 +17,9 @@ public class BugDetailDTO { @Size(min = 1, max = 50, message = "{bug.id.length_range}", groups = {Created.class, Updated.class}) private String id; + @Schema(description = "业务ID") + private Integer num; + @Schema(description = "缺陷标题") @Size(min = 1, max = 300, message = "{bug.title.length_range}", groups = {Created.class, Updated.class}) private String title; diff --git a/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugService.java b/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugService.java index 95201488c4..ba70f382c0 100644 --- a/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugService.java +++ b/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugService.java @@ -252,6 +252,7 @@ public class BugService { List allCustomFields = extBugCustomFieldMapper.getBugAllCustomFields(List.of(id), bug.getProjectId()); BugDetailDTO detail = new BugDetailDTO(); detail.setId(id); + detail.setNum(bug.getNum()); detail.setProjectId(bug.getProjectId()); detail.setTemplateId(template.getId()); detail.setPlatformDefault(template.getPlatformDefault()); diff --git a/frontend/src/views/bug-management/components/bug-detail-drawer.vue b/frontend/src/views/bug-management/components/bug-detail-drawer.vue index ad812a80ca..aa80f1a476 100644 --- a/frontend/src/views/bug-management/components/bug-detail-drawer.vue +++ b/frontend/src/views/bug-management/components/bug-detail-drawer.vue @@ -4,7 +4,7 @@ v-model:visible="showDrawerVisible" :width="1200" :footer="false" - :title="t('bugManagement.detail.title', { id: detailInfo?.id, name: detailInfo?.title })" + :title="t('bugManagement.detail.title', { id: detailInfo?.num, name: detailInfo?.title })" :detail-id="props.detailId" :detail-index="props.detailIndex" :get-detail-func="getBugDetail" @@ -159,43 +159,43 @@