diff --git a/backend/framework/plugin/plugin-platform-sdk/src/main/java/io/metersphere/plugin/platform/spi/Platform.java b/backend/framework/plugin/plugin-platform-sdk/src/main/java/io/metersphere/plugin/platform/spi/Platform.java index 89aa3e8317..9676c7d392 100644 --- a/backend/framework/plugin/plugin-platform-sdk/src/main/java/io/metersphere/plugin/platform/spi/Platform.java +++ b/backend/framework/plugin/plugin-platform-sdk/src/main/java/io/metersphere/plugin/platform/spi/Platform.java @@ -69,7 +69,7 @@ public interface Platform extends ExtensionPoint { List getFormOptions(GetOptionRequest optionsRequest); /** - * 获取第三方平台缺陷状态选项 + * 获取第三方平台缺陷状态流选项 * @param projectConfig 项目配置信息 * @param issueKey 缺陷ID * @param previousStatus 当前状态 @@ -78,6 +78,14 @@ public interface Platform extends ExtensionPoint { */ List getStatusTransitions(String projectConfig, String issueKey, String previousStatus) throws Exception; + /** + * 获取第三方平台缺陷状态流结束状态选项 (用于工作台过滤展示, 不实现则默认都展示第三方平台所有状态) + * @param projectConfig 项目配置信息(暂定, 可能其他平台后续需提供服务集成配置信息) + * @return 平台结束状态流选项 + * @throws Exception 获取平台结束状态异常 + */ + List getStatusTransitionsLastSteps(String projectConfig) throws Exception; + /** * 获取第三方平台关联需求列表 * @param request 需求分页查询参数 diff --git a/backend/services/bug-management/src/main/java/io/metersphere/bug/dto/request/BugPageRequest.java b/backend/services/bug-management/src/main/java/io/metersphere/bug/dto/request/BugPageRequest.java index a2f282ce04..08b6d22c2b 100644 --- a/backend/services/bug-management/src/main/java/io/metersphere/bug/dto/request/BugPageRequest.java +++ b/backend/services/bug-management/src/main/java/io/metersphere/bug/dto/request/BugPageRequest.java @@ -17,12 +17,9 @@ public class BugPageRequest extends BasePageRequest { @NotBlank(message = "{bug.project_id.not_blank}") private String projectId; - @Schema(description = "是否回收站") + @Schema(description = "是否回收站, 后台默认设置") private boolean useTrash; - @Schema(description = "是否我的待办, 默认查询全部") - private boolean myTodo = false; - - @Schema(description = "我的待办用户ID, 组合使用: myTodo=true, myTodoUserId=xxx") - private String myTodoUserId; + @Schema(description = "待办参数, 后台默认设置") + private BugTodoRequest todoParam; } diff --git a/backend/services/bug-management/src/main/java/io/metersphere/bug/dto/request/BugTodoRequest.java b/backend/services/bug-management/src/main/java/io/metersphere/bug/dto/request/BugTodoRequest.java new file mode 100644 index 0000000000..9be571a4c7 --- /dev/null +++ b/backend/services/bug-management/src/main/java/io/metersphere/bug/dto/request/BugTodoRequest.java @@ -0,0 +1,31 @@ +package io.metersphere.bug.dto.request; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Builder; +import lombok.Data; + +import java.util.List; + +/** + * @author song-cc-rock + * 缺陷待办参数 + */ +@Data +@Builder +public class BugTodoRequest { + + @Schema(description = "当前用户ID") + private String msUserId; + + @Schema(description = "Local状态结束标识集合") + private List msLastStepStatus; + + @Schema(description = "当前对接平台; 非Local时需要") + private String currentPlatform; + + @Schema(description = "当前对接平台用户ID") + private String platformUser; + + @Schema(description = "对接平台状态结束标识集合") + private List platformLastStatus; +} diff --git a/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugMapper.java b/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugMapper.java index 8a9e0b4f2e..aadc4ac757 100644 --- a/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugMapper.java +++ b/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugMapper.java @@ -28,6 +28,13 @@ public interface ExtBugMapper { @BaseConditionFilter List list(@Param("request") BugPageRequest request, @Param("sort") String sort); + /** + * 获取项目状态流结束标识 + * @param projectId 项目ID + * @return 结束标识集合 + */ + List getLocalLastStepStatusIds(@Param("projectId") String projectId); + /** * 缺陷列表查询 * diff --git a/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugMapper.xml b/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugMapper.xml index 6c92c0d0ea..8a19f2a1dd 100644 --- a/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugMapper.xml +++ b/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugMapper.xml @@ -23,6 +23,11 @@ + +