refactor: 消息和模版移动到项目下
This commit is contained in:
parent
ae4ccc0e4d
commit
5b104fc009
|
@ -20,17 +20,15 @@ public class CustomField implements Serializable {
|
|||
|
||||
private Boolean global;
|
||||
|
||||
private String workspaceId;
|
||||
|
||||
private Long createTime;
|
||||
|
||||
private Long updateTime;
|
||||
|
||||
private String createUser;
|
||||
|
||||
private String options;
|
||||
private String projectId;
|
||||
|
||||
private String defaultValue;
|
||||
private String options;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -574,76 +574,6 @@ public class CustomFieldExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdIsNull() {
|
||||
addCriterion("workspace_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdIsNotNull() {
|
||||
addCriterion("workspace_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdEqualTo(String value) {
|
||||
addCriterion("workspace_id =", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdNotEqualTo(String value) {
|
||||
addCriterion("workspace_id <>", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdGreaterThan(String value) {
|
||||
addCriterion("workspace_id >", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("workspace_id >=", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdLessThan(String value) {
|
||||
addCriterion("workspace_id <", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("workspace_id <=", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdLike(String value) {
|
||||
addCriterion("workspace_id like", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdNotLike(String value) {
|
||||
addCriterion("workspace_id not like", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdIn(List<String> values) {
|
||||
addCriterion("workspace_id in", values, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdNotIn(List<String> values) {
|
||||
addCriterion("workspace_id not in", values, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdBetween(String value1, String value2) {
|
||||
addCriterion("workspace_id between", value1, value2, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdNotBetween(String value1, String value2) {
|
||||
addCriterion("workspace_id not between", value1, value2, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
|
@ -833,6 +763,76 @@ public class CustomFieldExample {
|
|||
addCriterion("create_user not between", value1, value2, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdIsNull() {
|
||||
addCriterion("project_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdIsNotNull() {
|
||||
addCriterion("project_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdEqualTo(String value) {
|
||||
addCriterion("project_id =", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdNotEqualTo(String value) {
|
||||
addCriterion("project_id <>", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdGreaterThan(String value) {
|
||||
addCriterion("project_id >", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("project_id >=", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdLessThan(String value) {
|
||||
addCriterion("project_id <", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("project_id <=", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdLike(String value) {
|
||||
addCriterion("project_id like", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdNotLike(String value) {
|
||||
addCriterion("project_id not like", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdIn(List<String> values) {
|
||||
addCriterion("project_id in", values, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdNotIn(List<String> values) {
|
||||
addCriterion("project_id not in", values, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdBetween(String value1, String value2) {
|
||||
addCriterion("project_id between", value1, value2, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdNotBetween(String value1, String value2) {
|
||||
addCriterion("project_id not between", value1, value2, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
|
|
@ -20,14 +20,14 @@ public class IssueTemplate implements Serializable {
|
|||
|
||||
private Boolean global;
|
||||
|
||||
private String workspaceId;
|
||||
|
||||
private Long createTime;
|
||||
|
||||
private Long updateTime;
|
||||
|
||||
private String createUser;
|
||||
|
||||
private String projectId;
|
||||
|
||||
private String content;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -574,76 +574,6 @@ public class IssueTemplateExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdIsNull() {
|
||||
addCriterion("workspace_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdIsNotNull() {
|
||||
addCriterion("workspace_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdEqualTo(String value) {
|
||||
addCriterion("workspace_id =", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdNotEqualTo(String value) {
|
||||
addCriterion("workspace_id <>", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdGreaterThan(String value) {
|
||||
addCriterion("workspace_id >", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("workspace_id >=", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdLessThan(String value) {
|
||||
addCriterion("workspace_id <", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("workspace_id <=", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdLike(String value) {
|
||||
addCriterion("workspace_id like", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdNotLike(String value) {
|
||||
addCriterion("workspace_id not like", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdIn(List<String> values) {
|
||||
addCriterion("workspace_id in", values, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdNotIn(List<String> values) {
|
||||
addCriterion("workspace_id not in", values, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdBetween(String value1, String value2) {
|
||||
addCriterion("workspace_id between", value1, value2, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdNotBetween(String value1, String value2) {
|
||||
addCriterion("workspace_id not between", value1, value2, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
|
@ -833,6 +763,76 @@ public class IssueTemplateExample {
|
|||
addCriterion("create_user not between", value1, value2, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdIsNull() {
|
||||
addCriterion("project_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdIsNotNull() {
|
||||
addCriterion("project_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdEqualTo(String value) {
|
||||
addCriterion("project_id =", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdNotEqualTo(String value) {
|
||||
addCriterion("project_id <>", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdGreaterThan(String value) {
|
||||
addCriterion("project_id >", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("project_id >=", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdLessThan(String value) {
|
||||
addCriterion("project_id <", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("project_id <=", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdLike(String value) {
|
||||
addCriterion("project_id like", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdNotLike(String value) {
|
||||
addCriterion("project_id not like", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdIn(List<String> values) {
|
||||
addCriterion("project_id in", values, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdNotIn(List<String> values) {
|
||||
addCriterion("project_id not in", values, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdBetween(String value1, String value2) {
|
||||
addCriterion("project_id between", value1, value2, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdNotBetween(String value1, String value2) {
|
||||
addCriterion("project_id not between", value1, value2, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package io.metersphere.base.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class MessageTask implements Serializable {
|
||||
private String id;
|
||||
|
@ -25,7 +26,7 @@ public class MessageTask implements Serializable {
|
|||
|
||||
private Long createTime;
|
||||
|
||||
private String workspaceId;
|
||||
private String projectId;
|
||||
|
||||
private String template;
|
||||
|
||||
|
|
|
@ -784,73 +784,73 @@ public class MessageTaskExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdIsNull() {
|
||||
addCriterion("workspace_id is null");
|
||||
public Criteria andProjectIdIsNull() {
|
||||
addCriterion("project_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdIsNotNull() {
|
||||
addCriterion("workspace_id is not null");
|
||||
public Criteria andProjectIdIsNotNull() {
|
||||
addCriterion("project_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdEqualTo(String value) {
|
||||
addCriterion("workspace_id =", value, "workspaceId");
|
||||
public Criteria andProjectIdEqualTo(String value) {
|
||||
addCriterion("project_id =", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdNotEqualTo(String value) {
|
||||
addCriterion("workspace_id <>", value, "workspaceId");
|
||||
public Criteria andProjectIdNotEqualTo(String value) {
|
||||
addCriterion("project_id <>", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdGreaterThan(String value) {
|
||||
addCriterion("workspace_id >", value, "workspaceId");
|
||||
public Criteria andProjectIdGreaterThan(String value) {
|
||||
addCriterion("project_id >", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("workspace_id >=", value, "workspaceId");
|
||||
public Criteria andProjectIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("project_id >=", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdLessThan(String value) {
|
||||
addCriterion("workspace_id <", value, "workspaceId");
|
||||
public Criteria andProjectIdLessThan(String value) {
|
||||
addCriterion("project_id <", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("workspace_id <=", value, "workspaceId");
|
||||
public Criteria andProjectIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("project_id <=", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdLike(String value) {
|
||||
addCriterion("workspace_id like", value, "workspaceId");
|
||||
public Criteria andProjectIdLike(String value) {
|
||||
addCriterion("project_id like", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdNotLike(String value) {
|
||||
addCriterion("workspace_id not like", value, "workspaceId");
|
||||
public Criteria andProjectIdNotLike(String value) {
|
||||
addCriterion("project_id not like", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdIn(List<String> values) {
|
||||
addCriterion("workspace_id in", values, "workspaceId");
|
||||
public Criteria andProjectIdIn(List<String> values) {
|
||||
addCriterion("project_id in", values, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdNotIn(List<String> values) {
|
||||
addCriterion("workspace_id not in", values, "workspaceId");
|
||||
public Criteria andProjectIdNotIn(List<String> values) {
|
||||
addCriterion("project_id not in", values, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdBetween(String value1, String value2) {
|
||||
addCriterion("workspace_id between", value1, value2, "workspaceId");
|
||||
public Criteria andProjectIdBetween(String value1, String value2) {
|
||||
addCriterion("project_id between", value1, value2, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdNotBetween(String value1, String value2) {
|
||||
addCriterion("workspace_id not between", value1, value2, "workspaceId");
|
||||
public Criteria andProjectIdNotBetween(String value1, String value2) {
|
||||
addCriterion("project_id not between", value1, value2, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,8 +20,6 @@ public class TestCaseTemplate implements Serializable {
|
|||
|
||||
private Boolean global;
|
||||
|
||||
private String workspaceId;
|
||||
|
||||
private String prerequisite;
|
||||
|
||||
private Long createTime;
|
||||
|
@ -32,5 +30,7 @@ public class TestCaseTemplate implements Serializable {
|
|||
|
||||
private String createUser;
|
||||
|
||||
private String projectId;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -574,76 +574,6 @@ public class TestCaseTemplateExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdIsNull() {
|
||||
addCriterion("workspace_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdIsNotNull() {
|
||||
addCriterion("workspace_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdEqualTo(String value) {
|
||||
addCriterion("workspace_id =", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdNotEqualTo(String value) {
|
||||
addCriterion("workspace_id <>", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdGreaterThan(String value) {
|
||||
addCriterion("workspace_id >", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("workspace_id >=", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdLessThan(String value) {
|
||||
addCriterion("workspace_id <", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("workspace_id <=", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdLike(String value) {
|
||||
addCriterion("workspace_id like", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdNotLike(String value) {
|
||||
addCriterion("workspace_id not like", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdIn(List<String> values) {
|
||||
addCriterion("workspace_id in", values, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdNotIn(List<String> values) {
|
||||
addCriterion("workspace_id not in", values, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdBetween(String value1, String value2) {
|
||||
addCriterion("workspace_id between", value1, value2, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdNotBetween(String value1, String value2) {
|
||||
addCriterion("workspace_id not between", value1, value2, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPrerequisiteIsNull() {
|
||||
addCriterion("prerequisite is null");
|
||||
return (Criteria) this;
|
||||
|
@ -973,6 +903,76 @@ public class TestCaseTemplateExample {
|
|||
addCriterion("create_user not between", value1, value2, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdIsNull() {
|
||||
addCriterion("project_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdIsNotNull() {
|
||||
addCriterion("project_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdEqualTo(String value) {
|
||||
addCriterion("project_id =", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdNotEqualTo(String value) {
|
||||
addCriterion("project_id <>", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdGreaterThan(String value) {
|
||||
addCriterion("project_id >", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("project_id >=", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdLessThan(String value) {
|
||||
addCriterion("project_id <", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("project_id <=", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdLike(String value) {
|
||||
addCriterion("project_id like", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdNotLike(String value) {
|
||||
addCriterion("project_id not like", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdIn(List<String> values) {
|
||||
addCriterion("project_id in", values, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdNotIn(List<String> values) {
|
||||
addCriterion("project_id not in", values, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdBetween(String value1, String value2) {
|
||||
addCriterion("project_id between", value1, value2, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdNotBetween(String value1, String value2) {
|
||||
addCriterion("project_id not between", value1, value2, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="system" jdbcType="BIT" property="system" />
|
||||
<result column="global" jdbcType="BIT" property="global" />
|
||||
<result column="workspace_id" jdbcType="VARCHAR" property="workspaceId" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
|
||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.CustomField">
|
||||
<result column="options" jdbcType="LONGVARCHAR" property="options" />
|
||||
|
@ -76,8 +76,8 @@
|
|||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, `name`, scene, `type`, remark, `system`, `global`, workspace_id, create_time,
|
||||
update_time, create_user
|
||||
id, `name`, scene, `type`, remark, `system`, `global`, create_time, update_time,
|
||||
create_user, project_id
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
`options`
|
||||
|
@ -131,14 +131,14 @@
|
|||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.base.domain.CustomField">
|
||||
insert into custom_field (id, `name`, scene,
|
||||
INSERT INTO custom_field (id, `name`, scene,
|
||||
`type`, remark, `system`, `global`,
|
||||
workspace_id, create_time, update_time,
|
||||
create_user, `options`)
|
||||
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{scene,jdbcType=VARCHAR},
|
||||
create_time, update_time, create_user,
|
||||
project_id, `options`)
|
||||
VALUES (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{scene,jdbcType=VARCHAR},
|
||||
#{type,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{system,jdbcType=BIT}, #{global,jdbcType=BIT},
|
||||
#{workspaceId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||
#{createUser,jdbcType=VARCHAR}, #{options,jdbcType=LONGVARCHAR})
|
||||
#{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR},
|
||||
#{projectId,jdbcType=VARCHAR}, #{options,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.CustomField">
|
||||
insert into custom_field
|
||||
|
@ -164,9 +164,6 @@
|
|||
<if test="global != null">
|
||||
`global`,
|
||||
</if>
|
||||
<if test="workspaceId != null">
|
||||
workspace_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
|
@ -176,6 +173,9 @@
|
|||
<if test="createUser != null">
|
||||
create_user,
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
project_id,
|
||||
</if>
|
||||
<if test="options != null">
|
||||
`options`,
|
||||
</if>
|
||||
|
@ -202,9 +202,6 @@
|
|||
<if test="global != null">
|
||||
#{global,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="workspaceId != null">
|
||||
#{workspaceId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
|
@ -214,6 +211,9 @@
|
|||
<if test="createUser != null">
|
||||
#{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
#{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="options != null">
|
||||
#{options,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -249,9 +249,6 @@
|
|||
<if test="record.global != null">
|
||||
`global` = #{record.global,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.workspaceId != null">
|
||||
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
|
@ -261,6 +258,9 @@
|
|||
<if test="record.createUser != null">
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.projectId != null">
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.options != null">
|
||||
`options` = #{record.options,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -278,10 +278,10 @@
|
|||
remark = #{record.remark,jdbcType=VARCHAR},
|
||||
`system` = #{record.system,jdbcType=BIT},
|
||||
`global` = #{record.global,jdbcType=BIT},
|
||||
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
`options` = #{record.options,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
|
@ -296,10 +296,10 @@
|
|||
remark = #{record.remark,jdbcType=VARCHAR},
|
||||
`system` = #{record.system,jdbcType=BIT},
|
||||
`global` = #{record.global,jdbcType=BIT},
|
||||
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR}
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
|
@ -325,9 +325,6 @@
|
|||
<if test="global != null">
|
||||
`global` = #{global,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="workspaceId != null">
|
||||
workspace_id = #{workspaceId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
|
@ -337,6 +334,9 @@
|
|||
<if test="createUser != null">
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="options != null">
|
||||
`options` = #{options,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -351,25 +351,25 @@
|
|||
remark = #{remark,jdbcType=VARCHAR},
|
||||
`system` = #{system,jdbcType=BIT},
|
||||
`global` = #{global,jdbcType=BIT},
|
||||
workspace_id = #{workspaceId,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
`options` = #{options,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.CustomField">
|
||||
update custom_field
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
UPDATE custom_field
|
||||
SET `name` = #{name,jdbcType=VARCHAR},
|
||||
scene = #{scene,jdbcType=VARCHAR},
|
||||
`type` = #{type,jdbcType=VARCHAR},
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
`system` = #{system,jdbcType=BIT},
|
||||
`global` = #{global,jdbcType=BIT},
|
||||
workspace_id = #{workspaceId,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
create_user = #{createUser,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
project_id = #{projectId,jdbcType=VARCHAR}
|
||||
WHERE id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
|
@ -9,10 +9,10 @@
|
|||
<result column="title" jdbcType="VARCHAR" property="title" />
|
||||
<result column="system" jdbcType="BIT" property="system" />
|
||||
<result column="global" jdbcType="BIT" property="global" />
|
||||
<result column="workspace_id" jdbcType="VARCHAR" property="workspaceId" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
|
||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.IssueTemplate">
|
||||
<result column="content" jdbcType="LONGVARCHAR" property="content" />
|
||||
|
@ -76,8 +76,8 @@
|
|||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, `name`, platform, description, title, `system`, `global`, workspace_id, create_time,
|
||||
update_time, create_user
|
||||
id, `name`, platform, description, title, `system`, `global`, create_time, update_time,
|
||||
create_user, project_id
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
content
|
||||
|
@ -131,15 +131,15 @@
|
|||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.base.domain.IssueTemplate">
|
||||
insert into issue_template (id, `name`, platform,
|
||||
INSERT INTO issue_template (id, `name`, platform,
|
||||
description, title, `system`,
|
||||
`global`, workspace_id, create_time,
|
||||
update_time, create_user, content
|
||||
`global`, create_time, update_time,
|
||||
create_user, project_id, content
|
||||
)
|
||||
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{platform,jdbcType=VARCHAR},
|
||||
VALUES (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{platform,jdbcType=VARCHAR},
|
||||
#{description,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{system,jdbcType=BIT},
|
||||
#{global,jdbcType=BIT}, #{workspaceId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
||||
#{updateTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR}
|
||||
#{global,jdbcType=BIT}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||
#{createUser,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.IssueTemplate">
|
||||
|
@ -166,9 +166,6 @@
|
|||
<if test="global != null">
|
||||
`global`,
|
||||
</if>
|
||||
<if test="workspaceId != null">
|
||||
workspace_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
|
@ -178,6 +175,9 @@
|
|||
<if test="createUser != null">
|
||||
create_user,
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
project_id,
|
||||
</if>
|
||||
<if test="content != null">
|
||||
content,
|
||||
</if>
|
||||
|
@ -204,9 +204,6 @@
|
|||
<if test="global != null">
|
||||
#{global,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="workspaceId != null">
|
||||
#{workspaceId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
|
@ -216,6 +213,9 @@
|
|||
<if test="createUser != null">
|
||||
#{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
#{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="content != null">
|
||||
#{content,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -251,9 +251,6 @@
|
|||
<if test="record.global != null">
|
||||
`global` = #{record.global,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.workspaceId != null">
|
||||
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
|
@ -263,6 +260,9 @@
|
|||
<if test="record.createUser != null">
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.projectId != null">
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.content != null">
|
||||
content = #{record.content,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -280,10 +280,10 @@
|
|||
title = #{record.title,jdbcType=VARCHAR},
|
||||
`system` = #{record.system,jdbcType=BIT},
|
||||
`global` = #{record.global,jdbcType=BIT},
|
||||
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
content = #{record.content,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
|
@ -298,10 +298,10 @@
|
|||
title = #{record.title,jdbcType=VARCHAR},
|
||||
`system` = #{record.system,jdbcType=BIT},
|
||||
`global` = #{record.global,jdbcType=BIT},
|
||||
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR}
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
|
@ -327,9 +327,6 @@
|
|||
<if test="global != null">
|
||||
`global` = #{global,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="workspaceId != null">
|
||||
workspace_id = #{workspaceId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
|
@ -339,6 +336,9 @@
|
|||
<if test="createUser != null">
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="content != null">
|
||||
content = #{content,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -353,25 +353,25 @@
|
|||
title = #{title,jdbcType=VARCHAR},
|
||||
`system` = #{system,jdbcType=BIT},
|
||||
`global` = #{global,jdbcType=BIT},
|
||||
workspace_id = #{workspaceId,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
content = #{content,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.IssueTemplate">
|
||||
update issue_template
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
UPDATE issue_template
|
||||
SET `name` = #{name,jdbcType=VARCHAR},
|
||||
platform = #{platform,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
title = #{title,jdbcType=VARCHAR},
|
||||
`system` = #{system,jdbcType=BIT},
|
||||
`global` = #{global,jdbcType=BIT},
|
||||
workspace_id = #{workspaceId,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
create_user = #{createUser,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
project_id = #{projectId,jdbcType=VARCHAR}
|
||||
WHERE id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
|
@ -12,7 +12,7 @@
|
|||
<result column="is_set" jdbcType="BIT" property="isSet" />
|
||||
<result column="test_id" jdbcType="VARCHAR" property="testId" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="workspace_id" jdbcType="VARCHAR" property="workspaceId" />
|
||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.MessageTask">
|
||||
<result column="template" jdbcType="LONGVARCHAR" property="template" />
|
||||
|
@ -77,7 +77,7 @@
|
|||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, `type`, event, user_id, task_type, webhook, identification, is_set, test_id,
|
||||
create_time, workspace_id
|
||||
create_time, project_id
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
`template`
|
||||
|
@ -131,15 +131,15 @@
|
|||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.base.domain.MessageTask">
|
||||
insert into message_task (id, `type`, event,
|
||||
INSERT INTO message_task (id, `type`, event,
|
||||
user_id, task_type, webhook,
|
||||
identification, is_set, test_id,
|
||||
create_time, workspace_id, `template`
|
||||
create_time, project_id, `template`
|
||||
)
|
||||
values (#{id,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{event,jdbcType=VARCHAR},
|
||||
VALUES (#{id,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{event,jdbcType=VARCHAR},
|
||||
#{userId,jdbcType=VARCHAR}, #{taskType,jdbcType=VARCHAR}, #{webhook,jdbcType=VARCHAR},
|
||||
#{identification,jdbcType=VARCHAR}, #{isSet,jdbcType=BIT}, #{testId,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=BIGINT}, #{workspaceId,jdbcType=VARCHAR}, #{template,jdbcType=LONGVARCHAR}
|
||||
#{createTime,jdbcType=BIGINT}, #{projectId,jdbcType=VARCHAR}, #{template,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.MessageTask">
|
||||
|
@ -175,8 +175,8 @@
|
|||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="workspaceId != null">
|
||||
workspace_id,
|
||||
<if test="projectId != null">
|
||||
project_id,
|
||||
</if>
|
||||
<if test="template != null">
|
||||
`template`,
|
||||
|
@ -213,8 +213,8 @@
|
|||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="workspaceId != null">
|
||||
#{workspaceId,jdbcType=VARCHAR},
|
||||
<if test="projectId != null">
|
||||
#{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="template != null">
|
||||
#{template,jdbcType=LONGVARCHAR},
|
||||
|
@ -260,8 +260,8 @@
|
|||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.workspaceId != null">
|
||||
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
|
||||
<if test="record.projectId != null">
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.template != null">
|
||||
`template` = #{record.template,jdbcType=LONGVARCHAR},
|
||||
|
@ -283,7 +283,7 @@
|
|||
is_set = #{record.isSet,jdbcType=BIT},
|
||||
test_id = #{record.testId,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
`template` = #{record.template,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
|
@ -301,7 +301,7 @@
|
|||
is_set = #{record.isSet,jdbcType=BIT},
|
||||
test_id = #{record.testId,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
workspace_id = #{record.workspaceId,jdbcType=VARCHAR}
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
|
@ -336,8 +336,8 @@
|
|||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="workspaceId != null">
|
||||
workspace_id = #{workspaceId,jdbcType=VARCHAR},
|
||||
<if test="projectId != null">
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="template != null">
|
||||
`template` = #{template,jdbcType=LONGVARCHAR},
|
||||
|
@ -356,7 +356,7 @@
|
|||
is_set = #{isSet,jdbcType=BIT},
|
||||
test_id = #{testId,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
workspace_id = #{workspaceId,jdbcType=VARCHAR},
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
`template` = #{template,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
|
@ -371,7 +371,7 @@
|
|||
is_set = #{isSet,jdbcType=BIT},
|
||||
test_id = #{testId,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
workspace_id = #{workspaceId,jdbcType=VARCHAR}
|
||||
project_id = #{projectId,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
|
@ -9,12 +9,12 @@
|
|||
<result column="case_name" jdbcType="VARCHAR" property="caseName" />
|
||||
<result column="system" jdbcType="BIT" property="system" />
|
||||
<result column="global" jdbcType="BIT" property="global" />
|
||||
<result column="workspace_id" jdbcType="VARCHAR" property="workspaceId" />
|
||||
<result column="prerequisite" jdbcType="VARCHAR" property="prerequisite" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
<result column="step_model" jdbcType="VARCHAR" property="stepModel" />
|
||||
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
|
||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.TestCaseTemplateWithBLOBs">
|
||||
<result column="step_description" jdbcType="LONGVARCHAR" property="stepDescription" />
|
||||
|
@ -81,8 +81,8 @@
|
|||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, `name`, `type`, description, case_name, `system`, `global`, workspace_id, prerequisite,
|
||||
create_time, update_time, step_model, create_user
|
||||
id, `name`, `type`, description, case_name, `system`, `global`, prerequisite, create_time,
|
||||
update_time, step_model, create_user, project_id
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
step_description, expected_result, actual_result, steps
|
||||
|
@ -136,17 +136,17 @@
|
|||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.base.domain.TestCaseTemplateWithBLOBs">
|
||||
insert into test_case_template (id, `name`, `type`,
|
||||
INSERT INTO test_case_template (id, `name`, `type`,
|
||||
description, case_name, `system`,
|
||||
`global`, workspace_id, prerequisite,
|
||||
create_time, update_time, step_model,
|
||||
create_user, step_description, expected_result,
|
||||
`global`, prerequisite, create_time,
|
||||
update_time, step_model, create_user,
|
||||
project_id, step_description, expected_result,
|
||||
actual_result, steps)
|
||||
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
|
||||
VALUES (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
|
||||
#{description,jdbcType=VARCHAR}, #{caseName,jdbcType=VARCHAR}, #{system,jdbcType=BIT},
|
||||
#{global,jdbcType=BIT}, #{workspaceId,jdbcType=VARCHAR}, #{prerequisite,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{stepModel,jdbcType=VARCHAR},
|
||||
#{createUser,jdbcType=VARCHAR}, #{stepDescription,jdbcType=LONGVARCHAR}, #{expectedResult,jdbcType=LONGVARCHAR},
|
||||
#{global,jdbcType=BIT}, #{prerequisite,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
||||
#{updateTime,jdbcType=BIGINT}, #{stepModel,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR},
|
||||
#{projectId,jdbcType=VARCHAR}, #{stepDescription,jdbcType=LONGVARCHAR}, #{expectedResult,jdbcType=LONGVARCHAR},
|
||||
#{actualResult,jdbcType=LONGVARCHAR}, #{steps,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestCaseTemplateWithBLOBs">
|
||||
|
@ -173,9 +173,6 @@
|
|||
<if test="global != null">
|
||||
`global`,
|
||||
</if>
|
||||
<if test="workspaceId != null">
|
||||
workspace_id,
|
||||
</if>
|
||||
<if test="prerequisite != null">
|
||||
prerequisite,
|
||||
</if>
|
||||
|
@ -191,6 +188,9 @@
|
|||
<if test="createUser != null">
|
||||
create_user,
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
project_id,
|
||||
</if>
|
||||
<if test="stepDescription != null">
|
||||
step_description,
|
||||
</if>
|
||||
|
@ -226,9 +226,6 @@
|
|||
<if test="global != null">
|
||||
#{global,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="workspaceId != null">
|
||||
#{workspaceId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="prerequisite != null">
|
||||
#{prerequisite,jdbcType=VARCHAR},
|
||||
</if>
|
||||
|
@ -244,6 +241,9 @@
|
|||
<if test="createUser != null">
|
||||
#{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
#{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="stepDescription != null">
|
||||
#{stepDescription,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -288,9 +288,6 @@
|
|||
<if test="record.global != null">
|
||||
`global` = #{record.global,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.workspaceId != null">
|
||||
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.prerequisite != null">
|
||||
prerequisite = #{record.prerequisite,jdbcType=VARCHAR},
|
||||
</if>
|
||||
|
@ -306,6 +303,9 @@
|
|||
<if test="record.createUser != null">
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.projectId != null">
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.stepDescription != null">
|
||||
step_description = #{record.stepDescription,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -332,12 +332,12 @@
|
|||
case_name = #{record.caseName,jdbcType=VARCHAR},
|
||||
`system` = #{record.system,jdbcType=BIT},
|
||||
`global` = #{record.global,jdbcType=BIT},
|
||||
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
|
||||
prerequisite = #{record.prerequisite,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
step_model = #{record.stepModel,jdbcType=VARCHAR},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
step_description = #{record.stepDescription,jdbcType=LONGVARCHAR},
|
||||
expected_result = #{record.expectedResult,jdbcType=LONGVARCHAR},
|
||||
actual_result = #{record.actualResult,jdbcType=LONGVARCHAR},
|
||||
|
@ -355,12 +355,12 @@
|
|||
case_name = #{record.caseName,jdbcType=VARCHAR},
|
||||
`system` = #{record.system,jdbcType=BIT},
|
||||
`global` = #{record.global,jdbcType=BIT},
|
||||
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
|
||||
prerequisite = #{record.prerequisite,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
step_model = #{record.stepModel,jdbcType=VARCHAR},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR}
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
|
@ -386,9 +386,6 @@
|
|||
<if test="global != null">
|
||||
`global` = #{global,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="workspaceId != null">
|
||||
workspace_id = #{workspaceId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="prerequisite != null">
|
||||
prerequisite = #{prerequisite,jdbcType=VARCHAR},
|
||||
</if>
|
||||
|
@ -404,6 +401,9 @@
|
|||
<if test="createUser != null">
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="stepDescription != null">
|
||||
step_description = #{stepDescription,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -427,12 +427,12 @@
|
|||
case_name = #{caseName,jdbcType=VARCHAR},
|
||||
`system` = #{system,jdbcType=BIT},
|
||||
`global` = #{global,jdbcType=BIT},
|
||||
workspace_id = #{workspaceId,jdbcType=VARCHAR},
|
||||
prerequisite = #{prerequisite,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
step_model = #{stepModel,jdbcType=VARCHAR},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
step_description = #{stepDescription,jdbcType=LONGVARCHAR},
|
||||
expected_result = #{expectedResult,jdbcType=LONGVARCHAR},
|
||||
actual_result = #{actualResult,jdbcType=LONGVARCHAR},
|
||||
|
@ -447,12 +447,12 @@
|
|||
case_name = #{caseName,jdbcType=VARCHAR},
|
||||
`system` = #{system,jdbcType=BIT},
|
||||
`global` = #{global,jdbcType=BIT},
|
||||
workspace_id = #{workspaceId,jdbcType=VARCHAR},
|
||||
prerequisite = #{prerequisite,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
step_model = #{stepModel,jdbcType=VARCHAR},
|
||||
create_user = #{createUser,jdbcType=VARCHAR}
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
project_id = #{projectId,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
|
@ -50,6 +50,19 @@
|
|||
)
|
||||
)
|
||||
</if>
|
||||
<if test="request.projectId != null">
|
||||
and (
|
||||
cf.project_id = #{request.projectId}
|
||||
or (
|
||||
cf.global = 1 and
|
||||
not exists (
|
||||
select id
|
||||
from custom_field cf_child
|
||||
where cf_child.name = cf.name and cf_child.scene = cf.scene and cf_child.global != 1 and cf_child.project_id = #{request.projectId}
|
||||
)
|
||||
)
|
||||
)
|
||||
</if>
|
||||
|
||||
<if test="request.ids != null and request.ids.size() > 0">
|
||||
and cf.id in
|
||||
|
|
|
@ -31,6 +31,19 @@
|
|||
)
|
||||
)
|
||||
</if>
|
||||
<if test="request.projectId != null">
|
||||
and (
|
||||
it.project_id = #{request.projectId}
|
||||
or (
|
||||
it.global = 1 and
|
||||
not exists (
|
||||
select id
|
||||
from issue_template it_child
|
||||
where it_child.name = it.name and it_child.global != 1 and it_child.project_id = #{request.projectId}
|
||||
)
|
||||
)
|
||||
)
|
||||
</if>
|
||||
|
||||
<if test="request.filters != null and request.filters.size() > 0">
|
||||
<foreach collection="request.filters.entrySet()" index="key" item="values">
|
||||
|
|
|
@ -34,7 +34,9 @@ public interface ExtProjectMapper {
|
|||
|
||||
long getProjectMemberSize(@Param("projectId") String projectId);
|
||||
|
||||
List<Project>getProjectByUserId(@Param("userId")String userId);
|
||||
List<Project> getProjectByUserId(@Param("userId") String userId);
|
||||
|
||||
int getProjectPlanBugSize(@Param("projectId") String projectId);
|
||||
|
||||
void setDefaultMessageTask(@Param("projectId") String projectId);
|
||||
}
|
||||
|
|
|
@ -257,4 +257,118 @@
|
|||
and (issues.status != 'closed' or issues.status is null)
|
||||
and test_case.status != 'Trash';
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="setDefaultMessageTask">
|
||||
INSERT INTO message_task (id, type, event, user_id, task_type, webhook, identification, is_set, project_id,
|
||||
test_id, create_time, template)
|
||||
VALUES (UUID(), 'IN_SITE', 'DELETE', 'CREATOR', 'PERFORMANCE_TEST_TASK', '',
|
||||
'ce692111-166b-491a-ae69-f047c31de971', 0,
|
||||
#{projectId}, NULL, 1629686472659, NULL),
|
||||
(UUID(), 'IN_SITE', 'COMPLETE', 'CREATOR', 'REVIEW_TASK',
|
||||
'',
|
||||
'72836b2d-4c2f-4185-95aa-1894c6f0d1c3', 0, #{projectId}, NULL, 1629697096803,
|
||||
NULL),
|
||||
(UUID(), 'IN_SITE', 'CLOSE_SCHEDULE', 'CREATOR', 'TRACK_HOME_TASK', '',
|
||||
'ceb0aeb5-f194-4183-a995-3607a769c61d',
|
||||
0, #{projectId}, NULL, 1629705930753, NULL),
|
||||
(UUID(), 'IN_SITE', 'DELETE', 'CREATOR', 'API_AUTOMATION_TASK', '',
|
||||
'e2865464-0da3-42bc-a041-7d21bd70d339', 0,
|
||||
#{projectId}, NULL, 1629446356866, NULL),
|
||||
(UUID(), 'IN_SITE', 'UPDATE', 'FOLLOW_PEOPLE', 'PERFORMANCE_TEST_TASK', '',
|
||||
'79d7dcdc-68a2-47a2-9ef5-21fdf9bde65c', 0, #{projectId}, NULL, 1629446379928,
|
||||
NULL),
|
||||
(UUID(), 'IN_SITE', 'CLOSE_SCHEDULE', 'CREATOR', 'API_HOME_TASK', '',
|
||||
'dbe5dfcd-927f-4065-93cf-22f33d9570ac', 0,
|
||||
#{projectId}, NULL, 1629446330438, NULL),
|
||||
(UUID(), 'IN_SITE', 'UPDATE', 'FOLLOW_PEOPLE', 'TRACK_TEST_CASE_TASK', '',
|
||||
'3a632784-c73b-4f5f-824c-bdf4fccf6f4d', 0, #{projectId}, NULL, 1629705939795,
|
||||
NULL),
|
||||
(UUID(), 'IN_SITE', 'CASE_UPDATE', 'FOLLOW_PEOPLE', 'API_DEFINITION_TASK', '',
|
||||
'a6a3979a-bd80-414c-a253-06f0364c434f', 0, #{projectId}, NULL, 1629446346104,
|
||||
NULL),
|
||||
(UUID(), 'IN_SITE', 'UPDATE', 'FOLLOW_PEOPLE', 'API_AUTOMATION_TASK', '',
|
||||
'019de091-1a19-4b30-bd5e-23b83bc820fb',
|
||||
0, #{projectId}, NULL, 1629618010742, NULL),
|
||||
(UUID(), 'IN_SITE', 'CASE_UPDATE', 'CREATOR', 'API_DEFINITION_TASK', '',
|
||||
'a6a3979a-bd80-414c-a253-06f0364c434f',
|
||||
0, #{projectId}, NULL, 1629446346104, NULL),
|
||||
(UUID(), 'IN_SITE', 'DELETE', 'CREATOR', 'DEFECT_TASK', '', '66568b56-4f9e-4bf6-8621-7402403368b9', 0,
|
||||
#{projectId}, NULL, 1629446306675, NULL),
|
||||
(UUID(), 'IN_SITE', 'DELETE', 'FOLLOW_PEOPLE', 'PERFORMANCE_TEST_TASK', '',
|
||||
'ce692111-166b-491a-ae69-f047c31de971', 0, #{projectId}, NULL, 1629686472659,
|
||||
NULL),
|
||||
(UUID(), 'IN_SITE', 'UPDATE', 'CREATOR', 'DEFECT_TASK', '', '3a913f72-7cee-4e36-ae1d-0443c7cb5f97', 0,
|
||||
#{projectId}, NULL, 1629699608062, NULL),
|
||||
(UUID(), 'IN_SITE', 'UPDATE', 'FOLLOW_PEOPLE', 'API_DEFINITION_TASK', '',
|
||||
'7ca324cd-7113-412b-8714-5cbe1bffa535',
|
||||
0, #{projectId}, NULL, 1629706088088, NULL),
|
||||
(UUID(), 'IN_SITE', 'CASE_DELETE', 'CREATOR', 'API_DEFINITION_TASK', '',
|
||||
'aeb9d21a-855c-44d3-a715-dfb1bba8ad6c',
|
||||
0, #{projectId}, NULL, 1629446334332, NULL),
|
||||
(UUID(), 'IN_SITE', 'DELETE', 'CREATOR', 'API_REPORT_TASK', '', '4d3309f3-7ab2-492e-b9c9-1127c3e005d1',
|
||||
0,
|
||||
#{projectId}, NULL, 1629446364391, NULL),
|
||||
(UUID(), 'IN_SITE', 'COMMENT', 'CREATOR', 'TRACK_TEST_CASE_TASK', '',
|
||||
'2e8db54f-2d39-42a6-9832-43bb3384e7d5', 0,
|
||||
#{projectId}, NULL, 1629446247833, NULL),
|
||||
(UUID(), 'IN_SITE', 'DELETE', 'CREATOR', 'API_DEFINITION_TASK', '',
|
||||
'90f2be5d-0a71-44f0-a750-f16bf39d690b', 0,
|
||||
#{projectId}, NULL, 1629446338557, NULL),
|
||||
(UUID(), 'IN_SITE', 'DELETE', 'CREATOR', 'PERFORMANCE_REPORT_TASK', '',
|
||||
'4c1bfa4a-b02b-4e8e-bc09-b13613723a11',
|
||||
0, #{projectId}, NULL, 1629446384995, NULL),
|
||||
(UUID(), 'IN_SITE', 'UPDATE', 'CREATOR', 'API_AUTOMATION_TASK', '',
|
||||
'019de091-1a19-4b30-bd5e-23b83bc820fb', 0,
|
||||
#{projectId}, NULL, 1629618010742, NULL),
|
||||
(UUID(), 'IN_SITE', 'COMPLETE', 'CREATOR', 'TEST_PLAN_TASK', '', '86b42beb-a86f-4ff3-a73c-d25112c2f104',
|
||||
0,
|
||||
#{projectId}, NULL, 1629446286106, NULL),
|
||||
(UUID(), 'IN_SITE', 'UPDATE', 'CREATOR', 'PERFORMANCE_TEST_TASK', '',
|
||||
'79d7dcdc-68a2-47a2-9ef5-21fdf9bde65c', 0,
|
||||
#{projectId}, NULL, 1629446379928, NULL),
|
||||
(UUID(), 'IN_SITE', 'UPDATE', 'CREATOR', 'TRACK_TEST_CASE_TASK', '',
|
||||
'3a632784-c73b-4f5f-824c-bdf4fccf6f4d', 0,
|
||||
#{projectId}, NULL, 1629705939795, NULL),
|
||||
(UUID(), 'IN_SITE', 'UPDATE', 'CREATOR', 'API_DEFINITION_TASK', '',
|
||||
'7ca324cd-7113-412b-8714-5cbe1bffa535', 0,
|
||||
#{projectId}, NULL, 1629706088088, NULL),
|
||||
(UUID(), 'IN_SITE', 'DELETE', 'CREATOR', 'TEST_PLAN_TASK', '', '04ea4fbd-a392-4f80-a61c-51d31a302cac', 0,
|
||||
#{projectId}, NULL, 1629446289522, NULL),
|
||||
(UUID(), 'IN_SITE', 'UPDATE', 'CREATOR', 'REVIEW_TASK', '', 'db515209-f864-46d3-a2e5-63db6d1339c3', 0,
|
||||
#{projectId}, NULL, 1629446276516, NULL),
|
||||
(UUID(), 'IN_SITE', 'DELETE', 'CREATOR', 'TRACK_REPORT_TASK', '', 'ea2fee85-8a44-413a-a128-16bfa01ada0d',
|
||||
0,
|
||||
#{projectId}, NULL, 1629283758941, NULL),
|
||||
(UUID(), 'IN_SITE', 'DELETE', 'CREATOR', 'REVIEW_TASK', '', 'f9b1f60b-6dee-48af-8217-0428b27dcbab', 0,
|
||||
#{projectId}, NULL, 1629446272477, NULL),
|
||||
(UUID(), 'IN_SITE', 'DELETE', 'CREATOR', 'TRACK_TEST_CASE_TASK', '',
|
||||
'7c26254e-85e9-4269-be13-a2ffcfe0b9f5', 0,
|
||||
#{projectId}, NULL, 1629446251939, NULL),
|
||||
(UUID(), 'IN_SITE', 'DELETE', 'FOLLOW_PEOPLE', 'TRACK_TEST_CASE_TASK', '',
|
||||
'7c26254e-85e9-4269-be13-a2ffcfe0b9f5', 0, #{projectId}, NULL, 1629446251939,
|
||||
NULL),
|
||||
(UUID(), 'IN_SITE', 'EXECUTE_SUCCESSFUL', 'CREATOR', 'API_DEFINITION_TASK', '',
|
||||
'7efddbdb-2b6c-4425-96a4-0bc2aa9e2cd2', 0, #{projectId}, NULL, 1629775183917,
|
||||
NULL),
|
||||
(UUID(), 'IN_SITE', 'EXECUTE_FAILED', 'CREATOR', 'API_DEFINITION_TASK', '',
|
||||
'e508035c-1318-40ea-9457-0bbe9865f4ce', 0, #{projectId}, NULL, 1629775194857,
|
||||
NULL),
|
||||
(UUID(), 'IN_SITE', 'EXECUTE_COMPLETED', 'CREATOR', 'PERFORMANCE_TEST_TASK', '',
|
||||
'e3db90c6-fb49-4e89-bc25-1d14b5ce94d0', 0, #{projectId}, NULL, 1629790602744,
|
||||
NULL),
|
||||
(UUID(), 'IN_SITE', 'EXECUTE_FAILED', 'CREATOR', 'API_AUTOMATION_TASK', '',
|
||||
'c25930e8-b617-45f7-af5e-cc94adc14192', 0, #{projectId}, NULL, 1629780485724,
|
||||
NULL),
|
||||
(UUID(), 'IN_SITE', 'EXECUTE_SUCCESSFUL', 'CREATOR', 'API_AUTOMATION_TASK', '',
|
||||
'9f91e5e5-1744-4160-bfc6-3851bfd59e05', 0, #{projectId}, NULL, 1629780475764,
|
||||
NULL),
|
||||
(UUID(), 'IN_SITE', 'UPDATE', 'PROCESSOR', 'DEFECT_TASK', '',
|
||||
'6cad944e-db8d-4786-9ef3-7d6370940325', 0, #{projectId}, NULL, 1629791388405,
|
||||
NULL),
|
||||
(UUID(), 'IN_SITE', 'CREATE', 'PROCESSOR', 'DEFECT_TASK', '',
|
||||
'4a890e41-e755-44fc-b734-d6a0ca25a65c', 0, #{projectId}, NULL, 1629790487682,
|
||||
NULL)
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -30,6 +30,19 @@
|
|||
)
|
||||
)
|
||||
</if>
|
||||
<if test="request.projectId != null">
|
||||
and (
|
||||
tcft.project_id = #{request.projectId}
|
||||
or (
|
||||
tcft.global = 1 and
|
||||
not exists (
|
||||
select id
|
||||
from test_case_template tcft_child
|
||||
where tcft_child.name = tcft.name and tcft_child.global != 1 and tcft_child.project_id = #{request.projectId}
|
||||
)
|
||||
)
|
||||
)
|
||||
</if>
|
||||
|
||||
<if test="request.filters != null and request.filters.size() > 0">
|
||||
<foreach collection="request.filters.entrySet()" index="key" item="values">
|
||||
|
|
|
@ -11,7 +11,5 @@ public interface ExtWorkspaceMapper {
|
|||
|
||||
List<WorkspaceDTO> getWorkspaces(@Param("request") WorkspaceRequest request);
|
||||
|
||||
void setDefaultMessageTask(@Param("workspaceId") String workspaceId);
|
||||
|
||||
List<Workspace> getWorkspaceByUserId(@Param("userId")String userId);
|
||||
}
|
||||
|
|
|
@ -13,118 +13,6 @@
|
|||
order by w.update_time desc
|
||||
</select>
|
||||
|
||||
<insert id="setDefaultMessageTask">
|
||||
INSERT INTO message_task (id, type, event, user_id, task_type, webhook, identification, is_set, workspace_id,
|
||||
test_id, create_time, template)
|
||||
VALUES (UUID(), 'IN_SITE', 'DELETE', 'CREATOR', 'PERFORMANCE_TEST_TASK', '',
|
||||
'ce692111-166b-491a-ae69-f047c31de971', 0,
|
||||
#{workspaceId}, NULL, 1629686472659, NULL),
|
||||
(UUID(), 'IN_SITE', 'COMPLETE', 'CREATOR', 'REVIEW_TASK',
|
||||
'',
|
||||
'72836b2d-4c2f-4185-95aa-1894c6f0d1c3', 0, #{workspaceId}, NULL, 1629697096803,
|
||||
NULL),
|
||||
(UUID(), 'IN_SITE', 'CLOSE_SCHEDULE', 'CREATOR', 'TRACK_HOME_TASK', '',
|
||||
'ceb0aeb5-f194-4183-a995-3607a769c61d',
|
||||
0, #{workspaceId}, NULL, 1629705930753, NULL),
|
||||
(UUID(), 'IN_SITE', 'DELETE', 'CREATOR', 'API_AUTOMATION_TASK', '',
|
||||
'e2865464-0da3-42bc-a041-7d21bd70d339', 0,
|
||||
#{workspaceId}, NULL, 1629446356866, NULL),
|
||||
(UUID(), 'IN_SITE', 'UPDATE', 'FOLLOW_PEOPLE', 'PERFORMANCE_TEST_TASK', '',
|
||||
'79d7dcdc-68a2-47a2-9ef5-21fdf9bde65c', 0, #{workspaceId}, NULL, 1629446379928,
|
||||
NULL),
|
||||
(UUID(), 'IN_SITE', 'CLOSE_SCHEDULE', 'CREATOR', 'API_HOME_TASK', '',
|
||||
'dbe5dfcd-927f-4065-93cf-22f33d9570ac', 0,
|
||||
#{workspaceId}, NULL, 1629446330438, NULL),
|
||||
(UUID(), 'IN_SITE', 'UPDATE', 'FOLLOW_PEOPLE', 'TRACK_TEST_CASE_TASK', '',
|
||||
'3a632784-c73b-4f5f-824c-bdf4fccf6f4d', 0, #{workspaceId}, NULL, 1629705939795,
|
||||
NULL),
|
||||
(UUID(), 'IN_SITE', 'CASE_UPDATE', 'FOLLOW_PEOPLE', 'API_DEFINITION_TASK', '',
|
||||
'a6a3979a-bd80-414c-a253-06f0364c434f', 0, #{workspaceId}, NULL, 1629446346104,
|
||||
NULL),
|
||||
(UUID(), 'IN_SITE', 'UPDATE', 'FOLLOW_PEOPLE', 'API_AUTOMATION_TASK', '',
|
||||
'019de091-1a19-4b30-bd5e-23b83bc820fb',
|
||||
0, #{workspaceId}, NULL, 1629618010742, NULL),
|
||||
(UUID(), 'IN_SITE', 'CASE_UPDATE', 'CREATOR', 'API_DEFINITION_TASK', '',
|
||||
'a6a3979a-bd80-414c-a253-06f0364c434f',
|
||||
0, #{workspaceId}, NULL, 1629446346104, NULL),
|
||||
(UUID(), 'IN_SITE', 'DELETE', 'CREATOR', 'DEFECT_TASK', '', '66568b56-4f9e-4bf6-8621-7402403368b9', 0,
|
||||
#{workspaceId}, NULL, 1629446306675, NULL),
|
||||
(UUID(), 'IN_SITE', 'DELETE', 'FOLLOW_PEOPLE', 'PERFORMANCE_TEST_TASK', '',
|
||||
'ce692111-166b-491a-ae69-f047c31de971', 0, #{workspaceId}, NULL, 1629686472659,
|
||||
NULL),
|
||||
(UUID(), 'IN_SITE', 'UPDATE', 'CREATOR', 'DEFECT_TASK', '', '3a913f72-7cee-4e36-ae1d-0443c7cb5f97', 0,
|
||||
#{workspaceId}, NULL, 1629699608062, NULL),
|
||||
(UUID(), 'IN_SITE', 'UPDATE', 'FOLLOW_PEOPLE', 'API_DEFINITION_TASK', '',
|
||||
'7ca324cd-7113-412b-8714-5cbe1bffa535',
|
||||
0, #{workspaceId}, NULL, 1629706088088, NULL),
|
||||
(UUID(), 'IN_SITE', 'CASE_DELETE', 'CREATOR', 'API_DEFINITION_TASK', '',
|
||||
'aeb9d21a-855c-44d3-a715-dfb1bba8ad6c',
|
||||
0, #{workspaceId}, NULL, 1629446334332, NULL),
|
||||
(UUID(), 'IN_SITE', 'DELETE', 'CREATOR', 'API_REPORT_TASK', '', '4d3309f3-7ab2-492e-b9c9-1127c3e005d1',
|
||||
0,
|
||||
#{workspaceId}, NULL, 1629446364391, NULL),
|
||||
(UUID(), 'IN_SITE', 'COMMENT', 'CREATOR', 'TRACK_TEST_CASE_TASK', '',
|
||||
'2e8db54f-2d39-42a6-9832-43bb3384e7d5', 0,
|
||||
#{workspaceId}, NULL, 1629446247833, NULL),
|
||||
(UUID(), 'IN_SITE', 'DELETE', 'CREATOR', 'API_DEFINITION_TASK', '',
|
||||
'90f2be5d-0a71-44f0-a750-f16bf39d690b', 0,
|
||||
#{workspaceId}, NULL, 1629446338557, NULL),
|
||||
(UUID(), 'IN_SITE', 'DELETE', 'CREATOR', 'PERFORMANCE_REPORT_TASK', '',
|
||||
'4c1bfa4a-b02b-4e8e-bc09-b13613723a11',
|
||||
0, #{workspaceId}, NULL, 1629446384995, NULL),
|
||||
(UUID(), 'IN_SITE', 'UPDATE', 'CREATOR', 'API_AUTOMATION_TASK', '',
|
||||
'019de091-1a19-4b30-bd5e-23b83bc820fb', 0,
|
||||
#{workspaceId}, NULL, 1629618010742, NULL),
|
||||
(UUID(), 'IN_SITE', 'COMPLETE', 'CREATOR', 'TEST_PLAN_TASK', '', '86b42beb-a86f-4ff3-a73c-d25112c2f104',
|
||||
0,
|
||||
#{workspaceId}, NULL, 1629446286106, NULL),
|
||||
(UUID(), 'IN_SITE', 'UPDATE', 'CREATOR', 'PERFORMANCE_TEST_TASK', '',
|
||||
'79d7dcdc-68a2-47a2-9ef5-21fdf9bde65c', 0,
|
||||
#{workspaceId}, NULL, 1629446379928, NULL),
|
||||
(UUID(), 'IN_SITE', 'UPDATE', 'CREATOR', 'TRACK_TEST_CASE_TASK', '',
|
||||
'3a632784-c73b-4f5f-824c-bdf4fccf6f4d', 0,
|
||||
#{workspaceId}, NULL, 1629705939795, NULL),
|
||||
(UUID(), 'IN_SITE', 'UPDATE', 'CREATOR', 'API_DEFINITION_TASK', '',
|
||||
'7ca324cd-7113-412b-8714-5cbe1bffa535', 0,
|
||||
#{workspaceId}, NULL, 1629706088088, NULL),
|
||||
(UUID(), 'IN_SITE', 'DELETE', 'CREATOR', 'TEST_PLAN_TASK', '', '04ea4fbd-a392-4f80-a61c-51d31a302cac', 0,
|
||||
#{workspaceId}, NULL, 1629446289522, NULL),
|
||||
(UUID(), 'IN_SITE', 'UPDATE', 'CREATOR', 'REVIEW_TASK', '', 'db515209-f864-46d3-a2e5-63db6d1339c3', 0,
|
||||
#{workspaceId}, NULL, 1629446276516, NULL),
|
||||
(UUID(), 'IN_SITE', 'DELETE', 'CREATOR', 'TRACK_REPORT_TASK', '', 'ea2fee85-8a44-413a-a128-16bfa01ada0d',
|
||||
0,
|
||||
#{workspaceId}, NULL, 1629283758941, NULL),
|
||||
(UUID(), 'IN_SITE', 'DELETE', 'CREATOR', 'REVIEW_TASK', '', 'f9b1f60b-6dee-48af-8217-0428b27dcbab', 0,
|
||||
#{workspaceId}, NULL, 1629446272477, NULL),
|
||||
(UUID(), 'IN_SITE', 'DELETE', 'CREATOR', 'TRACK_TEST_CASE_TASK', '',
|
||||
'7c26254e-85e9-4269-be13-a2ffcfe0b9f5', 0,
|
||||
#{workspaceId}, NULL, 1629446251939, NULL),
|
||||
(UUID(), 'IN_SITE', 'DELETE', 'FOLLOW_PEOPLE', 'TRACK_TEST_CASE_TASK', '',
|
||||
'7c26254e-85e9-4269-be13-a2ffcfe0b9f5', 0, #{workspaceId}, NULL, 1629446251939,
|
||||
NULL),
|
||||
(UUID(), 'IN_SITE', 'EXECUTE_SUCCESSFUL', 'CREATOR', 'API_DEFINITION_TASK', '',
|
||||
'7efddbdb-2b6c-4425-96a4-0bc2aa9e2cd2', 0, #{workspaceId}, NULL, 1629775183917,
|
||||
NULL),
|
||||
(UUID(), 'IN_SITE', 'EXECUTE_FAILED', 'CREATOR', 'API_DEFINITION_TASK', '',
|
||||
'e508035c-1318-40ea-9457-0bbe9865f4ce', 0, #{workspaceId}, NULL, 1629775194857,
|
||||
NULL),
|
||||
(UUID(), 'IN_SITE', 'EXECUTE_COMPLETED', 'CREATOR', 'PERFORMANCE_TEST_TASK', '',
|
||||
'e3db90c6-fb49-4e89-bc25-1d14b5ce94d0', 0, #{workspaceId}, NULL, 1629790602744,
|
||||
NULL),
|
||||
(UUID(), 'IN_SITE', 'EXECUTE_FAILED', 'CREATOR', 'API_AUTOMATION_TASK', '',
|
||||
'c25930e8-b617-45f7-af5e-cc94adc14192', 0, #{workspaceId}, NULL, 1629780485724,
|
||||
NULL),
|
||||
(UUID(), 'IN_SITE', 'EXECUTE_SUCCESSFUL', 'CREATOR', 'API_AUTOMATION_TASK', '',
|
||||
'9f91e5e5-1744-4160-bfc6-3851bfd59e05', 0, #{workspaceId}, NULL, 1629780475764,
|
||||
NULL),
|
||||
(UUID(), 'IN_SITE', 'UPDATE', 'PROCESSOR', 'DEFECT_TASK', '',
|
||||
'6cad944e-db8d-4786-9ef3-7d6370940325', 0, #{workspaceId}, NULL, 1629791388405,
|
||||
NULL),
|
||||
(UUID(), 'IN_SITE', 'CREATE', 'PROCESSOR', 'DEFECT_TASK', '',
|
||||
'4a890e41-e755-44fc-b734-d6a0ca25a65c', 0, #{workspaceId}, NULL, 1629790487682,
|
||||
NULL)
|
||||
</insert>
|
||||
|
||||
<select id="getWorkspaceByUserId" resultType="io.metersphere.base.domain.Workspace">
|
||||
SELECT * from workspace where workspace.id in (SELECT user_group.source_id from user_group where user_group.user_id = #{userId})
|
||||
</select>
|
||||
|
|
|
@ -41,21 +41,12 @@ public class PermissionConstants {
|
|||
|
||||
public static final String WORKSPACE_SERVICE_READ = "WORKSPACE_SERVICE:READ";
|
||||
public static final String WORKSPACE_SERVICE_READ_EDIT = "WORKSPACE_SERVICE:READ+EDIT";
|
||||
public static final String WORKSPACE_MESSAGE_READ = "WORKSPACE_MESSAGE:READ";
|
||||
public static final String WORKSPACE_MESSAGE_READ_EDIT = "WORKSPACE_MESSAGE:READ+EDIT";
|
||||
|
||||
|
||||
public static final String WORKSPACE_USER_READ = "WORKSPACE_USER:READ";
|
||||
public static final String WORKSPACE_USER_READ_CREATE = "WORKSPACE_USER:READ+CREATE";
|
||||
public static final String WORKSPACE_USER_READ_EDIT = "WORKSPACE_USER:READ+EDIT";
|
||||
public static final String WORKSPACE_USER_READ_DELETE = "WORKSPACE_USER:READ+DELETE";
|
||||
|
||||
public static final String WORKSPACE_TEMPLATE_READ = "WORKSPACE_TEMPLATE:READ";
|
||||
public static final String WORKSPACE_TEMPLATE_READ_CASE_TEMPLATE = "WORKSPACE_TEMPLATE:READ+CASE_TEMPLATE";
|
||||
public static final String WORKSPACE_TEMPLATE_READ_ISSUE_TEMPLATE = "WORKSPACE_TEMPLATE:READ+ISSUE_TEMPLATE";
|
||||
public static final String WORKSPACE_TEMPLATE_READ_CUSTOM = "WORKSPACE_TEMPLATE:READ+CUSTOM";
|
||||
public static final String WORKSPACE_TEMPLATE_READ_REPORT_TEMPLATE = "WORKSPACE_TEMPLATE:READ+REPORT_TEMPLATE";
|
||||
|
||||
public static final String WORKSPACE_PROJECT_MANAGER_READ = "WORKSPACE_PROJECT_MANAGER:READ";
|
||||
public static final String WORKSPACE_PROJECT_MANAGER_READ_CREATE = "WORKSPACE_PROJECT_MANAGER:READ+CREATE";
|
||||
public static final String WORKSPACE_PROJECT_MANAGER_READ_EDIT = "WORKSPACE_PROJECT_MANAGER:READ+EDIT";
|
||||
|
@ -184,4 +175,12 @@ public class PermissionConstants {
|
|||
public static final String PROJECT_ERROR_REPORT_LIBRARY_DELETE = "PROJECT_ERROR_REPORT_LIBRARY:READ+DELETE";
|
||||
public static final String PROJECT_ERROR_REPORT_LIBRARY_COPY = "PROJECT_ERROR_REPORT_LIBRARY:READ+COPY";
|
||||
public static final String PROJECT_ERROR_REPORT_LIBRARY_SCHEDULE = "PROJECT_ERROR_REPORT_LIBRARY:READ+SCHEDULE";
|
||||
|
||||
public static final String PROJECT_MESSAGE_READ = "PROJECT_MESSAGE:READ";
|
||||
public static final String PROJECT_MESSAGE_READ_EDIT = "PROJECT_MESSAGE:READ+EDIT";
|
||||
public static final String PROJECT_TEMPLATE_READ = "PROJECT_TEMPLATE:READ";
|
||||
public static final String PROJECT_TEMPLATE_READ_CASE_TEMPLATE = "PROJECT_TEMPLATE:READ+CASE_TEMPLATE";
|
||||
public static final String PROJECT_TEMPLATE_READ_ISSUE_TEMPLATE = "PROJECT_TEMPLATE:READ+ISSUE_TEMPLATE";
|
||||
public static final String PROJECT_TEMPLATE_READ_CUSTOM = "PROJECT_TEMPLATE:READ+CUSTOM";
|
||||
public static final String PROJECT_TEMPLATE_READ_REPORT_TEMPLATE = "PROJECT_TEMPLATE:READ+REPORT_TEMPLATE";
|
||||
}
|
||||
|
|
|
@ -48,9 +48,9 @@ public class IssueTemplateController {
|
|||
issueTemplateService.update(request);
|
||||
}
|
||||
|
||||
@GetMapping("/option/{workspaceId}")
|
||||
public List<IssueTemplate> list(@PathVariable String workspaceId) {
|
||||
return issueTemplateService.getOption(workspaceId);
|
||||
@GetMapping("/option/{projectId}")
|
||||
public List<IssueTemplate> list(@PathVariable String projectId) {
|
||||
return issueTemplateService.getOption(projectId);
|
||||
}
|
||||
|
||||
@GetMapping("/get/relate/{projectId}")
|
||||
|
|
|
@ -50,9 +50,9 @@ public class TestCaseTemplateController {
|
|||
testCaseTemplateService.update(request);
|
||||
}
|
||||
|
||||
@GetMapping("/option/{workspaceId}")
|
||||
public List<TestCaseTemplate> list(@PathVariable String workspaceId) {
|
||||
return testCaseTemplateService.getOption(workspaceId);
|
||||
@GetMapping("/option/{projectId}")
|
||||
public List<TestCaseTemplate> list(@PathVariable String projectId) {
|
||||
return testCaseTemplateService.getOption(projectId);
|
||||
}
|
||||
|
||||
@GetMapping("/get/relate/{projectId}")
|
||||
|
|
|
@ -98,7 +98,7 @@ public class NoticeSendService {
|
|||
|
||||
if (StringUtils.equals(triggerMode, NoticeConstants.Mode.API)) {
|
||||
String projectId = (String) noticeModel.getParamMap().get("projectId");
|
||||
messageDetails = noticeService.searchMessageByTypeBySend(NoticeConstants.TaskType.JENKINS_TASK, projectId);
|
||||
messageDetails = noticeService.searchMessageByTypeAndProjectId(NoticeConstants.TaskType.JENKINS_TASK, projectId);
|
||||
}
|
||||
|
||||
// 异步发送通知
|
||||
|
@ -132,7 +132,7 @@ public class NoticeSendService {
|
|||
// default:
|
||||
// break;
|
||||
// }
|
||||
messageDetails = noticeService.searchMessageByTypeAndWorkspaceId(taskType, project.getWorkspaceId());
|
||||
messageDetails = noticeService.searchMessageByTypeAndProjectId(taskType, project.getId());
|
||||
|
||||
// 异步发送通知
|
||||
messageDetails.stream()
|
||||
|
|
|
@ -3,7 +3,6 @@ package io.metersphere.notice.service;
|
|||
import com.alibaba.fastjson.JSON;
|
||||
import io.metersphere.base.domain.MessageTask;
|
||||
import io.metersphere.base.domain.MessageTaskExample;
|
||||
import io.metersphere.base.domain.Project;
|
||||
import io.metersphere.base.mapper.MessageTaskMapper;
|
||||
import io.metersphere.base.mapper.ProjectMapper;
|
||||
import io.metersphere.commons.exception.MSException;
|
||||
|
@ -40,14 +39,14 @@ public class NoticeService {
|
|||
if (messageTaskLists.size() > 0) {
|
||||
delMessage(messageDetail.getIdentification());
|
||||
}
|
||||
String workspaceId = SessionUtils.getCurrentWorkspaceId();
|
||||
String projectId = SessionUtils.getCurrentProjectId();
|
||||
long time = System.currentTimeMillis();
|
||||
String identification = messageDetail.getIdentification();
|
||||
if (StringUtils.isBlank(identification)) {
|
||||
identification = UUID.randomUUID().toString();
|
||||
}
|
||||
for (String userId : messageDetail.getUserIds()) {
|
||||
checkUserIdExist(userId, messageDetail, workspaceId);
|
||||
checkUserIdExist(userId, messageDetail, projectId);
|
||||
MessageTask messageTask = new MessageTask();
|
||||
messageTask.setId(UUID.randomUUID().toString());
|
||||
messageTask.setEvent(messageDetail.getEvent());
|
||||
|
@ -57,7 +56,7 @@ public class NoticeService {
|
|||
messageTask.setWebhook(messageDetail.getWebhook());
|
||||
messageTask.setIdentification(identification);
|
||||
messageTask.setIsSet(false);
|
||||
messageTask.setWorkspaceId(workspaceId);
|
||||
messageTask.setProjectId(projectId);
|
||||
messageTask.setTestId(messageDetail.getTestId());
|
||||
messageTask.setCreateTime(time);
|
||||
setTemplate(messageDetail, messageTask);
|
||||
|
@ -72,7 +71,7 @@ public class NoticeService {
|
|||
}
|
||||
}
|
||||
|
||||
private void checkUserIdExist(String userId, MessageDetail list, String workspaceId) {
|
||||
private void checkUserIdExist(String userId, MessageDetail list, String projectId) {
|
||||
MessageTaskExample example = new MessageTaskExample();
|
||||
if (StringUtils.isBlank(list.getTestId())) {
|
||||
example.createCriteria()
|
||||
|
@ -81,7 +80,7 @@ public class NoticeService {
|
|||
.andTypeEqualTo(list.getType())
|
||||
.andTaskTypeEqualTo(list.getTaskType())
|
||||
.andWebhookEqualTo(list.getWebhook())
|
||||
.andWorkspaceIdEqualTo(workspaceId);
|
||||
.andProjectIdEqualTo(projectId);
|
||||
} else {
|
||||
example.createCriteria()
|
||||
.andUserIdEqualTo(userId)
|
||||
|
@ -90,7 +89,7 @@ public class NoticeService {
|
|||
.andTaskTypeEqualTo(list.getTaskType())
|
||||
.andWebhookEqualTo(list.getWebhook())
|
||||
.andTestIdEqualTo(list.getTestId())
|
||||
.andWorkspaceIdEqualTo(workspaceId);
|
||||
.andProjectIdEqualTo(projectId);
|
||||
}
|
||||
if (messageTaskMapper.countByExample(example) > 0) {
|
||||
MSException.throwException(Translator.get("message_task_already_exists"));
|
||||
|
@ -113,8 +112,8 @@ public class NoticeService {
|
|||
|
||||
public List<MessageDetail> searchMessageByType(String type) {
|
||||
try {
|
||||
String workspaceId = SessionUtils.getCurrentWorkspaceId();
|
||||
return getMessageDetails(type, workspaceId);
|
||||
String projectId = SessionUtils.getCurrentProjectId();
|
||||
return getMessageDetails(type, projectId);
|
||||
} catch (Exception e) {
|
||||
LogUtil.error(e.getMessage(), e);
|
||||
return new ArrayList<>();
|
||||
|
@ -122,38 +121,22 @@ public class NoticeService {
|
|||
}
|
||||
|
||||
|
||||
public List<MessageDetail> searchMessageByTypeAndWorkspaceId(String type, String workspaceId) {
|
||||
public List<MessageDetail> searchMessageByTypeAndProjectId(String type, String projectId) {
|
||||
try {
|
||||
return getMessageDetails(type, workspaceId);
|
||||
return getMessageDetails(type, projectId);
|
||||
} catch (Exception e) {
|
||||
LogUtil.error(e.getMessage(), e);
|
||||
return new ArrayList<>();
|
||||
}
|
||||
}
|
||||
|
||||
public List<MessageDetail> searchMessageByTypeBySend(String type, String projectId) {
|
||||
try {
|
||||
String workspaceId = "";
|
||||
if (null == SessionUtils.getCurrentWorkspaceId()) {
|
||||
Project project = projectMapper.selectByPrimaryKey(projectId);
|
||||
workspaceId = project.getWorkspaceId();
|
||||
} else {
|
||||
workspaceId = SessionUtils.getCurrentWorkspaceId();
|
||||
}
|
||||
return getMessageDetails(type, workspaceId);
|
||||
} catch (Exception e) {
|
||||
LogUtil.error(e.getMessage(), e);
|
||||
return new ArrayList<>();
|
||||
}
|
||||
}
|
||||
|
||||
private List<MessageDetail> getMessageDetails(String type, String workspaceId) {
|
||||
private List<MessageDetail> getMessageDetails(String type, String projectId) {
|
||||
List<MessageDetail> messageDetails = new ArrayList<>();
|
||||
|
||||
MessageTaskExample example = new MessageTaskExample();
|
||||
example.createCriteria()
|
||||
.andTaskTypeEqualTo(type)
|
||||
.andWorkspaceIdEqualTo(workspaceId);
|
||||
.andProjectIdEqualTo(projectId);
|
||||
List<MessageTask> messageTaskLists = messageTaskMapper.selectByExampleWithBLOBs(example);
|
||||
|
||||
Map<String, List<MessageTask>> messageTaskMap = messageTaskLists.stream()
|
||||
|
|
|
@ -153,7 +153,7 @@ public class CustomFieldService {
|
|||
example.createCriteria()
|
||||
.andSystemEqualTo(true)
|
||||
.andSceneEqualTo(request.getScene())
|
||||
.andWorkspaceIdEqualTo(request.getWorkspaceId());
|
||||
.andProjectIdEqualTo(request.getProjectId());
|
||||
List<CustomField> workspaceSystemFields = customFieldMapper.selectByExampleWithBLOBs(example);
|
||||
Set<String> workspaceSystemFieldNames = workspaceSystemFields.stream()
|
||||
.map(CustomField::getName)
|
||||
|
@ -189,7 +189,7 @@ public class CustomFieldService {
|
|||
CustomFieldExample example = new CustomFieldExample();
|
||||
CustomFieldExample.Criteria criteria = example.createCriteria();
|
||||
criteria.andNameEqualTo(customField.getName());
|
||||
criteria.andWorkspaceIdEqualTo(customField.getWorkspaceId());
|
||||
criteria.andProjectIdEqualTo(customField.getProjectId());
|
||||
criteria.andSceneEqualTo(customField.getScene());
|
||||
if (StringUtils.isNotBlank(customField.getId())) {
|
||||
criteria.andIdNotEqualTo(customField.getId());
|
||||
|
|
|
@ -91,7 +91,7 @@ public class IssueTemplateService extends TemplateBaseService {
|
|||
String originId = request.getId();
|
||||
// 如果是全局字段,则创建对应工作空间字段
|
||||
String id = add(request);
|
||||
projectService.updateIssueTemplate(originId, id, request.getWorkspaceId());
|
||||
projectService.updateIssueTemplate(originId, id, request.getProjectId());
|
||||
} else {
|
||||
checkExist(request);
|
||||
customFieldTemplateService.deleteByTemplateId(request.getId());
|
||||
|
@ -108,12 +108,13 @@ public class IssueTemplateService extends TemplateBaseService {
|
|||
* 获取该工作空间的系统模板
|
||||
* - 如果没有,则创建该工作空间模板,并关联默认的字段
|
||||
* - 如果有,则更新原来关联的 fieldId
|
||||
*
|
||||
* @param customField
|
||||
*/
|
||||
public void handleSystemFieldCreate(CustomField customField) {
|
||||
IssueTemplate workspaceSystemTemplate = getWorkspaceSystemTemplate(customField.getWorkspaceId());
|
||||
IssueTemplate workspaceSystemTemplate = getWorkspaceSystemTemplate(customField.getProjectId());
|
||||
if (workspaceSystemTemplate == null) {
|
||||
createTemplateWithUpdateField(customField.getWorkspaceId(), customField);
|
||||
createTemplateWithUpdateField(customField.getProjectId(), customField);
|
||||
} else {
|
||||
updateRelateWithUpdateField(workspaceSystemTemplate, customField);
|
||||
}
|
||||
|
@ -122,7 +123,7 @@ public class IssueTemplateService extends TemplateBaseService {
|
|||
private IssueTemplate getWorkspaceSystemTemplate(String workspaceId) {
|
||||
IssueTemplateExample example = new IssueTemplateExample();
|
||||
example.createCriteria()
|
||||
.andWorkspaceIdEqualTo(workspaceId)
|
||||
.andProjectIdEqualTo(workspaceId)
|
||||
.andSystemEqualTo(true);
|
||||
List<IssueTemplate> issueTemplates = issueTemplateMapper.selectByExampleWithBLOBs(example);
|
||||
if (CollectionUtils.isNotEmpty(issueTemplates)) {
|
||||
|
@ -131,14 +132,14 @@ public class IssueTemplateService extends TemplateBaseService {
|
|||
return null;
|
||||
}
|
||||
|
||||
private void createTemplateWithUpdateField(String workspaceId, CustomField customField) {
|
||||
private void createTemplateWithUpdateField(String projectId, CustomField customField) {
|
||||
UpdateIssueTemplateRequest request = new UpdateIssueTemplateRequest();
|
||||
IssueTemplate issueTemplate = new IssueTemplate();
|
||||
issueTemplate.setName("default");
|
||||
issueTemplate.setPlatform(TemplateConstants.IssueTemplatePlatform.metersphere.name());
|
||||
issueTemplate.setGlobal(false);
|
||||
issueTemplate.setSystem(true);
|
||||
issueTemplate.setWorkspaceId(workspaceId);
|
||||
issueTemplate.setProjectId(projectId);
|
||||
BeanUtils.copyBean(request, issueTemplate);
|
||||
List<CustomFieldTemplate> systemFieldCreateTemplate =
|
||||
customFieldTemplateService.getSystemFieldCreateTemplate(customField, TemplateConstants.FieldTemplateScene.ISSUE.name());
|
||||
|
@ -156,7 +157,7 @@ public class IssueTemplateService extends TemplateBaseService {
|
|||
IssueTemplateExample example = new IssueTemplateExample();
|
||||
IssueTemplateExample.Criteria criteria = example.createCriteria();
|
||||
criteria.andNameEqualTo(issueTemplate.getName())
|
||||
.andWorkspaceIdEqualTo(issueTemplate.getWorkspaceId());
|
||||
.andProjectIdEqualTo(issueTemplate.getProjectId());
|
||||
if (StringUtils.isNotBlank(issueTemplate.getId())) {
|
||||
criteria.andIdNotEqualTo(issueTemplate.getId());
|
||||
}
|
||||
|
@ -166,16 +167,16 @@ public class IssueTemplateService extends TemplateBaseService {
|
|||
}
|
||||
}
|
||||
|
||||
public List<IssueTemplate> getSystemTemplates(String workspaceId) {
|
||||
public List<IssueTemplate> getSystemTemplates(String projectId) {
|
||||
IssueTemplateExample example = new IssueTemplateExample();
|
||||
example.createCriteria().andWorkspaceIdEqualTo(workspaceId)
|
||||
example.createCriteria().andProjectIdEqualTo(projectId)
|
||||
.andSystemEqualTo(true);
|
||||
example.or(example.createCriteria().andGlobalEqualTo(true));
|
||||
List<IssueTemplate> issueTemplates = issueTemplateMapper.selectByExample(example);
|
||||
Iterator<IssueTemplate> iterator = issueTemplates.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
IssueTemplate next = iterator.next();
|
||||
for (IssueTemplate item: issueTemplates) {
|
||||
for (IssueTemplate item : issueTemplates) {
|
||||
if (next.getGlobal() && !item.getGlobal() && StringUtils.equals(item.getName(), next.getName())) {
|
||||
// 如果有工作空间的模板则过滤掉全局模板
|
||||
iterator.remove();
|
||||
|
@ -186,10 +187,10 @@ public class IssueTemplateService extends TemplateBaseService {
|
|||
return issueTemplates;
|
||||
}
|
||||
|
||||
public IssueTemplate getDefaultTemplate(String workspaceId) {
|
||||
public IssueTemplate getDefaultTemplate(String projectId) {
|
||||
IssueTemplateExample example = new IssueTemplateExample();
|
||||
example.createCriteria()
|
||||
.andWorkspaceIdEqualTo(workspaceId)
|
||||
.andProjectIdEqualTo(projectId)
|
||||
.andSystemEqualTo(true);
|
||||
List<IssueTemplate> issueTemplates = issueTemplateMapper.selectByExample(example);
|
||||
if (CollectionUtils.isNotEmpty(issueTemplates)) {
|
||||
|
@ -202,13 +203,13 @@ public class IssueTemplateService extends TemplateBaseService {
|
|||
}
|
||||
}
|
||||
|
||||
public List<IssueTemplate> getOption(String workspaceId) {
|
||||
public List<IssueTemplate> getOption(String projectId) {
|
||||
IssueTemplateExample example = new IssueTemplateExample();
|
||||
example.createCriteria()
|
||||
.andWorkspaceIdEqualTo(workspaceId)
|
||||
.andProjectIdEqualTo(projectId)
|
||||
.andSystemEqualTo(false);
|
||||
List<IssueTemplate> issueTemplates = issueTemplateMapper.selectByExample(example);
|
||||
issueTemplates.addAll(getSystemTemplates(workspaceId));
|
||||
issueTemplates.addAll(getSystemTemplates(projectId));
|
||||
return issueTemplates;
|
||||
}
|
||||
|
||||
|
@ -234,18 +235,18 @@ public class IssueTemplateService extends TemplateBaseService {
|
|||
return issueTemplateDao;
|
||||
}
|
||||
|
||||
public String getLogDetails(String id, List<CustomFieldTemplate>newCustomFieldTemplates) {
|
||||
public String getLogDetails(String id, List<CustomFieldTemplate> newCustomFieldTemplates) {
|
||||
List<DetailColumn> columns = new LinkedList<>();
|
||||
IssueTemplate templateWithBLOBs = issueTemplateMapper.selectByPrimaryKey(id);
|
||||
if(templateWithBLOBs==null){
|
||||
if (templateWithBLOBs == null) {
|
||||
return null;
|
||||
}
|
||||
CustomFieldTemplateExample example = new CustomFieldTemplateExample();
|
||||
example.createCriteria().andTemplateIdEqualTo(templateWithBLOBs.getId());
|
||||
example.createCriteria().andSceneEqualTo("ISSUE");
|
||||
List<CustomFieldTemplate> customFieldTemplates = customFieldTemplateMapper.selectByExample(example);
|
||||
if(newCustomFieldTemplates.size()>customFieldTemplates.size()){
|
||||
for (int i = 0; i < newCustomFieldTemplates.size()-customFieldTemplates.size(); i++) {
|
||||
if (newCustomFieldTemplates.size() > customFieldTemplates.size()) {
|
||||
for (int i = 0; i < newCustomFieldTemplates.size() - customFieldTemplates.size(); i++) {
|
||||
CustomFieldTemplate customFieldTemplate = new CustomFieldTemplate();
|
||||
customFieldTemplates.add(customFieldTemplate);
|
||||
}
|
||||
|
@ -258,7 +259,7 @@ public class IssueTemplateService extends TemplateBaseService {
|
|||
public String getLogDetails(UpdateIssueTemplateRequest request) {
|
||||
List<DetailColumn> columns = new LinkedList<>();
|
||||
IssueTemplate templateWithBLOBs = issueTemplateMapper.selectByPrimaryKey(request.getId());
|
||||
if(templateWithBLOBs==null){
|
||||
if (templateWithBLOBs == null) {
|
||||
return null;
|
||||
}
|
||||
List<CustomFieldTemplate> newCustomFieldTemplates = request.getCustomFields();
|
||||
|
@ -266,8 +267,8 @@ public class IssueTemplateService extends TemplateBaseService {
|
|||
example.createCriteria().andTemplateIdEqualTo(templateWithBLOBs.getId());
|
||||
example.createCriteria().andSceneEqualTo("ISSUE");
|
||||
List<CustomFieldTemplate> customFieldTemplates = customFieldTemplateMapper.selectByExample(example);
|
||||
if(newCustomFieldTemplates.size()<customFieldTemplates.size()){
|
||||
for (int i = 0; i < customFieldTemplates.size()-newCustomFieldTemplates.size(); i++) {
|
||||
if (newCustomFieldTemplates.size() < customFieldTemplates.size()) {
|
||||
for (int i = 0; i < customFieldTemplates.size() - newCustomFieldTemplates.size(); i++) {
|
||||
CustomFieldTemplate customFieldTemplate = new CustomFieldTemplate();
|
||||
newCustomFieldTemplates.add(customFieldTemplate);
|
||||
}
|
||||
|
@ -278,8 +279,10 @@ public class IssueTemplateService extends TemplateBaseService {
|
|||
private String getCustomFieldColums(List<DetailColumn> columns, IssueTemplate templateWithBLOBs, List<CustomFieldTemplate> customFields) {
|
||||
for (CustomFieldTemplate customFieldTemplate : customFields) {
|
||||
CustomField customField = customFieldMapper.selectByPrimaryKey(customFieldTemplate.getFieldId());
|
||||
customField.setDefaultValue(customFieldTemplate.getDefaultValue());
|
||||
List<DetailColumn> columnsField = ReflexObjectUtil.getColumns(customField, SystemReference.issueFieldColumns);
|
||||
CustomFieldDao customFieldDao = new CustomFieldDao();
|
||||
BeanUtils.copyBean(customFieldDao, customField);
|
||||
customFieldDao.setDefaultValue(customFieldTemplate.getDefaultValue());
|
||||
List<DetailColumn> columnsField = ReflexObjectUtil.getColumns(customFieldDao, SystemReference.issueFieldColumns);
|
||||
columns.addAll(columnsField);
|
||||
}
|
||||
List<DetailColumn> columnIssues = ReflexObjectUtil.getColumns(templateWithBLOBs, SystemReference.issueFieldColumns);
|
||||
|
|
|
@ -154,6 +154,9 @@ public class ProjectService {
|
|||
// 创建新项目检查当前用户 last_project_id
|
||||
extUserMapper.updateLastProjectIdIfNull(project.getId(), SessionUtils.getUserId());
|
||||
|
||||
// 设置默认的通知
|
||||
extProjectMapper.setDefaultMessageTask(project.getId());
|
||||
|
||||
ProjectVersionService projectVersionService = CommonBeanFactory.getBean(ProjectVersionService.class);
|
||||
if (projectVersionService != null) {
|
||||
ProjectVersion projectVersion = new ProjectVersion();
|
||||
|
|
|
@ -82,7 +82,7 @@ public class TestCaseTemplateService extends TemplateBaseService {
|
|||
String originId = request.getId();
|
||||
// 如果是全局字段,则创建对应工作空间字段
|
||||
String id = add(request);
|
||||
projectService.updateCaseTemplate(originId, id, request.getWorkspaceId());
|
||||
projectService.updateCaseTemplate(originId, id, request.getProjectId());
|
||||
} else {
|
||||
checkExist(request);
|
||||
customFieldTemplateService.deleteByTemplateId(request.getId());
|
||||
|
@ -102,22 +102,22 @@ public class TestCaseTemplateService extends TemplateBaseService {
|
|||
* @param customField
|
||||
*/
|
||||
public void handleSystemFieldCreate(CustomField customField) {
|
||||
TestCaseTemplateWithBLOBs workspaceSystemTemplate = getWorkspaceSystemTemplate(customField.getWorkspaceId());
|
||||
TestCaseTemplateWithBLOBs workspaceSystemTemplate = getWorkspaceSystemTemplate(customField.getProjectId());
|
||||
if (workspaceSystemTemplate == null) {
|
||||
createTemplateWithUpdateField(customField.getWorkspaceId(), customField);
|
||||
createTemplateWithUpdateField(customField.getProjectId(), customField);
|
||||
} else {
|
||||
updateRelateWithUpdateField(workspaceSystemTemplate, customField);
|
||||
}
|
||||
}
|
||||
|
||||
private void createTemplateWithUpdateField(String workspaceId, CustomField customField) {
|
||||
private void createTemplateWithUpdateField(String projectId, CustomField customField) {
|
||||
UpdateCaseFieldTemplateRequest request = new UpdateCaseFieldTemplateRequest();
|
||||
TestCaseTemplate testCaseTemplate = new TestCaseTemplate();
|
||||
testCaseTemplate.setName("default");
|
||||
testCaseTemplate.setType(TemplateConstants.TestCaseTemplateScene.functional.name());
|
||||
testCaseTemplate.setGlobal(false);
|
||||
testCaseTemplate.setSystem(true);
|
||||
testCaseTemplate.setWorkspaceId(workspaceId);
|
||||
testCaseTemplate.setProjectId(projectId);
|
||||
BeanUtils.copyBean(request, testCaseTemplate);
|
||||
List<CustomFieldTemplate> systemFieldCreateTemplate =
|
||||
customFieldTemplateService.getSystemFieldCreateTemplate(customField, TemplateConstants.FieldTemplateScene.TEST_CASE.name());
|
||||
|
@ -133,7 +133,7 @@ public class TestCaseTemplateService extends TemplateBaseService {
|
|||
private TestCaseTemplateWithBLOBs getWorkspaceSystemTemplate(String workspaceId) {
|
||||
TestCaseTemplateExample example = new TestCaseTemplateExample();
|
||||
example.createCriteria()
|
||||
.andWorkspaceIdEqualTo(workspaceId)
|
||||
.andProjectIdEqualTo(workspaceId)
|
||||
.andSystemEqualTo(true);
|
||||
List<TestCaseTemplateWithBLOBs> testCaseTemplates = testCaseTemplateMapper.selectByExampleWithBLOBs(example);
|
||||
if (CollectionUtils.isNotEmpty(testCaseTemplates)) {
|
||||
|
@ -147,7 +147,7 @@ public class TestCaseTemplateService extends TemplateBaseService {
|
|||
TestCaseTemplateExample example = new TestCaseTemplateExample();
|
||||
TestCaseTemplateExample.Criteria criteria = example.createCriteria();
|
||||
criteria.andNameEqualTo(testCaseTemplate.getName())
|
||||
.andWorkspaceIdEqualTo(testCaseTemplate.getWorkspaceId());
|
||||
.andProjectIdEqualTo(testCaseTemplate.getProjectId());
|
||||
if (StringUtils.isNotBlank(testCaseTemplate.getId())) {
|
||||
criteria.andIdNotEqualTo(testCaseTemplate.getId());
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ public class TestCaseTemplateService extends TemplateBaseService {
|
|||
public TestCaseTemplateWithBLOBs getDefaultTemplate(String workspaceId) {
|
||||
TestCaseTemplateExample example = new TestCaseTemplateExample();
|
||||
example.createCriteria()
|
||||
.andWorkspaceIdEqualTo(workspaceId)
|
||||
.andProjectIdEqualTo(workspaceId)
|
||||
.andSystemEqualTo(true);
|
||||
List<TestCaseTemplateWithBLOBs> testCaseTemplates = testCaseTemplateMapper.selectByExampleWithBLOBs(example);
|
||||
if (CollectionUtils.isNotEmpty(testCaseTemplates)) {
|
||||
|
@ -173,13 +173,13 @@ public class TestCaseTemplateService extends TemplateBaseService {
|
|||
}
|
||||
}
|
||||
|
||||
public List<TestCaseTemplate> getOption(String workspaceId) {
|
||||
public List<TestCaseTemplate> getOption(String projectId) {
|
||||
TestCaseTemplateExample example = new TestCaseTemplateExample();
|
||||
example.createCriteria()
|
||||
.andWorkspaceIdEqualTo(workspaceId)
|
||||
.andProjectIdEqualTo(projectId)
|
||||
.andSystemNotEqualTo(true);
|
||||
List<TestCaseTemplate> testCaseTemplates = testCaseTemplateMapper.selectByExample(example);
|
||||
testCaseTemplates.add(getDefaultTemplate(workspaceId));
|
||||
testCaseTemplates.add(getDefaultTemplate(projectId));
|
||||
return testCaseTemplates;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,10 @@ import io.metersphere.commons.constants.UserGroupType;
|
|||
import io.metersphere.commons.exception.MSException;
|
||||
import io.metersphere.commons.utils.SessionUtils;
|
||||
import io.metersphere.controller.request.WorkspaceRequest;
|
||||
import io.metersphere.dto.*;
|
||||
import io.metersphere.dto.RelatedSource;
|
||||
import io.metersphere.dto.WorkspaceDTO;
|
||||
import io.metersphere.dto.WorkspaceMemberDTO;
|
||||
import io.metersphere.dto.WorkspaceResource;
|
||||
import io.metersphere.i18n.Translator;
|
||||
import io.metersphere.log.utils.ReflexObjectUtil;
|
||||
import io.metersphere.log.vo.DetailColumn;
|
||||
|
@ -82,8 +85,6 @@ public class WorkspaceService {
|
|||
userGroupMapper.insert(userGroup);
|
||||
// 新项目创建新工作空间时设置
|
||||
extUserMapper.updateLastWorkspaceIdIfNull(workspace.getId(), SessionUtils.getUserId());
|
||||
// 设置默认的通知
|
||||
extWorkspaceMapper.setDefaultMessageTask(workspace.getId());
|
||||
} else {
|
||||
workspace.setUpdateTime(currentTime);
|
||||
workspaceMapper.updateByPrimaryKeySelective(workspace);
|
||||
|
@ -216,8 +217,6 @@ public class WorkspaceService {
|
|||
userGroup.setGroupId(UserGroupConstants.WS_ADMIN);
|
||||
userGroup.setSourceId(workspace.getId());
|
||||
userGroupMapper.insert(userGroup);
|
||||
// 设置默认的通知
|
||||
extWorkspaceMapper.setDefaultMessageTask(workspace.getId());
|
||||
return workspace;
|
||||
}
|
||||
|
||||
|
|
|
@ -77,9 +77,9 @@ public class TestPlanController {
|
|||
return testPlanService.listTestAllPlan(request);
|
||||
}
|
||||
|
||||
@GetMapping("/get/stage/option/{workspaceId}")
|
||||
public JSONArray getStageOption(@PathVariable("workspaceId") String workspaceId) {
|
||||
return testPlanService.getStageOption(workspaceId);
|
||||
@GetMapping("/get/stage/option/{projectId}")
|
||||
public JSONArray getStageOption(@PathVariable("projectId") String projectId) {
|
||||
return testPlanService.getStageOption(projectId);
|
||||
}
|
||||
|
||||
@GetMapping("recent/{count}/{id}")
|
||||
|
|
|
@ -1986,10 +1986,10 @@ public class TestPlanService {
|
|||
return testPlanMapper.selectByPrimaryKey(planId).getRepeatCase();
|
||||
}
|
||||
|
||||
public JSONArray getStageOption(String workspaceId) {
|
||||
public JSONArray getStageOption(String projectId) {
|
||||
CustomFieldExample example = new CustomFieldExample();
|
||||
example.createCriteria()
|
||||
.andWorkspaceIdEqualTo(workspaceId)
|
||||
.andProjectIdEqualTo(projectId)
|
||||
.andSceneEqualTo("PLAN")
|
||||
.andNameEqualTo("测试阶段");
|
||||
|
||||
|
|
|
@ -42,3 +42,494 @@ DROP PROCEDURE IF EXISTS project_api_appl;
|
|||
|
||||
ALTER TABLE `api_definition` ADD INDEX methodIndex ( `method` );
|
||||
ALTER TABLE `api_definition` ADD INDEX protocolIndex ( `protocol` );
|
||||
|
||||
|
||||
--
|
||||
ALTER TABLE message_task
|
||||
ADD project_id VARCHAR(64) NULL;
|
||||
|
||||
-- 消息通知去掉工作空间
|
||||
DROP PROCEDURE IF EXISTS message_task_ws;
|
||||
DELIMITER //
|
||||
CREATE PROCEDURE message_task_ws()
|
||||
BEGIN
|
||||
DECLARE userId VARCHAR(64);
|
||||
DECLARE testId VARCHAR(64);
|
||||
DECLARE type VARCHAR(64);
|
||||
DECLARE event VARCHAR(64);
|
||||
DECLARE taskType VARCHAR(64);
|
||||
DECLARE webhook VARCHAR(255);
|
||||
DECLARE identification VARCHAR(64);
|
||||
DECLARE isSet VARCHAR(64);
|
||||
DECLARE workspaceId VARCHAR(64);
|
||||
DECLARE createTime BIGINT;
|
||||
DECLARE template TEXT;
|
||||
|
||||
DECLARE done INT DEFAULT 0;
|
||||
# 必须用 table_name.column_name
|
||||
DECLARE cursor1 CURSOR FOR SELECT message_task.type,
|
||||
message_task.event,
|
||||
message_task.user_id,
|
||||
message_task.task_type,
|
||||
message_task.webhook,
|
||||
message_task.identification,
|
||||
message_task.is_set,
|
||||
message_task.workspace_id,
|
||||
message_task.test_id,
|
||||
message_task.create_time,
|
||||
message_task.template
|
||||
FROM message_task;
|
||||
|
||||
|
||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
|
||||
OPEN cursor1;
|
||||
outer_loop:
|
||||
LOOP
|
||||
FETCH cursor1 INTO type, event, userId, taskType, webhook, identification, isSet,
|
||||
workspaceId,
|
||||
testId, createTime, template;
|
||||
IF done
|
||||
THEN
|
||||
LEAVE outer_loop;
|
||||
END IF;
|
||||
INSERT INTO message_task(id, type, event, user_id, task_type, webhook, identification, is_set, project_id,
|
||||
test_id, create_time, template)
|
||||
SELECT UUID(),
|
||||
type,
|
||||
event,
|
||||
userId,
|
||||
taskType,
|
||||
webhook,
|
||||
identification,
|
||||
isSet,
|
||||
id,
|
||||
testId,
|
||||
createTime,
|
||||
template
|
||||
FROM project
|
||||
WHERE workspace_id = workspaceId;
|
||||
DELETE FROM message_task WHERE workspace_id = workspaceId;
|
||||
END LOOP;
|
||||
CLOSE cursor1;
|
||||
END
|
||||
//
|
||||
DELIMITER ;
|
||||
|
||||
CALL message_task_ws();
|
||||
DROP PROCEDURE IF EXISTS message_task_ws;
|
||||
-- 去掉组织id
|
||||
ALTER TABLE message_task
|
||||
DROP COLUMN workspace_id;
|
||||
|
||||
-- 默认设置权限
|
||||
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
|
||||
VALUES (UUID(), 'project_admin', 'PROJECT_MESSAGE:READ', 'PROJECT_MESSAGE');
|
||||
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
|
||||
VALUES (UUID(), 'project_admin', 'PROJECT_MESSAGE:READ+EDIT', 'PROJECT_MESSAGE');
|
||||
|
||||
--
|
||||
ALTER TABLE custom_field
|
||||
ADD project_id VARCHAR(64) NULL;
|
||||
ALTER TABLE test_case_template
|
||||
ADD project_id VARCHAR(64) NULL;
|
||||
ALTER TABLE issue_template
|
||||
ADD project_id VARCHAR(64) NULL;
|
||||
|
||||
ALTER TABLE custom_field
|
||||
MODIFY id VARCHAR(100);
|
||||
ALTER TABLE test_case_template
|
||||
MODIFY id VARCHAR(100);
|
||||
ALTER TABLE issue_template
|
||||
MODIFY id VARCHAR(100);
|
||||
|
||||
UPDATE custom_field
|
||||
SET project_id = 'global'
|
||||
WHERE global = 1;
|
||||
|
||||
UPDATE test_case_template
|
||||
SET project_id = 'global'
|
||||
WHERE global = 1;
|
||||
|
||||
UPDATE issue_template
|
||||
SET project_id = 'global'
|
||||
WHERE global = 1;
|
||||
|
||||
|
||||
-- 自定义字段去掉工作空间
|
||||
DROP PROCEDURE IF EXISTS custom_field_ws;
|
||||
DELIMITER //
|
||||
CREATE PROCEDURE custom_field_ws()
|
||||
BEGIN
|
||||
|
||||
DECLARE fieldId VARCHAR(64);
|
||||
DECLARE name VARCHAR(64);
|
||||
DECLARE scene VARCHAR(64);
|
||||
DECLARE type VARCHAR(64);
|
||||
DECLARE remark VARCHAR(255);
|
||||
DECLARE options TEXT;
|
||||
DECLARE `system` TINYINT(1);
|
||||
DECLARE global TINYINT(1);
|
||||
DECLARE workspaceId VARCHAR(64);
|
||||
DECLARE createTime BIGINT;
|
||||
DECLARE updateTime BIGINT;
|
||||
DECLARE createUser VARCHAR(64);
|
||||
|
||||
DECLARE done INT DEFAULT 0;
|
||||
# 必须用 table_name.column_name
|
||||
DECLARE cursor1 CURSOR FOR SELECT custom_field.id,
|
||||
custom_field.name,
|
||||
custom_field.scene,
|
||||
custom_field.type,
|
||||
custom_field.remark,
|
||||
custom_field.options,
|
||||
custom_field.`system`,
|
||||
custom_field.global,
|
||||
custom_field.workspace_id,
|
||||
custom_field.create_time,
|
||||
custom_field.update_time,
|
||||
custom_field.create_user
|
||||
FROM custom_field
|
||||
WHERE custom_field.global = 0;
|
||||
|
||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
|
||||
OPEN cursor1;
|
||||
outer_loop:
|
||||
LOOP
|
||||
FETCH cursor1 INTO fieldId, name, scene, type, remark, options, `system`, global, workspaceId,
|
||||
createTime, updateTime, createUser;
|
||||
IF done
|
||||
THEN
|
||||
LEAVE outer_loop;
|
||||
END IF;
|
||||
|
||||
-- 自定义字段数据下发到项目
|
||||
INSERT INTO custom_field (id, name, scene, type, remark, options, `system`, global, create_time,
|
||||
update_time, create_user, project_id, workspace_id)
|
||||
SELECT CONCAT(fieldId, '-', SUBSTRING(MD5(RAND()), 1, 10)),
|
||||
custom_field.name,
|
||||
scene,
|
||||
type,
|
||||
remark,
|
||||
options,
|
||||
`system`,
|
||||
global,
|
||||
custom_field.create_time,
|
||||
custom_field.update_time,
|
||||
custom_field.create_user,
|
||||
project.id,
|
||||
project.workspace_id
|
||||
FROM project
|
||||
JOIN custom_field ON project.workspace_id = custom_field.workspace_id
|
||||
WHERE custom_field.id = fieldId;
|
||||
-- 删除处理过的数据
|
||||
DELETE FROM custom_field WHERE id = fieldId;
|
||||
|
||||
END LOOP;
|
||||
CLOSE cursor1;
|
||||
END
|
||||
//
|
||||
DELIMITER ;
|
||||
|
||||
CALL custom_field_ws();
|
||||
DROP PROCEDURE IF EXISTS custom_field_ws;
|
||||
|
||||
|
||||
-- 用例模版去掉工作空间
|
||||
DROP PROCEDURE IF EXISTS case_template_ws;
|
||||
DELIMITER //
|
||||
CREATE PROCEDURE case_template_ws()
|
||||
BEGIN
|
||||
|
||||
DECLARE templateId VARCHAR(64);
|
||||
DECLARE name VARCHAR(64);
|
||||
DECLARE type VARCHAR(64);
|
||||
DECLARE description VARCHAR(64);
|
||||
DECLARE caseName VARCHAR(255);
|
||||
DECLARE `system` TINYINT(1);
|
||||
DECLARE global TINYINT(1);
|
||||
DECLARE workspaceId VARCHAR(64);
|
||||
DECLARE prerequisite VARCHAR(255);
|
||||
DECLARE stepDescription TEXT;
|
||||
DECLARE expectedResult TEXT;
|
||||
DECLARE actualResult TEXT;
|
||||
DECLARE createTime BIGINT;
|
||||
DECLARE updateTime BIGINT;
|
||||
DECLARE stepModel VARCHAR(10);
|
||||
DECLARE steps TEXT;
|
||||
DECLARE createUser VARCHAR(64);
|
||||
|
||||
DECLARE done INT DEFAULT 0;
|
||||
# 必须用 table_name.column_name
|
||||
DECLARE cursor1 CURSOR FOR SELECT test_case_template.id,
|
||||
test_case_template.name,
|
||||
test_case_template.type,
|
||||
test_case_template.description,
|
||||
test_case_template.case_name,
|
||||
test_case_template.`system`,
|
||||
test_case_template.global,
|
||||
test_case_template.workspace_id,
|
||||
test_case_template.prerequisite,
|
||||
test_case_template.step_description,
|
||||
test_case_template.expected_result,
|
||||
test_case_template.actual_result,
|
||||
test_case_template.create_time,
|
||||
test_case_template.update_time,
|
||||
test_case_template.step_model,
|
||||
test_case_template.steps,
|
||||
test_case_template.create_user
|
||||
FROM test_case_template
|
||||
WHERE test_case_template.global = 0;
|
||||
|
||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
|
||||
OPEN cursor1;
|
||||
outer_loop:
|
||||
LOOP
|
||||
FETCH cursor1 INTO templateId, name, type, description, caseName, `system`, global, workspaceId,
|
||||
prerequisite, stepDescription, expectedResult, actualResult, createTime,
|
||||
updateTime, stepModel, steps, createUser;
|
||||
IF done
|
||||
THEN
|
||||
LEAVE outer_loop;
|
||||
END IF;
|
||||
|
||||
-- 自定义字段数据下发到项目
|
||||
INSERT INTO test_case_template (id, name, type, description, case_name, `system`, global, workspace_id,
|
||||
prerequisite, step_description, expected_result, actual_result, create_time,
|
||||
update_time, step_model, steps, create_user, project_id)
|
||||
SELECT CONCAT(templateId, '-', SUBSTRING(MD5(RAND()), 1, 10)),
|
||||
test_case_template.name,
|
||||
type,
|
||||
test_case_template.description,
|
||||
case_name,
|
||||
`system`,
|
||||
global,
|
||||
test_case_template.workspace_id,
|
||||
prerequisite,
|
||||
step_description,
|
||||
expected_result,
|
||||
actual_result,
|
||||
test_case_template.create_time,
|
||||
test_case_template.update_time,
|
||||
step_model,
|
||||
steps,
|
||||
test_case_template.create_user,
|
||||
project.id
|
||||
FROM project
|
||||
JOIN test_case_template ON project.workspace_id = test_case_template.workspace_id
|
||||
WHERE test_case_template.id = templateId;
|
||||
-- 删除处理过的数据
|
||||
DELETE FROM test_case_template WHERE id = templateId;
|
||||
|
||||
END LOOP;
|
||||
CLOSE cursor1;
|
||||
END
|
||||
//
|
||||
DELIMITER ;
|
||||
|
||||
CALL case_template_ws();
|
||||
DROP PROCEDURE IF EXISTS case_template_ws;
|
||||
|
||||
|
||||
-- 缺陷模版去掉工作空间
|
||||
DROP PROCEDURE IF EXISTS issue_template_ws;
|
||||
DELIMITER //
|
||||
CREATE PROCEDURE issue_template_ws()
|
||||
BEGIN
|
||||
|
||||
DECLARE templateId VARCHAR(64);
|
||||
DECLARE name VARCHAR(64);
|
||||
DECLARE platform VARCHAR(64);
|
||||
DECLARE description VARCHAR(64);
|
||||
DECLARE title VARCHAR(255);
|
||||
DECLARE `system` TINYINT(1);
|
||||
DECLARE global TINYINT(1);
|
||||
DECLARE workspaceId VARCHAR(64);
|
||||
DECLARE content TEXT;
|
||||
DECLARE createTime BIGINT;
|
||||
DECLARE updateTime BIGINT;
|
||||
DECLARE createUser VARCHAR(64);
|
||||
|
||||
DECLARE done INT DEFAULT 0;
|
||||
# 必须用 table_name.column_name
|
||||
DECLARE cursor1 CURSOR FOR SELECT issue_template.id,
|
||||
issue_template.name,
|
||||
issue_template.platform,
|
||||
issue_template.description,
|
||||
issue_template.title,
|
||||
issue_template.`system`,
|
||||
issue_template.global,
|
||||
issue_template.workspace_id,
|
||||
issue_template.content,
|
||||
issue_template.create_time,
|
||||
issue_template.update_time,
|
||||
issue_template.create_user
|
||||
FROM issue_template
|
||||
WHERE issue_template.global = 0;
|
||||
|
||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
|
||||
OPEN cursor1;
|
||||
outer_loop:
|
||||
LOOP
|
||||
FETCH cursor1 INTO templateId, name, platform, description, title, `system`, global, workspaceId, content,
|
||||
createTime, updateTime, createUser;
|
||||
IF done
|
||||
THEN
|
||||
LEAVE outer_loop;
|
||||
END IF;
|
||||
|
||||
-- 自定义字段数据下发到项目
|
||||
INSERT INTO issue_template(id, name, platform, description, title, `system`, global, content,
|
||||
create_time, update_time, create_user, project_id, workspace_id)
|
||||
SELECT CONCAT(templateId, '-', SUBSTRING(MD5(RAND()), 1, 10)),
|
||||
issue_template.name,
|
||||
issue_template.platform,
|
||||
issue_template.description,
|
||||
title,
|
||||
`system`,
|
||||
global,
|
||||
content,
|
||||
issue_template.create_time,
|
||||
issue_template.update_time,
|
||||
issue_template.create_user,
|
||||
project.id,
|
||||
issue_template.workspace_id
|
||||
FROM project
|
||||
JOIN issue_template ON project.workspace_id = issue_template.workspace_id
|
||||
WHERE issue_template.id = templateId;
|
||||
-- 删除处理过的数据
|
||||
DELETE FROM issue_template WHERE id = templateId;
|
||||
|
||||
END LOOP;
|
||||
CLOSE cursor1;
|
||||
END
|
||||
//
|
||||
DELIMITER ;
|
||||
|
||||
CALL issue_template_ws();
|
||||
DROP PROCEDURE IF EXISTS issue_template_ws;
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS custom_field_template_bak;
|
||||
CREATE TEMPORARY TABLE custom_field_template_bak LIKE custom_field_template;
|
||||
INSERT INTO custom_field_template_bak
|
||||
SELECT *
|
||||
FROM custom_field_template;
|
||||
TRUNCATE TABLE custom_field_template;
|
||||
|
||||
-- 关系表去掉工作空间
|
||||
DROP PROCEDURE IF EXISTS custom_field_template_ws;
|
||||
DELIMITER //
|
||||
CREATE PROCEDURE custom_field_template_ws()
|
||||
BEGIN
|
||||
|
||||
DECLARE fieldId VARCHAR(64);
|
||||
DECLARE templateId VARCHAR(64);
|
||||
DECLARE scene VARCHAR(64);
|
||||
DECLARE required TINYINT(1);
|
||||
DECLARE `order` INT;
|
||||
DECLARE defaultValue VARCHAR(100);
|
||||
DECLARE customData VARCHAR(255);
|
||||
DECLARE `key` VARCHAR(1);
|
||||
|
||||
DECLARE done INT DEFAULT 0;
|
||||
# 必须用 table_name.column_name
|
||||
DECLARE cursor1 CURSOR FOR SELECT custom_field_template_bak.field_id,
|
||||
custom_field_template_bak.template_id,
|
||||
custom_field_template_bak.scene,
|
||||
custom_field_template_bak.required,
|
||||
custom_field_template_bak.`order`,
|
||||
custom_field_template_bak.default_value,
|
||||
custom_field_template_bak.custom_data,
|
||||
custom_field_template_bak.`key`
|
||||
FROM custom_field_template_bak;
|
||||
|
||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
|
||||
OPEN cursor1;
|
||||
outer_loop:
|
||||
LOOP
|
||||
FETCH cursor1 INTO fieldId, templateId, scene, required, `order`, defaultValue, customData, `key`;
|
||||
IF done
|
||||
THEN
|
||||
LEAVE outer_loop;
|
||||
END IF;
|
||||
|
||||
#
|
||||
-- 关联数据下发到项目
|
||||
INSERT INTO custom_field_template(id, field_id, template_id, scene, required, `order`, default_value,
|
||||
custom_data, `key`)
|
||||
SELECT UUID(),
|
||||
custom_field.id,
|
||||
test_case_template.id,
|
||||
scene,
|
||||
required,
|
||||
`order`,
|
||||
defaultValue,
|
||||
customData,
|
||||
`key`
|
||||
FROM custom_field,
|
||||
test_case_template
|
||||
WHERE custom_field.id LIKE CONCAT(fieldId, '%')
|
||||
AND test_case_template.id LIKE CONCAT(templateId, '%');
|
||||
|
||||
INSERT INTO custom_field_template(id, field_id, template_id, scene, required, `order`, default_value,
|
||||
custom_data, `key`)
|
||||
SELECT UUID(),
|
||||
custom_field.id,
|
||||
issue_template.id,
|
||||
scene,
|
||||
required,
|
||||
`order`,
|
||||
defaultValue,
|
||||
customData,
|
||||
`key`
|
||||
FROM custom_field,
|
||||
issue_template
|
||||
WHERE custom_field.id LIKE CONCAT(fieldId, '%')
|
||||
AND issue_template.id LIKE CONCAT(templateId, '%');
|
||||
|
||||
END LOOP;
|
||||
CLOSE cursor1;
|
||||
END
|
||||
//
|
||||
DELIMITER ;
|
||||
|
||||
CALL custom_field_template_ws();
|
||||
DROP PROCEDURE IF EXISTS custom_field_template_ws;
|
||||
DROP TABLE IF EXISTS custom_field_template_bak;
|
||||
|
||||
|
||||
-- 去掉组织id
|
||||
ALTER TABLE test_case_template
|
||||
DROP COLUMN workspace_id;
|
||||
|
||||
ALTER TABLE issue_template
|
||||
DROP COLUMN workspace_id;
|
||||
|
||||
ALTER TABLE custom_field
|
||||
DROP COLUMN workspace_id;
|
||||
|
||||
-- project 数据调整
|
||||
UPDATE project
|
||||
JOIN test_case_template ON project.id = test_case_template.project_id
|
||||
SET project.case_template_id = test_case_template.id
|
||||
WHERE case_template_id IS NOT NULL
|
||||
AND test_case_template.id LIKE CONCAT(case_template_id, '%');
|
||||
|
||||
UPDATE project
|
||||
JOIN issue_template ON project.id = issue_template.project_id
|
||||
SET project.issue_template_id = issue_template.id
|
||||
WHERE issue_template_id IS NOT NULL
|
||||
AND issue_template.id LIKE CONCAT(issue_template_id, '%');
|
||||
|
||||
-- 默认设置权限
|
||||
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
|
||||
VALUES (UUID(), 'project_admin', 'PROJECT_TEMPLATE:READ+CASE_TEMPLATE', 'PROJECT_TEMPLATE');
|
||||
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
|
||||
VALUES (UUID(), 'project_admin', 'PROJECT_TEMPLATE:READ', 'PROJECT_TEMPLATE');
|
||||
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
|
||||
VALUES (UUID(), 'project_admin', 'PROJECT_TEMPLATE:READ+CUSTOM', 'PROJECT_TEMPLATE');
|
||||
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
|
||||
VALUES (UUID(), 'project_admin', 'PROJECT_TEMPLATE:READ+ISSUE_TEMPLATE', 'PROJECT_TEMPLATE');
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -140,16 +140,6 @@
|
|||
"name": "permission.workspace_service.edit",
|
||||
"resourceId": "WORKSPACE_SERVICE"
|
||||
},
|
||||
{
|
||||
"id": "WORKSPACE_MESSAGE:READ",
|
||||
"name": "permission.workspace_message.read",
|
||||
"resourceId": "WORKSPACE_MESSAGE"
|
||||
},
|
||||
{
|
||||
"id": "WORKSPACE_MESSAGE:READ+EDIT",
|
||||
"name": "permission.workspace_message.edit",
|
||||
"resourceId": "WORKSPACE_MESSAGE"
|
||||
},
|
||||
{
|
||||
"id": "WORKSPACE_USER:READ",
|
||||
"name": "permission.workspace_user.read",
|
||||
|
@ -255,26 +245,6 @@
|
|||
"name": "permission.workspace_operation_log.read",
|
||||
"resourceId": "WORKSPACE_OPERATING_LOG"
|
||||
},
|
||||
{
|
||||
"id": "WORKSPACE_TEMPLATE:READ",
|
||||
"name": "permission.workspace_template.read",
|
||||
"resourceId": "WORKSPACE_TEMPLATE"
|
||||
},
|
||||
{
|
||||
"id": "WORKSPACE_TEMPLATE:READ+CASE_TEMPLATE",
|
||||
"name": "permission.workspace_template.case_template",
|
||||
"resourceId": "WORKSPACE_TEMPLATE"
|
||||
},
|
||||
{
|
||||
"id": "WORKSPACE_TEMPLATE:READ+ISSUE_TEMPLATE",
|
||||
"name": "permission.workspace_template.issue_template",
|
||||
"resourceId": "WORKSPACE_TEMPLATE"
|
||||
},
|
||||
{
|
||||
"id": "WORKSPACE_TEMPLATE:READ+CUSTOM",
|
||||
"name": "permission.workspace_template.custom",
|
||||
"resourceId": "WORKSPACE_TEMPLATE"
|
||||
},
|
||||
{
|
||||
"id": "PROJECT_USER:READ",
|
||||
"name": "permission.project_user.read",
|
||||
|
@ -405,6 +375,36 @@
|
|||
"name": "permission.project_file.delete_file",
|
||||
"resourceId": "PROJECT_FILE"
|
||||
},
|
||||
{
|
||||
"id": "PROJECT_TEMPLATE:READ",
|
||||
"name": "permission.project_template.read",
|
||||
"resourceId": "PROJECT_TEMPLATE"
|
||||
},
|
||||
{
|
||||
"id": "PROJECT_TEMPLATE:READ+CASE_TEMPLATE",
|
||||
"name": "permission.project_template.case_template",
|
||||
"resourceId": "PROJECT_TEMPLATE"
|
||||
},
|
||||
{
|
||||
"id": "PROJECT_TEMPLATE:READ+ISSUE_TEMPLATE",
|
||||
"name": "permission.project_template.issue_template",
|
||||
"resourceId": "PROJECT_TEMPLATE"
|
||||
},
|
||||
{
|
||||
"id": "PROJECT_TEMPLATE:READ+CUSTOM",
|
||||
"name": "permission.project_template.custom",
|
||||
"resourceId": "PROJECT_TEMPLATE"
|
||||
},
|
||||
{
|
||||
"id": "PROJECT_MESSAGE:READ",
|
||||
"name": "permission.project_message.read",
|
||||
"resourceId": "PROJECT_MESSAGE"
|
||||
},
|
||||
{
|
||||
"id": "PROJECT_MESSAGE:READ+EDIT",
|
||||
"name": "permission.project_message.edit",
|
||||
"resourceId": "PROJECT_MESSAGE"
|
||||
},
|
||||
{
|
||||
"id": "PROJECT_CUSTOM_CODE:READ",
|
||||
"name": "permission.project_custom_code.read",
|
||||
|
@ -1006,14 +1006,6 @@
|
|||
"id": "WORKSPACE_SERVICE",
|
||||
"name": "permission.workspace_service.name"
|
||||
},
|
||||
{
|
||||
"id": "WORKSPACE_MESSAGE",
|
||||
"name": "permission.workspace_message.name"
|
||||
},
|
||||
{
|
||||
"id": "WORKSPACE_TEMPLATE",
|
||||
"name": "permission.workspace_template.name"
|
||||
},
|
||||
{
|
||||
"id": "WORKSPACE_PROJECT_MANAGER",
|
||||
"name": "permission.workspace_project_manager.name"
|
||||
|
@ -1054,6 +1046,14 @@
|
|||
"id": "PROJECT_FILE",
|
||||
"name": "permission.project_file.name"
|
||||
},
|
||||
{
|
||||
"id": "PROJECT_TEMPLATE",
|
||||
"name": "permission.project_template.name"
|
||||
},
|
||||
{
|
||||
"id": "PROJECT_MESSAGE",
|
||||
"name": "permission.project_message.name"
|
||||
},
|
||||
{
|
||||
"id": "PROJECT_VERSION",
|
||||
"name": "project.version_manage",
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
:tip="$t('commons.edit')"
|
||||
@click="handleEditTask(scope.$index,scope.row)"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
<ms-tip-button
|
||||
circle
|
||||
type="danger"
|
||||
|
@ -108,7 +108,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
@click="deleteRowTask(scope.$index,scope.row)"
|
||||
:tip="$t('commons.delete')"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
:tip="$t('commons.edit')"
|
||||
@click="handleEditTask(scope.$index,scope.row)"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
<ms-tip-button
|
||||
circle
|
||||
type="danger"
|
||||
|
@ -108,7 +108,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
@click="deleteRowTask(scope.$index,scope.row)"
|
||||
:tip="$t('commons.delete')"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
|
@ -41,16 +41,11 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getCurrentUser,
|
||||
getCurrentWorkspaceId,
|
||||
listenGoBack,
|
||||
removeGoBackListener
|
||||
} from "@/common/js/utils";
|
||||
import {getCurrentUser, getCurrentWorkspaceId, listenGoBack, removeGoBackListener} from "@/common/js/utils";
|
||||
import Crontab from "../cron/Crontab";
|
||||
import CrontabResult from "../cron/CrontabResult";
|
||||
import {cronValidate} from "@/common/js/cron";
|
||||
import ScheduleTaskNotification from "../../settings/workspace/components/ScheduleTaskNotification";
|
||||
import ScheduleTaskNotification from "../../project/notification/ScheduleTaskNotification";
|
||||
|
||||
function defaultCustomValidate() {
|
||||
return {pass: true};
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
<script>
|
||||
import {SYSTEM_FIELD_NAME_MAP} from "@/common/js/table-constants";
|
||||
import CustomFiledComponent from "@/business/components/settings/workspace/template/CustomFiledComponent";
|
||||
import CustomFiledComponent from "@/business/components/project/template/CustomFiledComponent";
|
||||
|
||||
export default {
|
||||
name: "CustomFiledFormItem",
|
||||
|
|
|
@ -33,13 +33,14 @@
|
|||
</el-menu-item>
|
||||
|
||||
<el-menu-item index="/project" onselectstart="return false"
|
||||
v-permission="['PROJECT_USER:READ', 'PROJECT_ENVIRONMENT:READ', 'PROJECT_OPERATING_LOG:READ', 'PROJECT_FILE:READ+JAR', 'PROJECT_FILE:READ+FILE', 'PROJECT_CUSTOM_CODE:READ','PROJECT_ERROR_REPORT_LIBRARY:READ']">
|
||||
v-permission="['PROJECT_USER:READ', 'PROJECT_ENVIRONMENT:READ', 'PROJECT_OPERATING_LOG:READ', 'PROJECT_FILE:READ+JAR', 'PROJECT_FILE:READ+FILE',
|
||||
'PROJECT_CUSTOM_CODE:READ','PROJECT_ERROR_REPORT_LIBRARY:READ', 'PROJECT_TEMPLATE:READ', 'PROJECT_MESSAGE:READ']">
|
||||
{{ $t('commons.project_setting') }}
|
||||
</el-menu-item>
|
||||
|
||||
<el-menu-item index="/setting" onselectstart="return false"
|
||||
v-permission="['SYSTEM_USER:READ', 'SYSTEM_WORKSPACE:READ', 'SYSTEM_GROUP:READ', 'SYSTEM_TEST_POOL:READ', 'SYSTEM_SETTING:READ', 'SYSTEM_AUTH:READ', 'SYSTEM_QUOTA:READ','SYSTEM_OPERATING_LOG:READ',
|
||||
'WORKSPACE_SERVICE:READ', 'WORKSPACE_MESSAGE:READ', 'WORKSPACE_USER:READ', 'WORKSPACE_PROJECT_MANAGER:READ', 'WORKSPACE_PROJECT_ENVIRONMENT:READ', 'WORKSPACE_OPERATING_LOG:READ', 'WORKSPACE_TEMPLATE:READ']">
|
||||
'WORKSPACE_SERVICE:READ', 'PROJECT_MESSAGE:READ', 'WORKSPACE_USER:READ', 'WORKSPACE_PROJECT_MANAGER:READ', 'WORKSPACE_PROJECT_ENVIRONMENT:READ', 'WORKSPACE_OPERATING_LOG:READ']">
|
||||
{{ $t('commons.system_setting') }}
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
|
|
|
@ -59,9 +59,9 @@ function redirectLoginPath(originPath) {
|
|||
let loginSuccess = sessionStorage.getItem('loginSuccess');
|
||||
|
||||
if (!redirectUrl || redirectUrl === '/') {
|
||||
if (hasPermissions('PROJECT_USER:READ', 'PROJECT_ENVIRONMENT:READ', 'PROJECT_OPERATING_LOG:READ', 'PROJECT_FILE:READ+JAR', 'PROJECT_FILE:READ+FILE', 'PROJECT_CUSTOM_CODE:READ')) {
|
||||
if (hasPermissions('PROJECT_USER:READ', 'PROJECT_ENVIRONMENT:READ', 'PROJECT_OPERATING_LOG:READ', 'PROJECT_FILE:READ+JAR', 'PROJECT_FILE:READ+FILE', 'PROJECT_CUSTOM_CODE:READ', 'PROJECT_TEMPLATE:READ', 'PROJECT_MESSAGE:READ')) {
|
||||
redirectUrl = '/project/home';
|
||||
} else if (hasPermissions('WORKSPACE_SERVICE:READ', 'WORKSPACE_MESSAGE:READ', 'WORKSPACE_USER:READ', 'WORKSPACE_PROJECT_MANAGER:READ', 'WORKSPACE_PROJECT_ENVIRONMENT:READ', 'WORKSPACE_OPERATING_LOG:READ', 'WORKSPACE_TEMPLATE:READ')) {
|
||||
} else if (hasPermissions('WORKSPACE_SERVICE:READ', 'PROJECT_MESSAGE:READ', 'WORKSPACE_USER:READ', 'WORKSPACE_PROJECT_MANAGER:READ', 'WORKSPACE_PROJECT_ENVIRONMENT:READ', 'WORKSPACE_OPERATING_LOG:READ')) {
|
||||
redirectUrl = '/setting/project/:type';
|
||||
} else if (hasPermissions('SYSTEM_USER:READ', 'SYSTEM_WORKSPACE:READ', 'SYSTEM_GROUP:READ', 'SYSTEM_TEST_POOL:READ', 'SYSTEM_SETTING:READ', 'SYSTEM_AUTH:READ', 'SYSTEM_QUOTA:READ', 'SYSTEM_OPERATING_LOG:READ')) {
|
||||
redirectUrl = '/setting';
|
||||
|
|
|
@ -27,9 +27,16 @@
|
|||
v-permission="['PROJECT_CUSTOM_CODE:READ']">
|
||||
{{ $t('project.code_segment.code_segment') }}
|
||||
</el-menu-item>
|
||||
<el-menu-item :index="'/project/errorreportlibrary'" v-permission="['PROJECT_ERROR_REPORT_LIBRARY:READ']" v-xpack>
|
||||
<el-menu-item :index="'/project/errorreportlibrary'" v-permission="['PROJECT_ERROR_REPORT_LIBRARY:READ']"
|
||||
v-xpack>
|
||||
{{ $t("error_report_library.name") }}
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/project/template" v-permission="['PROJECT_TEMPLATE:READ']">
|
||||
<template slot="title">{{ $t('workspace.template_manage') }}</template>
|
||||
</el-menu-item>
|
||||
<el-menu-item :index="'/project/messagesettings'" v-permission="['PROJECT_MESSAGE:READ']">
|
||||
{{ $t("organization.message_settings") }}
|
||||
</el-menu-item>
|
||||
<el-menu-item :index="'/project/log'" popper-class="submenu" v-permission="['PROJECT_OPERATING_LOG:READ']">
|
||||
{{ $t('project.log') }}
|
||||
</el-menu-item>
|
||||
|
|
|
@ -79,7 +79,8 @@
|
|||
|
||||
import {
|
||||
getCurrentProjectID,
|
||||
getCurrentUser, getCurrentUserId,
|
||||
getCurrentUser,
|
||||
getCurrentUserId,
|
||||
getCurrentWorkspaceId,
|
||||
listenGoBack,
|
||||
removeGoBackListener
|
||||
|
@ -88,7 +89,7 @@ import {
|
|||
import {AZURE_DEVOPS, JIRA, PROJECT_ID, TAPD, ZEN_TAO} from "@/common/js/constants";
|
||||
import {PROJECT_CONFIGS} from "@/business/components/common/components/search/search-components";
|
||||
import MsInstructionsIcon from "@/business/components/common/components/MsInstructionsIcon";
|
||||
import TemplateSelect from "@/business/components/settings/workspace/template/TemplateSelect";
|
||||
import TemplateSelect from "@/business/components/project/template/TemplateSelect";
|
||||
import MsResourceFiles from "@/business/components/performance/test/components/ResourceFiles";
|
||||
import MsTableButton from "@/business/components/common/components/MsTableButton";
|
||||
import MsJarConfig from "@/business/components/api/test/components/jar/JarConfig";
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
:tip="$t('commons.edit')"
|
||||
@click="handleEditTask(scope.$index,scope.row)"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
<ms-tip-button
|
||||
circle
|
||||
type="danger"
|
||||
|
@ -108,7 +108,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
@click="deleteRowTask(scope.$index,scope.row)"
|
||||
:tip="$t('commons.delete')"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
|
@ -78,27 +78,24 @@
|
|||
|
||||
<script>
|
||||
import {getCurrentUser, getCurrentWorkspaceId} from "@/common/js/utils";
|
||||
import JenkinsNotification from "@/business/components/settings/workspace/components/jenkins/JenkinsNotification";
|
||||
import TestPlanTaskNotification
|
||||
from "@/business/components/settings/workspace/components/track/TestPlanTaskNotification";
|
||||
import TestReviewNotification from "@/business/components/settings/workspace/components/track/TestReviewNotification";
|
||||
import DefectTaskNotification from "@/business/components/settings/workspace/components/track/DefectTaskNotification";
|
||||
import JenkinsNotification from "@/business/components/project/notification/jenkins/JenkinsNotification";
|
||||
import TestPlanTaskNotification from "@/business/components/project/notification/track/TestPlanTaskNotification";
|
||||
import TestReviewNotification from "@/business/components/project/notification/track/TestReviewNotification";
|
||||
import DefectTaskNotification from "@/business/components/project/notification/track/DefectTaskNotification";
|
||||
import MsContainer from "@/business/components/common/components/MsContainer";
|
||||
import MsMainContainer from "@/business/components/common/components/MsMainContainer";
|
||||
import HomeNotification from "@/business/components/settings/workspace/components/track/TrackHomeNotification";
|
||||
import TrackHomeNotification from "@/business/components/settings/workspace/components/track/TrackHomeNotification";
|
||||
import TestCaseNotification from "@/business/components/settings/workspace/components/track/TestCaseNotification";
|
||||
import TrackReportNotification from "@/business/components/settings/workspace/components/track/TrackReportNotification";
|
||||
import ApiDefinitionNotification
|
||||
from "@/business/components/settings/workspace/components/api/ApiDefinitionNotification";
|
||||
import ApiAutomationNotification
|
||||
from "@/business/components/settings/workspace/components/api/ApiAutomationNotification";
|
||||
import ApiReportNotification from "@/business/components/settings/workspace/components/api/ApiReportNotification";
|
||||
import HomeNotification from "@/business/components/project/notification/track/TrackHomeNotification";
|
||||
import TrackHomeNotification from "@/business/components/project/notification/track/TrackHomeNotification";
|
||||
import TestCaseNotification from "@/business/components/project/notification/track/TestCaseNotification";
|
||||
import TrackReportNotification from "@/business/components/project/notification/track/TrackReportNotification";
|
||||
import ApiDefinitionNotification from "@/business/components/project/notification/api/ApiDefinitionNotification";
|
||||
import ApiAutomationNotification from "@/business/components/project/notification/api/ApiAutomationNotification";
|
||||
import ApiReportNotification from "@/business/components/project/notification/api/ApiReportNotification";
|
||||
import PerformanceTestNotification
|
||||
from "@/business/components/settings/workspace/components/performance/PerformanceTestNotification";
|
||||
from "@/business/components/project/notification/performance/PerformanceTestNotification";
|
||||
import PerformanceReportNotification
|
||||
from "@/business/components/settings/workspace/components/performance/PerformanceReportNotification";
|
||||
import ApiHomeNotification from "@/business/components/settings/workspace/components/api/ApiHomeNotification";
|
||||
from "@/business/components/project/notification/performance/PerformanceReportNotification";
|
||||
import ApiHomeNotification from "@/business/components/project/notification/api/ApiHomeNotification";
|
||||
|
||||
let taskData = {
|
||||
jenkins: [],
|
||||
|
@ -203,7 +200,7 @@ export default {
|
|||
|
||||
<style scoped>
|
||||
.task-notification {
|
||||
height: calc(100vh - 200px);
|
||||
height: calc(100vh - 230px);
|
||||
overflow: auto;
|
||||
}
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
<el-col :span="24">
|
||||
<h5>{{ $t('i18n.automation') }}</h5>
|
||||
<el-button icon="el-icon-circle-plus-outline" plain size="mini" @click="handleAddTaskModel"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']">
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']">
|
||||
{{ $t('organization.message.create_new_notification') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
@ -101,7 +101,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
:tip="$t('commons.edit')"
|
||||
@click="handleEditTask(scope.$index,scope.row)"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
<ms-tip-button
|
||||
circle
|
||||
type="danger"
|
||||
|
@ -110,7 +110,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
@click="deleteRowTask(scope.$index,scope.row)"
|
||||
:tip="$t('commons.delete')"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
|
@ -4,7 +4,7 @@
|
|||
<el-col :span="24">
|
||||
<h5>{{ $t('i18n.definition') }}</h5>
|
||||
<el-button icon="el-icon-circle-plus-outline" plain size="mini" @click="handleAddTaskModel"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']">
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']">
|
||||
{{ $t('organization.message.create_new_notification') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
@ -101,7 +101,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
:tip="$t('commons.edit')"
|
||||
@click="handleEditTask(scope.$index,scope.row)"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
<ms-tip-button
|
||||
circle
|
||||
type="danger"
|
||||
|
@ -110,7 +110,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
@click="deleteRowTask(scope.$index,scope.row)"
|
||||
:tip="$t('commons.delete')"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
|
@ -4,7 +4,7 @@
|
|||
<el-col :span="24">
|
||||
<h5>{{ $t('i18n.home') }}</h5>
|
||||
<el-button icon="el-icon-circle-plus-outline" plain size="mini" @click="handleAddTaskModel"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']">
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']">
|
||||
{{ $t('organization.message.create_new_notification') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
@ -101,7 +101,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
:tip="$t('commons.edit')"
|
||||
@click="handleEditTask(scope.$index,scope.row)"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
<ms-tip-button
|
||||
circle
|
||||
type="danger"
|
||||
|
@ -110,7 +110,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
@click="deleteRowTask(scope.$index,scope.row)"
|
||||
:tip="$t('commons.delete')"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
|
@ -4,7 +4,7 @@
|
|||
<el-col :span="24">
|
||||
<h5>{{ $t('i18n.report') }}</h5>
|
||||
<el-button icon="el-icon-circle-plus-outline" plain size="mini" @click="handleAddTaskModel"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']">
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']">
|
||||
{{ $t('organization.message.create_new_notification') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
@ -101,7 +101,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
:tip="$t('commons.edit')"
|
||||
@click="handleEditTask(scope.$index,scope.row)"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
<ms-tip-button
|
||||
circle
|
||||
type="danger"
|
||||
|
@ -110,7 +110,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
@click="deleteRowTask(scope.$index,scope.row)"
|
||||
:tip="$t('commons.delete')"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
|
@ -4,7 +4,7 @@
|
|||
<el-col :span="24">
|
||||
<h3>{{ $t('organization.message.jenkins_task_notification') }}</h3>
|
||||
<el-button icon="el-icon-circle-plus-outline" plain size="mini" @click="handleAddTaskModel"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']">
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']">
|
||||
{{ $t('organization.message.create_new_notification') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
@ -102,7 +102,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
:tip="$t('commons.edit')"
|
||||
@click="handleEditTask(scope.$index,scope.row)"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
<ms-tip-button
|
||||
circle
|
||||
type="danger"
|
||||
|
@ -111,7 +111,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
@click="deleteRowTask(scope.$index,scope.row)"
|
||||
:tip="$t('commons.delete')"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
|
@ -4,7 +4,7 @@
|
|||
<el-col :span="24">
|
||||
<h5>{{ $t('i18n.report') }}</h5>
|
||||
<el-button icon="el-icon-circle-plus-outline" plain size="mini" @click="handleAddTaskModel"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']">
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']">
|
||||
{{ $t('organization.message.create_new_notification') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
@ -101,7 +101,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
:tip="$t('commons.edit')"
|
||||
@click="handleEditTask(scope.$index,scope.row)"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
<ms-tip-button
|
||||
circle
|
||||
type="danger"
|
||||
|
@ -110,7 +110,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
@click="deleteRowTask(scope.$index,scope.row)"
|
||||
:tip="$t('commons.delete')"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
|
@ -4,7 +4,7 @@
|
|||
<el-col :span="24">
|
||||
<h5>{{ $t('commons.performance') }}</h5>
|
||||
<el-button icon="el-icon-circle-plus-outline" plain size="mini" @click="handleAddTaskModel"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']">
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']">
|
||||
{{ $t('organization.message.create_new_notification') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
@ -101,7 +101,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
:tip="$t('commons.edit')"
|
||||
@click="handleEditTask(scope.$index,scope.row)"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
<ms-tip-button
|
||||
circle
|
||||
type="danger"
|
||||
|
@ -110,7 +110,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
@click="deleteRowTask(scope.$index,scope.row)"
|
||||
:tip="$t('commons.delete')"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
|
@ -4,7 +4,7 @@
|
|||
<el-col :span="24">
|
||||
<h5>{{ $t('test_track.issue.issue') }}</h5>
|
||||
<el-button icon="el-icon-circle-plus-outline" plain size="mini" @click="handleAddTaskModel"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']">
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']">
|
||||
{{ $t('organization.message.create_new_notification') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
@ -101,7 +101,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
:tip="$t('commons.edit')"
|
||||
@click="handleEditTask(scope.$index,scope.row)"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
<ms-tip-button
|
||||
circle
|
||||
type="danger"
|
||||
|
@ -110,7 +110,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
@click="deleteRowTask(scope.$index,scope.row)"
|
||||
:tip="$t('commons.delete')"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
|
@ -4,7 +4,7 @@
|
|||
<el-col :span="24">
|
||||
<h5>{{ $t('test_track.case.test_case') }}</h5>
|
||||
<el-button icon="el-icon-circle-plus-outline" plain size="mini" @click="handleAddTaskModel"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']">
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']">
|
||||
{{ $t('organization.message.create_new_notification') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
@ -101,7 +101,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
:tip="$t('commons.edit')"
|
||||
@click="handleEditTask(scope.$index,scope.row)"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
<ms-tip-button
|
||||
circle
|
||||
type="danger"
|
||||
|
@ -110,7 +110,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
@click="deleteRowTask(scope.$index,scope.row)"
|
||||
:tip="$t('commons.delete')"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
|
@ -4,7 +4,7 @@
|
|||
<el-col :span="24">
|
||||
<h5>{{ $t('test_track.plan.test_plan') }}</h5>
|
||||
<el-button icon="el-icon-circle-plus-outline" plain size="mini" @click="handleAddTaskModel"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']">
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']">
|
||||
{{ $t('organization.message.create_new_notification') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
@ -100,7 +100,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
:tip="$t('commons.edit')"
|
||||
@click="handleEditTask(scope.$index,scope.row)"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
<ms-tip-button
|
||||
circle
|
||||
type="danger"
|
||||
|
@ -109,7 +109,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
@click="deleteRowTask(scope.$index,scope.row)"
|
||||
:tip="$t('commons.delete')"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
|
@ -4,7 +4,7 @@
|
|||
<el-col :span="24">
|
||||
<h5>{{ $t('test_track.review.test_review') }}</h5>
|
||||
<el-button icon="el-icon-circle-plus-outline" plain size="mini" @click="handleAddTaskModel"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']">
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']">
|
||||
{{ $t('organization.message.create_new_notification') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
@ -101,7 +101,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
:tip="$t('commons.edit')"
|
||||
@click="handleEditTask(scope.$index,scope.row)"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
<ms-tip-button
|
||||
circle
|
||||
type="danger"
|
||||
|
@ -110,7 +110,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
@click="deleteRowTask(scope.$index,scope.row)"
|
||||
:tip="$t('commons.delete')"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
|
@ -4,7 +4,7 @@
|
|||
<el-col :span="24">
|
||||
<h5>{{ $t('i18n.home') }}</h5>
|
||||
<el-button icon="el-icon-circle-plus-outline" plain size="mini" @click="handleAddTaskModel"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']">
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']">
|
||||
{{ $t('organization.message.create_new_notification') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
@ -101,7 +101,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
:tip="$t('commons.edit')"
|
||||
@click="handleEditTask(scope.$index,scope.row)"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
<ms-tip-button
|
||||
circle
|
||||
type="danger"
|
||||
|
@ -110,7 +110,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
@click="deleteRowTask(scope.$index,scope.row)"
|
||||
:tip="$t('commons.delete')"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
|
@ -4,7 +4,7 @@
|
|||
<el-col :span="24">
|
||||
<h5>{{ $t('i18n.report') }}</h5>
|
||||
<el-button icon="el-icon-circle-plus-outline" plain size="mini" @click="handleAddTaskModel"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']">
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']">
|
||||
{{ $t('organization.message.create_new_notification') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
@ -101,7 +101,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
:tip="$t('commons.edit')"
|
||||
@click="handleEditTask(scope.$index,scope.row)"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
<ms-tip-button
|
||||
circle
|
||||
type="danger"
|
||||
|
@ -110,7 +110,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
@click="deleteRowTask(scope.$index,scope.row)"
|
||||
:tip="$t('commons.delete')"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
|
@ -1,12 +1,15 @@
|
|||
const ProjectSetting = () => import('@/business/components/project/ProjectSetting')
|
||||
const ProjectHome = () => import('@/business/components/project/home/ProjectHome')
|
||||
const ProjectMember = () => import('@/business/components/project/menu/Member')
|
||||
const ProjectEnv = () => import('@/business/components/project/menu/EnvironmentList')
|
||||
const ProjectLog = () => import('@/business/components/project/menu/Log')
|
||||
const ProjectCodeSegment = () => import('@/business/components/project/menu/function/CustomFunction')
|
||||
const ProjectFileManage = () => import('@/business/components/project/menu/file/FileManage')
|
||||
const ProjectUserGroup = () => import('@/business/components/project/menu/UserGroup')
|
||||
const ProjectAppManage = () => import('@/business/components/project/menu/appmanage/AppManage')
|
||||
const ProjectSetting = () => import('@/business/components/project/ProjectSetting');
|
||||
const ProjectHome = () => import('@/business/components/project/home/ProjectHome');
|
||||
const ProjectMember = () => import('@/business/components/project/menu/Member');
|
||||
const ProjectEnv = () => import('@/business/components/project/menu/EnvironmentList');
|
||||
const ProjectLog = () => import('@/business/components/project/menu/Log');
|
||||
const ProjectCodeSegment = () => import('@/business/components/project/menu/function/CustomFunction');
|
||||
const ProjectFileManage = () => import('@/business/components/project/menu/file/FileManage');
|
||||
const ProjectUserGroup = () => import('@/business/components/project/menu/UserGroup');
|
||||
const ProjectAppManage = () => import('@/business/components/project/menu/appmanage/AppManage');
|
||||
const MessageSetting = () => import('@/business/components/project/notification/MessageSettings');
|
||||
const TemplateSetting = () => import('@/business/components/project/template/TemplateSetting');
|
||||
|
||||
|
||||
const requireContext = require.context('@/business/components/xpack/', true, /router\.js$/);
|
||||
const ProjectVersion = requireContext.keys().map(key => requireContext(key).projectVersion);
|
||||
|
@ -57,6 +60,14 @@ export default {
|
|||
path: 'app',
|
||||
component: ProjectAppManage
|
||||
},
|
||||
{
|
||||
path: 'template',
|
||||
component: TemplateSetting,
|
||||
},
|
||||
{
|
||||
path: 'messagesettings',
|
||||
component: MessageSetting,
|
||||
},
|
||||
...ProjectVersion,
|
||||
...ErrorReportLibrary,
|
||||
]
|
||||
|
|
|
@ -57,9 +57,10 @@
|
|||
<script>
|
||||
import MsEditDialog from "@/business/components/common/components/MsEditDialog";
|
||||
import MsSingleHandleDrag from "@/business/components/common/components/MsSingleHandleDrag";
|
||||
import {getCurrentWorkspaceId} from "@/common/js/utils";
|
||||
import {getCurrentProjectID} from "@/common/js/utils";
|
||||
import {CUSTOM_FIELD_SCENE_OPTION, CUSTOM_FIELD_TYPE_OPTION, SYSTEM_FIELD_NAME_MAP} from "@/common/js/table-constants";
|
||||
import i18n from "@/i18n/i18n";
|
||||
|
||||
export default {
|
||||
name: "CustomFieldEdit",
|
||||
components: {MsSingleHandleDrag, MsEditDialog},
|
||||
|
@ -162,7 +163,7 @@ export default {
|
|||
return;
|
||||
}
|
||||
Object.assign(param, this.form);
|
||||
param.workspaceId = getCurrentWorkspaceId();
|
||||
param.projectId = getCurrentProjectID();
|
||||
if (['select','multipleSelect','radio','checkbox'].indexOf(param.type) > -1) {
|
||||
if (param.options.length < 1) {
|
||||
this.$warning(this.$t('custom_field.option_check'));
|
|
@ -70,14 +70,16 @@
|
|||
import MsTableOperatorButton from "@/business/components/common/components/MsTableOperatorButton";
|
||||
import MsTable from "@/business/components/common/components/table/MsTable";
|
||||
import MsTableColumn from "@/business/components/common/components/table/MsTableColumn";
|
||||
import FieldCustomDataTableItem from "@/business/components/settings/workspace/template/FieldCustomDataTableItem";
|
||||
import CustomFiledComponent from "@/business/components/settings/workspace/template/CustomFiledComponent";
|
||||
import FieldCustomDataTableItem from "@/business/components/project/template/FieldCustomDataTableItem";
|
||||
import CustomFiledComponent from "@/business/components/project/template/CustomFiledComponent";
|
||||
import {SYSTEM_FIELD_NAME_MAP} from "@/common/js/table-constants";
|
||||
|
||||
export default {
|
||||
name: "CustomFieldFormList",
|
||||
components: {
|
||||
CustomFiledComponent,
|
||||
FieldCustomDataTableItem, MsTableColumn, MsTable, MsTableOperatorButton},
|
||||
FieldCustomDataTableItem, MsTableColumn, MsTable, MsTableOperatorButton
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
result: {},
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
<template v-slot:header>
|
||||
<ms-table-header :condition.sync="condition" @search="getCustomFields" @create="handleCreate"
|
||||
:create-tip="$t('custom_field.create')" :title="$t('custom_field.name')"/>
|
||||
:create-tip="$t('custom_field.create')"/>
|
||||
</template>
|
||||
|
||||
<ms-table
|
||||
|
@ -30,10 +30,10 @@
|
|||
prop="name">
|
||||
<template v-slot="scope">
|
||||
<span v-if="scope.row.system">
|
||||
{{$t(systemNameMap[scope.row.name])}}
|
||||
{{ $t(systemNameMap[scope.row.name]) }}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{scope.row.name}}
|
||||
{{ scope.row.name }}
|
||||
</span>
|
||||
</template>
|
||||
</ms-table-column>
|
||||
|
@ -67,10 +67,10 @@
|
|||
prop="system">
|
||||
<template v-slot="scope">
|
||||
<span v-if="scope.row.system">
|
||||
{{$t('commons.yes')}}
|
||||
{{ $t('commons.yes') }}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{$t('commons.no')}}
|
||||
{{ $t('commons.no') }}
|
||||
</span>
|
||||
</template>
|
||||
</ms-table-column>
|
||||
|
@ -108,7 +108,8 @@
|
|||
|
||||
</ms-table>
|
||||
|
||||
<ms-table-pagination :change="getCustomFields" :current-page.sync="currentPage" :page-size.sync="pageSize" :total="total"/>
|
||||
<ms-table-pagination :change="getCustomFields" :current-page.sync="currentPage" :page-size.sync="pageSize"
|
||||
:total="total"/>
|
||||
|
||||
<custom-field-edit
|
||||
@refresh="getCustomFields"
|
||||
|
@ -120,17 +121,18 @@
|
|||
|
||||
<script>
|
||||
import MsTable from "@/business/components/common/components/table/MsTable";
|
||||
import {getCurrentWorkspaceId, getDefaultTableHeight, getTranslateOptions} from "@/common/js/utils";
|
||||
import {getCurrentProjectID, getTranslateOptions} from "@/common/js/utils";
|
||||
import MsTableColumn from "@/business/components/common/components/table/MsTableColumn";
|
||||
import MsTableOperators from "@/business/components/common/components/MsTableOperators";
|
||||
import MsTableButton from "@/business/components/common/components/MsTableButton";
|
||||
import CustomFieldEdit from "@/business/components/settings/workspace/template/CustomFieldEdit";
|
||||
import CustomFieldEdit from "@/business/components/project/template/CustomFieldEdit";
|
||||
import MsTablePagination from "@/business/components/common/pagination/TablePagination";
|
||||
import {
|
||||
CUSTOM_FIELD_SCENE_OPTION,
|
||||
CUSTOM_FIELD_TYPE_OPTION,
|
||||
FIELD_TYPE_MAP,
|
||||
SCENE_MAP, SYSTEM_FIELD_NAME_MAP
|
||||
SCENE_MAP,
|
||||
SYSTEM_FIELD_NAME_MAP
|
||||
} from "@/common/js/table-constants";
|
||||
import MsTableHeader from "@/business/components/common/components/MsTableHeader";
|
||||
import HeaderCustom from "@/business/components/common/head/HeaderCustom";
|
||||
|
@ -143,7 +145,8 @@ export default {
|
|||
MsCustomTableHeader,
|
||||
HeaderCustom,
|
||||
MsTableHeader,
|
||||
MsTablePagination, CustomFieldEdit, MsTableButton, MsTableOperators, MsTableColumn, MsTable},
|
||||
MsTablePagination, CustomFieldEdit, MsTableButton, MsTableOperators, MsTableColumn, MsTable
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
|
@ -172,7 +175,7 @@ export default {
|
|||
sceneFilters: [],
|
||||
};
|
||||
},
|
||||
activated() {
|
||||
created() {
|
||||
this.getCustomFields();
|
||||
this.fieldFilters = getTranslateOptions(CUSTOM_FIELD_TYPE_OPTION);
|
||||
this.sceneFilters = getTranslateOptions(CUSTOM_FIELD_SCENE_OPTION);
|
||||
|
@ -188,18 +191,19 @@ export default {
|
|||
return SYSTEM_FIELD_NAME_MAP;
|
||||
},
|
||||
tableHeight() {
|
||||
return getDefaultTableHeight();
|
||||
return document.documentElement.clientHeight - 240;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getCustomFields() {
|
||||
this.condition.workspaceId = getCurrentWorkspaceId();
|
||||
this.result = this.$post('custom/field/list/' + this.currentPage + '/' + this.pageSize,
|
||||
this.condition, (response) => {
|
||||
this.condition.projectId = getCurrentProjectID();
|
||||
this.result = this.$post('custom/field/list/' + this.currentPage + '/' + this.pageSize, this.condition, (response) => {
|
||||
let data = response.data;
|
||||
this.total = data.itemCount;
|
||||
this.tableData = data.listObject;
|
||||
if (this.$refs.table) {
|
||||
this.$refs.table.reloadTable();
|
||||
}
|
||||
});
|
||||
},
|
||||
handleEdit(data) {
|
|
@ -103,6 +103,7 @@ import MsTablePagination from "@/business/components/common/pagination/TablePagi
|
|||
import {CUSTOM_FIELD_TYPE_OPTION, FIELD_TYPE_MAP, SYSTEM_FIELD_NAME_MAP} from "@/common/js/table-constants";
|
||||
import MsTableHeader from "@/business/components/common/components/MsTableHeader";
|
||||
import MsEditDialog from "@/business/components/common/components/MsEditDialog";
|
||||
|
||||
export default {
|
||||
name: "CustomFieldRelateList",
|
||||
components: {
|
|
@ -115,6 +115,7 @@ import MsTableColumn from "@/business/components/common/components/table/MsTable
|
|||
import {getCurrentProjectID} from "@/common/js/utils";
|
||||
import MsInputTag from "@/business/components/api/automation/scenario/MsInputTag";
|
||||
import MsMarkDownText from "@/business/components/track/case/components/MsMarkDownText";
|
||||
|
||||
export default {
|
||||
name: "CustomFiledComponent",
|
||||
components: {MsMarkDownText, MsInputTag, MsTableColumn},
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
<script>
|
||||
import MsTableColumn from "@/business/components/common/components/table/MsTableColumn";
|
||||
|
||||
export default {
|
||||
name: "FieldCustomDataTableItem",
|
||||
components: {MsTableColumn},
|
|
@ -71,10 +71,10 @@ import draggable from 'vuedraggable';
|
|||
import TemplateComponentEditHeader
|
||||
from "@/business/components/track/plan/view/comonents/report/TemplateComponentEditHeader";
|
||||
import MsFormDivider from "@/business/components/common/components/MsFormDivider";
|
||||
import CustomFieldFormList from "@/business/components/settings/workspace/template/CustomFieldFormList";
|
||||
import CustomFieldRelateList from "@/business/components/settings/workspace/template/CustomFieldRelateList";
|
||||
import {getCurrentWorkspaceId} from "@/common/js/utils";
|
||||
import CustomFieldEdit from "@/business/components/settings/workspace/template/CustomFieldEdit";
|
||||
import CustomFieldFormList from "@/business/components/project/template/CustomFieldFormList";
|
||||
import CustomFieldRelateList from "@/business/components/project/template/CustomFieldRelateList";
|
||||
import {getCurrentProjectID} from "@/common/js/utils";
|
||||
import CustomFieldEdit from "@/business/components/project/template/CustomFieldEdit";
|
||||
import {generateTableHeaderKey, getCustomFieldsKeys} from "@/common/js/tableUtils";
|
||||
|
||||
export default {
|
||||
|
@ -145,7 +145,7 @@ export default {
|
|||
param.steps = JSON.stringify(this.form.steps);
|
||||
}
|
||||
param.options = JSON.stringify(this.form.options);
|
||||
param.workspaceId = getCurrentWorkspaceId();
|
||||
param.projectId = getCurrentProjectID();
|
||||
let customFields = this.relateFields;
|
||||
if (customFields) {
|
||||
let keys = getCustomFieldsKeys(customFields);
|
||||
|
@ -207,7 +207,7 @@ export default {
|
|||
},
|
||||
appendDefaultFiled() {
|
||||
let condition = {
|
||||
workspaceId: getCurrentWorkspaceId(),
|
||||
projectId: getCurrentProjectID(),
|
||||
scene: this.scene
|
||||
};
|
||||
this.result = this.$post('custom/field/default', condition, (response) => {
|
|
@ -43,9 +43,9 @@ import TemplateComponentEditHeader
|
|||
from "@/business/components/track/plan/view/comonents/report/TemplateComponentEditHeader";
|
||||
import MsFormDivider from "@/business/components/common/components/MsFormDivider";
|
||||
import {ISSUE_PLATFORM_OPTION} from "@/common/js/table-constants";
|
||||
import CustomFieldFormList from "@/business/components/settings/workspace/template/CustomFieldFormList";
|
||||
import CustomFieldRelateList from "@/business/components/settings/workspace/template/CustomFieldRelateList";
|
||||
import FieldTemplateEdit from "@/business/components/settings/workspace/template/FieldTemplateEdit";
|
||||
import CustomFieldFormList from "@/business/components/project/template/CustomFieldFormList";
|
||||
import CustomFieldRelateList from "@/business/components/project/template/CustomFieldRelateList";
|
||||
import FieldTemplateEdit from "@/business/components/project/template/FieldTemplateEdit";
|
||||
import FormRIchTextItem from "@/business/components/track/case/components/FormRichTextItem";
|
||||
import {LOCAL} from "@/common/js/constants";
|
||||
|
|
@ -3,8 +3,7 @@
|
|||
|
||||
<template v-slot:header>
|
||||
<ms-table-header :condition.sync="condition" @search="initTableData" @create="handleCreate"
|
||||
:create-tip="$t('custom_field.create_issue_template')"
|
||||
:title="$t('custom_field.issue_template')"/>
|
||||
:create-tip="$t('custom_field.create_issue_template')"/>
|
||||
</template>
|
||||
|
||||
<ms-table
|
||||
|
@ -67,7 +66,8 @@
|
|||
</ms-table-column>
|
||||
</ms-table>
|
||||
|
||||
<ms-table-pagination :change="initTableData" :current-page.sync="currentPage" :page-size.sync="pageSize" :total="total"/>
|
||||
<ms-table-pagination :change="initTableData" :current-page.sync="currentPage" :page-size.sync="pageSize"
|
||||
:total="total"/>
|
||||
|
||||
<issue-template-edit ref="templateEdit" @refresh="initTableData"/>
|
||||
|
||||
|
@ -77,16 +77,16 @@
|
|||
<script>
|
||||
import {ISSUE_TEMPLATE_LIST} from "@/common/js/default-table-header";
|
||||
import {ISSUE_PLATFORM_OPTION} from "@/common/js/table-constants";
|
||||
import {getCurrentWorkspaceId, getDefaultTableHeight} from "@/common/js/utils";
|
||||
import {getCurrentProjectID} from "@/common/js/utils";
|
||||
import MsTableHeader from "@/business/components/common/components/MsTableHeader";
|
||||
import MsTablePagination from "@/business/components/common/pagination/TablePagination";
|
||||
import MsTableButton from "@/business/components/common/components/MsTableButton";
|
||||
import MsTableOperators from "@/business/components/common/components/MsTableOperators";
|
||||
import MsTableColumn from "@/business/components/common/components/table/MsTableColumn";
|
||||
import MsTable from "@/business/components/common/components/table/MsTable";
|
||||
import TestCaseReportTemplate from "@/business/components/settings/workspace/template/TestCaseReportTemplate";
|
||||
import TestCaseTemplateEdit from "@/business/components/settings/workspace/template/TestCaseTemplateEdit";
|
||||
import IssueTemplateEdit from "@/business/components/settings/workspace/template/IssueTemplateEdit";
|
||||
import TestCaseReportTemplate from "@/business/components/project/template/TestCaseReportTemplate";
|
||||
import TestCaseTemplateEdit from "@/business/components/project/template/TestCaseTemplateEdit";
|
||||
import IssueTemplateEdit from "@/business/components/project/template/IssueTemplateEdit";
|
||||
|
||||
export default {
|
||||
name: "IssuesTemplateList",
|
||||
|
@ -95,7 +95,8 @@ export default {
|
|||
TestCaseTemplateEdit,
|
||||
TestCaseReportTemplate,
|
||||
MsTableHeader,
|
||||
MsTablePagination, MsTableButton, MsTableOperators, MsTableColumn, MsTable},
|
||||
MsTablePagination, MsTableButton, MsTableOperators, MsTableColumn, MsTable
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
|
@ -104,7 +105,7 @@ export default {
|
|||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
result: {},
|
||||
issuePlatformMap:{
|
||||
issuePlatformMap: {
|
||||
Local: 'Metersphere',
|
||||
Jira: 'JIRA',
|
||||
Tapd: 'Tapd',
|
||||
|
@ -127,7 +128,7 @@ export default {
|
|||
],
|
||||
};
|
||||
},
|
||||
activated() {
|
||||
created() {
|
||||
this.initTableData();
|
||||
},
|
||||
computed: {
|
||||
|
@ -138,18 +139,20 @@ export default {
|
|||
return ISSUE_PLATFORM_OPTION;
|
||||
},
|
||||
tableHeight() {
|
||||
return getDefaultTableHeight();
|
||||
return document.documentElement.clientHeight - 240;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initTableData() {
|
||||
this.condition.workspaceId = getCurrentWorkspaceId();
|
||||
this.condition.projectId = getCurrentProjectID();
|
||||
this.result = this.$post('field/template/issue/list/' + this.currentPage + '/' + this.pageSize,
|
||||
this.condition, (response) => {
|
||||
let data = response.data;
|
||||
this.total = data.itemCount;
|
||||
this.tableData = data.listObject;
|
||||
if (this.$refs.table) {
|
||||
this.$refs.table.reloadTable();
|
||||
}
|
||||
});
|
||||
},
|
||||
handleEdit(data) {
|
|
@ -11,7 +11,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {getCurrentWorkspaceId} from "@/common/js/utils";
|
||||
import {getCurrentProjectID} from "@/common/js/utils";
|
||||
import {LOCAL} from "@/common/js/constants";
|
||||
|
||||
export default {
|
||||
|
@ -52,7 +52,7 @@ export default {
|
|||
if (this.scene === 'ISSUE') {
|
||||
url = 'field/template/issue/option/';
|
||||
}
|
||||
this.$get(url + getCurrentWorkspaceId(), (response) => {
|
||||
this.$get(url + getCurrentProjectID(), (response) => {
|
||||
this.templateOptions = response.data;
|
||||
this.templateFilterOptions = this.templateOptions;
|
||||
if (!this.data[this.prop]) {
|
|
@ -0,0 +1,64 @@
|
|||
<template>
|
||||
<el-card>
|
||||
<el-tabs class="system-setting" v-model="activeName" @change="changeTab">
|
||||
<el-tab-pane :label="$t('custom_field.name')" name="field" v-if="fieldEnable">
|
||||
<custom-field-list v-if="activeName === 'field'"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('workspace.case_template_manage')" name="caseTemplate" v-if="caseTemplateEnable">
|
||||
<test-case-template-list v-if="activeName === 'caseTemplate'"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('workspace.issue_template_manage')" name="issueTemplate" v-if="issueTemplateEnable">
|
||||
<issues-template-list v-if="activeName === 'issueTemplate'"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CustomFieldList from "@/business/components/project/template/CustomFieldList";
|
||||
import TestCaseTemplateList from "@/business/components/project/template/TestCaseTemplateList";
|
||||
import IssuesTemplateList from "@/business/components/project/template/IssuesTemplateList";
|
||||
import {hasPermissions} from "@/common/js/utils";
|
||||
|
||||
export default {
|
||||
name: "TemplateSetting",
|
||||
components: {IssuesTemplateList, TestCaseTemplateList, CustomFieldList},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'field',
|
||||
fieldEnable: false,
|
||||
caseTemplateEnable: false,
|
||||
issueTemplateEnable: false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.changeTab();
|
||||
},
|
||||
methods: {
|
||||
hasPermissions,
|
||||
changeTab() {
|
||||
// 1
|
||||
if (hasPermissions('PROJECT_TEMPLATE:READ+ISSUE_TEMPLATE')) {
|
||||
this.activeName = 'issueTemplate';
|
||||
this.issueTemplateEnable = true;
|
||||
}
|
||||
|
||||
// 2
|
||||
if (hasPermissions('PROJECT_TEMPLATE:READ+CASE_TEMPLATE')) {
|
||||
this.activeName = 'caseTemplate';
|
||||
this.caseTemplateEnable = true;
|
||||
}
|
||||
|
||||
// 3
|
||||
if (hasPermissions('PROJECT_TEMPLATE:READ+CUSTOM')) {
|
||||
this.activeName = 'field';
|
||||
this.fieldEnable = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -17,14 +17,13 @@
|
|||
|
||||
<script>
|
||||
|
||||
import MsTableHeader from "../../../common/components/MsTableHeader";
|
||||
import TestCaseReportTemplateEdit from "../../../track/plan/view/comonents/report/TestCaseReportTemplateEdit";
|
||||
import TestcaseTemplateItem from "../../../track/plan/view/comonents/report/TestcaseTemplateItem";
|
||||
import {WORKSPACE_ID} from '../../../../../common/js/constants';
|
||||
import MsMainContainer from "../../../common/components/MsMainContainer";
|
||||
import {getCurrentWorkspaceId} from "@/common/js/utils";
|
||||
import MsTableHeader from "../../common/components/MsTableHeader";
|
||||
import TestCaseReportTemplateEdit from "../../track/plan/view/comonents/report/TestCaseReportTemplateEdit";
|
||||
import TestcaseTemplateItem from "../../track/plan/view/comonents/report/TestcaseTemplateItem";
|
||||
import MsMainContainer from "../../common/components/MsMainContainer";
|
||||
import {getCurrentWorkspaceId} from "@/common/js/utils";
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: "TestCaseReportTemplate",
|
||||
components: {MsMainContainer, TestcaseTemplateItem, TestCaseReportTemplateEdit, MsTableHeader},
|
||||
data() {
|
||||
|
@ -32,7 +31,7 @@
|
|||
result: {},
|
||||
condition: {},
|
||||
templates: []
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.initData();
|
|
@ -48,9 +48,9 @@ import TemplateComponentEditHeader
|
|||
from "@/business/components/track/plan/view/comonents/report/TemplateComponentEditHeader";
|
||||
import MsFormDivider from "@/business/components/common/components/MsFormDivider";
|
||||
import {CASE_TYPE_OPTION} from "@/common/js/table-constants";
|
||||
import CustomFieldFormList from "@/business/components/settings/workspace/template/CustomFieldFormList";
|
||||
import CustomFieldRelateList from "@/business/components/settings/workspace/template/CustomFieldRelateList";
|
||||
import FieldTemplateEdit from "@/business/components/settings/workspace/template/FieldTemplateEdit";
|
||||
import CustomFieldFormList from "@/business/components/project/template/CustomFieldFormList";
|
||||
import CustomFieldRelateList from "@/business/components/project/template/CustomFieldRelateList";
|
||||
import FieldTemplateEdit from "@/business/components/project/template/FieldTemplateEdit";
|
||||
import FormRichTextItem from "@/business/components/track/case/components/FormRichTextItem";
|
||||
import TestCaseStepItem from "@/business/components/track/case/components/TestCaseStepItem";
|
||||
import StepChangeItem from "@/business/components/track/case/components/StepChangeItem";
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
<template v-slot:header>
|
||||
<ms-table-header :condition.sync="condition" @search="initTableData" @create="handleCreate"
|
||||
:create-tip="$t('custom_field.template_create')" :title="$t('custom_field.case_template')"/>
|
||||
:create-tip="$t('custom_field.template_create')"/>
|
||||
</template>
|
||||
|
||||
<ms-table
|
||||
|
@ -45,10 +45,10 @@
|
|||
prop="system">
|
||||
<template v-slot="scope">
|
||||
<span v-if="scope.row.system">
|
||||
{{$t('commons.yes')}}
|
||||
{{ $t('commons.yes') }}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{$t('commons.no')}}
|
||||
{{ $t('commons.no') }}
|
||||
</span>
|
||||
</template>
|
||||
</ms-table-column>
|
||||
|
@ -80,7 +80,8 @@
|
|||
</ms-table-column>
|
||||
</ms-table>
|
||||
|
||||
<ms-table-pagination :change="initTableData" :current-page.sync="currentPage" :page-size.sync="pageSize" :total="total"/>
|
||||
<ms-table-pagination :change="initTableData" :current-page.sync="currentPage" :page-size.sync="pageSize"
|
||||
:total="total"/>
|
||||
|
||||
<test-case-template-edit ref="templateEdit" @refresh="initTableData"/>
|
||||
|
||||
|
@ -90,15 +91,15 @@
|
|||
<script>
|
||||
import {CUSTOM_FIELD_LIST} from "@/common/js/default-table-header";
|
||||
import {CASE_TYPE_OPTION} from "@/common/js/table-constants";
|
||||
import {getCurrentWorkspaceId, getDefaultTableHeight} from "@/common/js/utils";
|
||||
import {getCurrentProjectID} from "@/common/js/utils";
|
||||
import MsTableHeader from "@/business/components/common/components/MsTableHeader";
|
||||
import MsTablePagination from "@/business/components/common/pagination/TablePagination";
|
||||
import MsTableButton from "@/business/components/common/components/MsTableButton";
|
||||
import MsTableOperators from "@/business/components/common/components/MsTableOperators";
|
||||
import MsTableColumn from "@/business/components/common/components/table/MsTableColumn";
|
||||
import MsTable from "@/business/components/common/components/table/MsTable";
|
||||
import TestCaseReportTemplate from "@/business/components/settings/workspace/template/TestCaseReportTemplate";
|
||||
import TestCaseTemplateEdit from "@/business/components/settings/workspace/template/TestCaseTemplateEdit";
|
||||
import TestCaseReportTemplate from "@/business/components/project/template/TestCaseReportTemplate";
|
||||
import TestCaseTemplateEdit from "@/business/components/project/template/TestCaseTemplateEdit";
|
||||
|
||||
export default {
|
||||
name: "TestCaseTemplateList",
|
||||
|
@ -106,7 +107,8 @@ export default {
|
|||
TestCaseTemplateEdit,
|
||||
TestCaseReportTemplate,
|
||||
MsTableHeader,
|
||||
MsTablePagination, MsTableButton, MsTableOperators, MsTableColumn, MsTable},
|
||||
MsTablePagination, MsTableButton, MsTableOperators, MsTableColumn, MsTable
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
|
@ -115,7 +117,7 @@ export default {
|
|||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
result: {},
|
||||
caseTypeMap:{
|
||||
caseTypeMap: {
|
||||
functional: this.$t('api_test.home_page.failed_case_list.table_value.case_type.functional')
|
||||
},
|
||||
operators: [
|
||||
|
@ -134,7 +136,7 @@ export default {
|
|||
],
|
||||
};
|
||||
},
|
||||
activated() {
|
||||
created() {
|
||||
this.initTableData();
|
||||
},
|
||||
computed: {
|
||||
|
@ -145,18 +147,20 @@ export default {
|
|||
return new CASE_TYPE_OPTION();
|
||||
},
|
||||
tableHeight() {
|
||||
return getDefaultTableHeight();
|
||||
return document.documentElement.clientHeight - 240;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initTableData() {
|
||||
this.condition.workspaceId = getCurrentWorkspaceId();
|
||||
this.condition.projectId = getCurrentProjectID();
|
||||
this.result = this.$post('field/template/case/list/' + this.currentPage + '/' + this.pageSize,
|
||||
this.condition, (response) => {
|
||||
let data = response.data;
|
||||
this.total = data.itemCount;
|
||||
this.tableData = data.listObject;
|
||||
if (this.$refs.table) {
|
||||
this.$refs.table.reloadTable();
|
||||
}
|
||||
});
|
||||
},
|
||||
handleEdit(data) {
|
|
@ -54,9 +54,9 @@ export default {
|
|||
let projectPermissions = hasPermissions('PROJECT_USER:READ', 'PROJECT_ENVIRONMENT:READ', 'PROJECT_OPERATING_LOG:READ',
|
||||
'PROJECT_FILE:READ+JAR', 'PROJECT_FILE:READ+FILE', 'PROJECT_CUSTOM_CODE:READ');
|
||||
|
||||
let wsPermissions = hasPermissions('WORKSPACE_SERVICE:READ', 'WORKSPACE_MESSAGE:READ', 'WORKSPACE_USER:READ',
|
||||
let wsPermissions = hasPermissions('WORKSPACE_SERVICE:READ', 'PROJECT_MESSAGE:READ', 'WORKSPACE_USER:READ',
|
||||
'WORKSPACE_PROJECT_MANAGER:READ', 'WORKSPACE_PROJECT_ENVIRONMENT:READ', 'WORKSPACE_OPERATING_LOG:READ',
|
||||
'WORKSPACE_TEMPLATE:READ');
|
||||
'PROJECT_TEMPLATE:READ');
|
||||
|
||||
let sysPermissions = hasPermissions('SYSTEM_USER:READ', 'SYSTEM_WORKSPACE:READ', 'SYSTEM_GROUP:READ',
|
||||
'SYSTEM_TEST_POOL:READ', 'SYSTEM_SETTING:READ', 'SYSTEM_AUTH:READ',
|
||||
|
|
|
@ -19,13 +19,6 @@
|
|||
:index="menu.index" class="setting-item">
|
||||
{{ $t(menu.title) }}
|
||||
</el-menu-item>
|
||||
<el-submenu index="2-1" v-permission="['WORKSPACE_TEMPLATE:READ']" class="lower_submenu_title">
|
||||
<template slot="title">{{ $t('workspace.template_manage') }}</template>
|
||||
<el-menu-item v-for="menu in workspaceTemplate" v-permission="menu.permissions" :key="menu.index"
|
||||
:index="menu.index" class="setting-item">
|
||||
{{ $t(menu.title) }}
|
||||
</el-menu-item>
|
||||
</el-submenu>
|
||||
</el-submenu>
|
||||
</el-menu>
|
||||
</template>
|
||||
|
@ -64,9 +57,9 @@ export default {
|
|||
'ORGANIZATION_GROUP:READ', 'SYSTEM_WORKSPACE:READ', 'SYSTEM_TEST_POOL:READ',
|
||||
'SYSTEM_SETTING:READ', 'SYSTEM_QUOTA:READ', 'SYSTEM_AUTH:READ'
|
||||
],
|
||||
workspacePermission: ['WORKSPACE_USER:READ', 'WORKSPACE_SERVICE:READ', 'WORKSPACE_MESSAGE:READ',
|
||||
workspacePermission: ['WORKSPACE_USER:READ', 'WORKSPACE_SERVICE:READ',
|
||||
'WORKSPACE_PROJECT_MANAGER:READ', 'WORKSPACE_PROJECT_ENVIRONMENT:READ',
|
||||
'WORKSPACE_OPERATING_LOG:READ', 'WORKSPACE_TEMPLATE:READ']
|
||||
'WORKSPACE_OPERATING_LOG:READ']
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -28,21 +28,6 @@ export default {
|
|||
component: () => import('@/business/components/settings/system/group/UserGroup'),
|
||||
meta: {system: true, title: 'group.group_permission', permissions: ['SYSTEM_GROUP:READ', 'ORGANIZATION_GROUP:READ']}
|
||||
},
|
||||
{
|
||||
path: 'workspace/template/field',
|
||||
component: () => import('@/business/components/settings/workspace/template/CustomFieldList'),
|
||||
meta: {workspaceTemplate: true, title: 'custom_field.name', permissions: ['WORKSPACE_TEMPLATE:READ+CUSTOM']},
|
||||
},
|
||||
{
|
||||
path: 'workspace/template/case',
|
||||
component: () => import('@/business/components/settings/workspace/template/TestCaseTemplateList'),
|
||||
meta: {workspaceTemplate: true, title: 'workspace.case_template_manage', permissions: ['WORKSPACE_TEMPLATE:READ+CASE_TEMPLATE']},
|
||||
},
|
||||
{
|
||||
path: 'workspace/template/issues',
|
||||
component: () => import('@/business/components/settings/workspace/template/IssuesTemplateList'),
|
||||
meta: {workspaceTemplate: true, title: 'workspace.issue_template_manage', permissions: ['WORKSPACE_TEMPLATE:READ+ISSUE_TEMPLATE']},
|
||||
},
|
||||
{
|
||||
path: 'testresourcepool',
|
||||
component: () => import('@/business/components/settings/system/TestResourcePool'),
|
||||
|
@ -65,11 +50,6 @@ export default {
|
|||
component: () => import('@/business/components/settings/workspace/ServiceIntegration'),
|
||||
meta: {workspace: true, title: 'organization.service_integration', permissions: ['WORKSPACE_SERVICE:READ']}
|
||||
},
|
||||
{
|
||||
path: 'messagesettings',
|
||||
component: () => import('@/business/components/settings/workspace/MessageSettings'),
|
||||
meta: {workspace: true, title: 'organization.message_settings', permissions: ['WORKSPACE_MESSAGE:READ']}
|
||||
},
|
||||
{
|
||||
path: 'personsetting',
|
||||
name: 'PersonSetting',
|
||||
|
|
|
@ -204,7 +204,7 @@ import MsJarConfig from "@/business/components/settings/workspace/JarConfig";
|
|||
import MsTableButton from "../../common/components/MsTableButton";
|
||||
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||
import MsResourceFiles from "@/business/components/performance/test/components/ResourceFiles";
|
||||
import TemplateSelect from "@/business/components/settings/workspace/template/TemplateSelect";
|
||||
import TemplateSelect from "@/business/components/project/template/TemplateSelect";
|
||||
import {PROJECT_CONFIGS} from "@/business/components/common/components/search/search-components";
|
||||
import MsRolesTag from "@/business/components/common/components/MsRolesTag";
|
||||
import AddMember from "@/business/components/settings/common/AddMember";
|
||||
|
|
|
@ -50,12 +50,13 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import MsDialogFooter from "../../../common/components/MsDialogFooter";
|
||||
import {listenGoBack, removeGoBackListener} from "@/common/js/utils";
|
||||
import EnvPopover from "@/business/components/api/automation/scenario/EnvPopover";
|
||||
import {ENV_TYPE} from "@/common/js/constants";
|
||||
import CustomFiledComponent from "@/business/components/settings/workspace/template/CustomFiledComponent";
|
||||
export default {
|
||||
import MsDialogFooter from "../../../common/components/MsDialogFooter";
|
||||
import {listenGoBack, removeGoBackListener} from "@/common/js/utils";
|
||||
import EnvPopover from "@/business/components/api/automation/scenario/EnvPopover";
|
||||
import {ENV_TYPE} from "@/common/js/constants";
|
||||
import CustomFiledComponent from "@/business/components/project/template/CustomFiledComponent";
|
||||
|
||||
export default {
|
||||
name: "BatchEdit",
|
||||
components: {
|
||||
CustomFiledComponent,
|
||||
|
|
|
@ -165,7 +165,7 @@
|
|||
|
||||
<script>
|
||||
import {TokenKey} from '@/common/js/constants';
|
||||
import MsDialogFooter from '../../../common/components/MsDialogFooter'
|
||||
import MsDialogFooter from '../../../common/components/MsDialogFooter';
|
||||
import {
|
||||
getCurrentProjectID,
|
||||
getCurrentUser,
|
||||
|
@ -188,7 +188,7 @@ import {API_STATUS, REVIEW_STATUS} from "@/business/components/api/definition/mo
|
|||
import MsTableButton from "@/business/components/common/components/MsTableButton";
|
||||
import MsSelectTree from "../../../common/select-tree/SelectTree";
|
||||
import MsTestCaseStepRichText from "./MsRichText";
|
||||
import CustomFiledComponent from "@/business/components/settings/workspace/template/CustomFiledComponent";
|
||||
import CustomFiledComponent from "@/business/components/project/template/CustomFiledComponent";
|
||||
import {buildCustomFields, buildTestCaseOldFields, getTemplate, parseCustomField} from "@/common/js/custom_field";
|
||||
import MsFormDivider from "@/business/components/common/components/MsFormDivider";
|
||||
import TestCaseEditOtherInfo from "@/business/components/track/case/components/TestCaseEditOtherInfo";
|
||||
|
|
|
@ -150,12 +150,14 @@
|
|||
|
||||
<script>
|
||||
import {TokenKey} from '@/common/js/constants';
|
||||
import MsDialogFooter from '../../../common/components/MsDialogFooter'
|
||||
import MsDialogFooter from '../../../common/components/MsDialogFooter';
|
||||
import {
|
||||
getCurrentProjectID,
|
||||
getCurrentUser,
|
||||
getNodePath, getUUID,
|
||||
handleCtrlSEvent, hasLicense, hasPermission,
|
||||
getNodePath,
|
||||
getUUID,
|
||||
handleCtrlSEvent,
|
||||
hasLicense,
|
||||
listenGoBack,
|
||||
removeGoBackListener
|
||||
} from "@/common/js/utils";
|
||||
|
@ -170,13 +172,8 @@ import {API_STATUS, REVIEW_STATUS} from "@/business/components/api/definition/mo
|
|||
import MsTableButton from "@/business/components/common/components/MsTableButton";
|
||||
import MsSelectTree from "../../../common/select-tree/SelectTree";
|
||||
import MsTestCaseStepRichText from "./MsRichText";
|
||||
import CustomFiledComponent from "@/business/components/settings/workspace/template/CustomFiledComponent";
|
||||
import {
|
||||
buildCustomFields,
|
||||
buildTestCaseOldFields,
|
||||
getTemplate,
|
||||
parseCustomField
|
||||
} from "@/common/js/custom_field";
|
||||
import CustomFiledComponent from "@/business/components/project/template/CustomFiledComponent";
|
||||
import {buildCustomFields, buildTestCaseOldFields, getTemplate, parseCustomField} from "@/common/js/custom_field";
|
||||
import MsFormDivider from "@/business/components/common/components/MsFormDivider";
|
||||
import TestCaseEditOtherInfo from "@/business/components/track/case/components/TestCaseEditOtherInfo";
|
||||
import FormRichTextItem from "@/business/components/track/case/components/FormRichTextItem";
|
||||
|
|
|
@ -110,19 +110,14 @@
|
|||
import TemplateComponentEditHeader
|
||||
from "@/business/components/track/plan/view/comonents/report/TemplateComponentEditHeader";
|
||||
import MsFormDivider from "@/business/components/common/components/MsFormDivider";
|
||||
import CustomFieldFormList from "@/business/components/settings/workspace/template/CustomFieldFormList";
|
||||
import CustomFieldRelateList from "@/business/components/settings/workspace/template/CustomFieldRelateList";
|
||||
import CustomFieldFormList from "@/business/components/project/template/CustomFieldFormList";
|
||||
import CustomFieldRelateList from "@/business/components/project/template/CustomFieldRelateList";
|
||||
import FormRichTextItem from "@/business/components/track/case/components/FormRichTextItem";
|
||||
import {buildCustomFields, parseCustomField} from "@/common/js/custom_field";
|
||||
import CustomFiledComponent from "@/business/components/settings/workspace/template/CustomFiledComponent";
|
||||
import CustomFiledComponent from "@/business/components/project/template/CustomFiledComponent";
|
||||
import TestCaseIssueList from "@/business/components/track/issue/TestCaseIssueList";
|
||||
import IssueEditDetail from "@/business/components/track/issue/IssueEditDetail";
|
||||
import {
|
||||
getCurrentProjectID,
|
||||
getCurrentUser,
|
||||
getCurrentUserId,
|
||||
getCurrentWorkspaceId,
|
||||
} from "@/common/js/utils";
|
||||
import {getCurrentProjectID, getCurrentUser, getCurrentUserId, getCurrentWorkspaceId,} from "@/common/js/utils";
|
||||
import {enableThirdPartTemplate, getIssuePartTemplateWithProject} from "@/network/Issue";
|
||||
import CustomFiledFormItem from "@/business/components/common/components/form/CustomFiledFormItem";
|
||||
import MsMarkDownText from "@/business/components/track/case/components/MsMarkDownText";
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
:tip="$t('commons.edit')"
|
||||
@click="handleEditTask(scope.$index,scope.row)"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
<ms-tip-button
|
||||
circle
|
||||
type="danger"
|
||||
|
@ -108,7 +108,7 @@
|
|||
v-show="!scope.row.isSet"
|
||||
@click="deleteRowTask(scope.$index,scope.row)"
|
||||
:tip="$t('commons.delete')"
|
||||
v-permission="['WORKSPACE_MESSAGE:READ+EDIT']"/>
|
||||
v-permission="['PROJECT_MESSAGE:READ+EDIT']"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
|
@ -161,12 +161,13 @@ import {buildTestCaseOldFields, getTemplate, parseCustomField} from "@/common/js
|
|||
import FormRichTextItem from "@/business/components/track/case/components/FormRichTextItem";
|
||||
import MsFormDivider from "@/business/components/common/components/MsFormDivider";
|
||||
import TestCaseEditOtherInfo from "@/business/components/track/case/components/TestCaseEditOtherInfo";
|
||||
import CustomFiledComponent from "@/business/components/settings/workspace/template/CustomFiledComponent";
|
||||
import CustomFiledComponent from "@/business/components/project/template/CustomFiledComponent";
|
||||
import {SYSTEM_FIELD_NAME_MAP} from "@/common/js/table-constants";
|
||||
import IssueDescriptionTableItem from "@/business/components/track/issue/IssueDescriptionTableItem";
|
||||
import StepChangeItem from "@/business/components/track/case/components/StepChangeItem";
|
||||
import TestCaseStepItem from "@/business/components/track/case/components/TestCaseStepItem";
|
||||
import TestPlanCaseStepResultsItem from "@/business/components/track/plan/view/comonents/functional/TestPlanCaseStepResultsItem";
|
||||
import TestPlanCaseStepResultsItem
|
||||
from "@/business/components/track/plan/view/comonents/functional/TestPlanCaseStepResultsItem";
|
||||
|
||||
export default {
|
||||
name: "FunctionalTestCaseEdit",
|
||||
|
|
|
@ -167,7 +167,7 @@ import {buildTestCaseOldFields, getTemplate, parseCustomField} from "@/common/js
|
|||
import TestCaseEditOtherInfo from "@/business/components/track/case/components/TestCaseEditOtherInfo";
|
||||
import {SYSTEM_FIELD_NAME_MAP} from "@/common/js/table-constants";
|
||||
import FormRichTextItem from "@/business/components/track/case/components/FormRichTextItem";
|
||||
import CustomFiledComponent from "@/business/components/settings/workspace/template/CustomFiledComponent";
|
||||
import CustomFiledComponent from "@/business/components/project/template/CustomFiledComponent";
|
||||
import StepChangeItem from "@/business/components/track/case/components/StepChangeItem";
|
||||
import TestCaseStepItem from "@/business/components/track/case/components/TestCaseStepItem";
|
||||
import MsPreviousNextButton from "@/business/components/common/components/MsPreviousNextButton";
|
||||
|
|
|
@ -2823,12 +2823,12 @@ export default {
|
|||
read: "READ",
|
||||
edit: "EDIT",
|
||||
},
|
||||
workspace_message: {
|
||||
project_message: {
|
||||
name: "Message",
|
||||
read: "READ",
|
||||
edit: "EDIT",
|
||||
},
|
||||
workspace_template: {
|
||||
project_template: {
|
||||
name: "Template",
|
||||
read: "READ",
|
||||
case_template: "CASE TEMPLATE",
|
||||
|
|
|
@ -2826,12 +2826,12 @@ export default {
|
|||
read: "查询",
|
||||
edit: "编辑"
|
||||
},
|
||||
workspace_message: {
|
||||
project_message: {
|
||||
name: "消息设置",
|
||||
read: "查询",
|
||||
edit: "编辑"
|
||||
},
|
||||
workspace_template: {
|
||||
project_template: {
|
||||
name: "模版设置",
|
||||
read: "查询",
|
||||
case_template: "用例模版",
|
||||
|
|
|
@ -2825,12 +2825,12 @@ export default {
|
|||
read: "查詢",
|
||||
edit: "編輯"
|
||||
},
|
||||
workspace_message: {
|
||||
project_message: {
|
||||
name: "消息設置",
|
||||
read: "查詢",
|
||||
edit: "編輯"
|
||||
},
|
||||
workspace_template: {
|
||||
project_template: {
|
||||
name: "模版設置",
|
||||
read: "查詢",
|
||||
case_template: "用例模版",
|
||||
|
|
|
@ -229,9 +229,9 @@ export default {
|
|||
return;
|
||||
}
|
||||
let redirectUrl = '/';
|
||||
if (hasPermissions('PROJECT_USER:READ', 'PROJECT_ENVIRONMENT:READ', 'PROJECT_OPERATING_LOG:READ', 'PROJECT_FILE:READ+JAR', 'PROJECT_FILE:READ+FILE', 'PROJECT_CUSTOM_CODE:READ')) {
|
||||
if (hasPermissions('PROJECT_USER:READ', 'PROJECT_ENVIRONMENT:READ', 'PROJECT_OPERATING_LOG:READ', 'PROJECT_FILE:READ+JAR', 'PROJECT_FILE:READ+FILE', 'PROJECT_CUSTOM_CODE:READ', 'PROJECT_MESSAGE:READ', 'PROJECT_TEMPLATE:READ')) {
|
||||
redirectUrl = '/project/home';
|
||||
} else if (hasPermissions('WORKSPACE_SERVICE:READ', 'WORKSPACE_MESSAGE:READ', 'WORKSPACE_USER:READ', 'WORKSPACE_PROJECT_MANAGER:READ', 'WORKSPACE_PROJECT_ENVIRONMENT:READ', 'WORKSPACE_OPERATING_LOG:READ', 'WORKSPACE_TEMPLATE:READ')) {
|
||||
} else if (hasPermissions('WORKSPACE_SERVICE:READ', 'WORKSPACE_USER:READ', 'WORKSPACE_PROJECT_MANAGER:READ', 'WORKSPACE_PROJECT_ENVIRONMENT:READ', 'WORKSPACE_OPERATING_LOG:READ')) {
|
||||
redirectUrl = '/setting/project/:type';
|
||||
} else if (hasPermissions('SYSTEM_USER:READ', 'SYSTEM_WORKSPACE:READ', 'SYSTEM_GROUP:READ', 'SYSTEM_TEST_POOL:READ', 'SYSTEM_SETTING:READ', 'SYSTEM_AUTH:READ', 'SYSTEM_QUOTA:READ', 'SYSTEM_OPERATING_LOG:READ')) {
|
||||
redirectUrl = '/setting';
|
||||
|
|
Loading…
Reference in New Issue