feat(缺陷管理): 关联用例部分BUG修复

--bug=1036911 --user=宋昌昌 【缺陷管理】缺陷详情-用例-关联用例-搜索框搜索应该支持ID、名称、标签搜索 https://www.tapd.cn/55049933/s/1473917
This commit is contained in:
song-cc-rock 2024-03-13 14:23:44 +08:00 committed by 刘瑞斌
parent 64a8dccc8d
commit e8a8ff5ef0
4 changed files with 8 additions and 3 deletions

View File

@ -12,6 +12,9 @@ public class BugRelateCaseDTO{
@Schema(description = "关联用例ID") @Schema(description = "关联用例ID")
private String relateCaseId; private String relateCaseId;
@Schema(description = "关联用例业务ID")
private String relateCaseNum;
@Schema(description = "关联用例名称") @Schema(description = "关联用例名称")
private String relateCaseName; private String relateCaseName;

View File

@ -44,7 +44,7 @@
</select> </select>
<select id="list" resultType="io.metersphere.bug.dto.response.BugRelateCaseDTO"> <select id="list" resultType="io.metersphere.bug.dto.response.BugRelateCaseDTO">
select brc.id relateId, fc.num relateCaseId, fc.name relateCaseName, fc.project_id projectId, fc.version_id versionId, brc.case_type relateCaseType, select brc.id relateId, fc.id relateCaseId, fc.num relateCaseNum, fc.name relateCaseName, fc.project_id projectId, fc.version_id versionId, brc.case_type relateCaseType,
brc.test_plan_id is not null relatePlanCase, brc.case_id is not null relateCase brc.test_plan_id is not null relatePlanCase, brc.case_id is not null relateCase
from bug_relation_case brc join functional_case fc on (brc.case_id = fc.id or brc.test_plan_case_id = fc.id) from bug_relation_case brc join functional_case fc on (brc.case_id = fc.id or brc.test_plan_case_id = fc.id)
where brc.bug_id = #{request.bugId} and fc.deleted = false where brc.bug_id = #{request.bugId} and fc.deleted = false

View File

@ -748,7 +748,9 @@
<!-- 待补充关联Case弹窗中的高级搜索条件 --> <!-- 待补充关联Case弹窗中的高级搜索条件 -->
<if test="request.keyword != null and request.keyword != ''"> <if test="request.keyword != null and request.keyword != ''">
and ( and (
fc.num like concat('%', #{request.keyword}, '%') or fc.name like concat('%', #{request.keyword}, '%') fc.num like concat('%', #{request.keyword}, '%')
or fc.name like concat('%', #{request.keyword}, '%')
or fc.tags like concat('%', #{request.keyword}, '%')
) )
</if> </if>
<if test="request.moduleIds != null and request.moduleIds.size() > 0"> <if test="request.moduleIds != null and request.moduleIds.size() > 0">

View File

@ -4,7 +4,7 @@
<a-button type="primary" @click="handleSelect">{{ t('caseManagement.featureCase.linkCase') }}</a-button> <a-button type="primary" @click="handleSelect">{{ t('caseManagement.featureCase.linkCase') }}</a-button>
<a-input-search <a-input-search
v-model:model-value="keyword" v-model:model-value="keyword"
:placeholder="t('caseManagement.featureCase.searchByIdAndName')" :placeholder="t('caseManagement.featureCase.searchByNameAndId')"
allow-clear allow-clear
class="mx-[8px] w-[240px]" class="mx-[8px] w-[240px]"
@search="searchCase" @search="searchCase"