diff --git a/backend/framework/sdk/src/main/resources/i18n/commons_en_US.properties b/backend/framework/sdk/src/main/resources/i18n/commons_en_US.properties index 91d039593e..fb1385589f 100644 --- a/backend/framework/sdk/src/main/resources/i18n/commons_en_US.properties +++ b/backend/framework/sdk/src/main/resources/i18n/commons_en_US.properties @@ -597,4 +597,5 @@ user_view.all_data=All data user_view.my_follow=I followed user_view.my_create=I created user_view.my_review=I review +user_view.archived=Archived user_view_exist=The view already exists \ No newline at end of file diff --git a/backend/framework/sdk/src/main/resources/i18n/commons_zh_CN.properties b/backend/framework/sdk/src/main/resources/i18n/commons_zh_CN.properties index 994f04cde5..72613c2103 100644 --- a/backend/framework/sdk/src/main/resources/i18n/commons_zh_CN.properties +++ b/backend/framework/sdk/src/main/resources/i18n/commons_zh_CN.properties @@ -592,4 +592,5 @@ user_view.all_data=全部数据 user_view.my_follow=我关注的 user_view.my_create=我创建的 user_view.my_review=我评审的 +user_view.archived=已归档 user_view_exist=视图已存在 \ No newline at end of file diff --git a/backend/framework/sdk/src/main/resources/i18n/commons_zh_TW.properties b/backend/framework/sdk/src/main/resources/i18n/commons_zh_TW.properties index ec1f993361..ad2591e573 100644 --- a/backend/framework/sdk/src/main/resources/i18n/commons_zh_TW.properties +++ b/backend/framework/sdk/src/main/resources/i18n/commons_zh_TW.properties @@ -592,4 +592,5 @@ user_view.all_data=全部數據 user_view.my_follow=我關注的 user_view.my_create=我創建的 user_view.my_review=我評審的 +user_view.archived=已歸檔 user_view_exist=視圖已存在 \ No newline at end of file diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/constants/InternalUserView.java b/backend/services/system-setting/src/main/java/io/metersphere/system/constants/InternalUserView.java index 9d34b0321a..d918adce49 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/constants/InternalUserView.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/constants/InternalUserView.java @@ -44,6 +44,15 @@ public enum InternalUserView { condition.setOperator(CombineCondition.CombineConditionOperator.IN.name()); userViewDTO.setConditions(List.of(condition)); return userViewDTO; + }), + ARCHIVED(() -> { + UserViewDTO userViewDTO = getUserViewDTO("archived"); + CombineCondition condition = new CombineCondition(); + condition.setName("archived"); + condition.setValue("ARCHIVED"); + condition.setOperator(CombineCondition.CombineConditionOperator.EQUALS.name()); + userViewDTO.setConditions(List.of(condition)); + return userViewDTO; }); private static UserViewDTO getUserViewDTO(String name) { diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/constants/UserViewType.java b/backend/services/system-setting/src/main/java/io/metersphere/system/constants/UserViewType.java index 9e49c20e9a..06efa5a98c 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/constants/UserViewType.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/constants/UserViewType.java @@ -8,10 +8,9 @@ import java.util.List; /** * @Author: jianxing * @CreateTime: 2024-09-02 10:47 - * + *
* 视图的类型
* 例如:功能用例视图
- *
*/
public enum UserViewType implements ValueEnum {
@@ -54,8 +53,23 @@ public enum UserViewType implements ValueEnum {
PLAN_API_SCENARIO_DRAWER("plan-api-scenario-drawer",
List.of(InternalUserView.ALL_DATA, InternalUserView.MY_CREATE)),
PLAN_BUG_DRAWER("plan-bug-drawer",
- List.of(InternalUserView.ALL_DATA, InternalUserView.MY_CREATE));
+ List.of(InternalUserView.ALL_DATA, InternalUserView.MY_CREATE)),
+ /**
+ * 测试计划列表
+ */
+ TEST_PLAN_ALL("test-plan-all",
+ List.of(InternalUserView.ALL_DATA, InternalUserView.ARCHIVED, InternalUserView.MY_CREATE)),
+ TEST_PLAN("test-plan",
+ List.of(InternalUserView.ALL_DATA, InternalUserView.ARCHIVED, InternalUserView.MY_FOLLOW, InternalUserView.MY_CREATE)),
+ TEST_PLAN_GROUP("test-plan-group",
+ List.of(InternalUserView.ALL_DATA, InternalUserView.ARCHIVED, InternalUserView.MY_CREATE)),
+
+ /**
+ * 测试计划报告
+ */
+ TEST_PLAN_REPORT("test-plan-report",
+ List.of(InternalUserView.ALL_DATA, InternalUserView.MY_CREATE));
private String value;
private List