feat: 同步第三方平台缺陷状态
This commit is contained in:
parent
d92a0c6717
commit
5e9b66b38d
|
@ -25,9 +25,11 @@ public class Issues implements Serializable {
|
|||
|
||||
private String creator;
|
||||
|
||||
private String resourceId;
|
||||
|
||||
private Integer num;
|
||||
|
||||
private String resourceId;
|
||||
private String platformStatus;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -784,66 +784,6 @@ public class IssuesExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumIsNull() {
|
||||
addCriterion("num is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumIsNotNull() {
|
||||
addCriterion("num is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumEqualTo(Integer value) {
|
||||
addCriterion("num =", value, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumNotEqualTo(Integer value) {
|
||||
addCriterion("num <>", value, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumGreaterThan(Integer value) {
|
||||
addCriterion("num >", value, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("num >=", value, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumLessThan(Integer value) {
|
||||
addCriterion("num <", value, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("num <=", value, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumIn(List<Integer> values) {
|
||||
addCriterion("num in", values, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumNotIn(List<Integer> values) {
|
||||
addCriterion("num not in", values, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumBetween(Integer value1, Integer value2) {
|
||||
addCriterion("num between", value1, value2, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("num not between", value1, value2, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceIdIsNull() {
|
||||
addCriterion("resource_id is null");
|
||||
return (Criteria) this;
|
||||
|
@ -913,6 +853,136 @@ public class IssuesExample {
|
|||
addCriterion("resource_id not between", value1, value2, "resourceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumIsNull() {
|
||||
addCriterion("num is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumIsNotNull() {
|
||||
addCriterion("num is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumEqualTo(Integer value) {
|
||||
addCriterion("num =", value, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumNotEqualTo(Integer value) {
|
||||
addCriterion("num <>", value, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumGreaterThan(Integer value) {
|
||||
addCriterion("num >", value, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("num >=", value, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumLessThan(Integer value) {
|
||||
addCriterion("num <", value, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("num <=", value, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumIn(List<Integer> values) {
|
||||
addCriterion("num in", values, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumNotIn(List<Integer> values) {
|
||||
addCriterion("num not in", values, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumBetween(Integer value1, Integer value2) {
|
||||
addCriterion("num between", value1, value2, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("num not between", value1, value2, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformStatusIsNull() {
|
||||
addCriterion("platform_status is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformStatusIsNotNull() {
|
||||
addCriterion("platform_status is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformStatusEqualTo(String value) {
|
||||
addCriterion("platform_status =", value, "platformStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformStatusNotEqualTo(String value) {
|
||||
addCriterion("platform_status <>", value, "platformStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformStatusGreaterThan(String value) {
|
||||
addCriterion("platform_status >", value, "platformStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformStatusGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("platform_status >=", value, "platformStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformStatusLessThan(String value) {
|
||||
addCriterion("platform_status <", value, "platformStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformStatusLessThanOrEqualTo(String value) {
|
||||
addCriterion("platform_status <=", value, "platformStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformStatusLike(String value) {
|
||||
addCriterion("platform_status like", value, "platformStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformStatusNotLike(String value) {
|
||||
addCriterion("platform_status not like", value, "platformStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformStatusIn(List<String> values) {
|
||||
addCriterion("platform_status in", values, "platformStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformStatusNotIn(List<String> values) {
|
||||
addCriterion("platform_status not in", values, "platformStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformStatusBetween(String value1, String value2) {
|
||||
addCriterion("platform_status between", value1, value2, "platformStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlatformStatusNotBetween(String value1, String value2) {
|
||||
addCriterion("platform_status not between", value1, value2, "platformStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package io.metersphere.base.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
|
@ -12,6 +11,8 @@ public class TestPlanTestCase implements Serializable {
|
|||
|
||||
private String caseId;
|
||||
|
||||
private String reportId;
|
||||
|
||||
private String executor;
|
||||
|
||||
private String status;
|
||||
|
@ -22,8 +23,6 @@ public class TestPlanTestCase implements Serializable {
|
|||
|
||||
private Long updateTime;
|
||||
|
||||
private String reportId;
|
||||
|
||||
private String createUser;
|
||||
|
||||
private Integer issuesCount;
|
||||
|
|
|
@ -314,6 +314,76 @@ public class TestPlanTestCaseExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdIsNull() {
|
||||
addCriterion("report_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdIsNotNull() {
|
||||
addCriterion("report_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdEqualTo(String value) {
|
||||
addCriterion("report_id =", value, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdNotEqualTo(String value) {
|
||||
addCriterion("report_id <>", value, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdGreaterThan(String value) {
|
||||
addCriterion("report_id >", value, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("report_id >=", value, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdLessThan(String value) {
|
||||
addCriterion("report_id <", value, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("report_id <=", value, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdLike(String value) {
|
||||
addCriterion("report_id like", value, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdNotLike(String value) {
|
||||
addCriterion("report_id not like", value, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdIn(List<String> values) {
|
||||
addCriterion("report_id in", values, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdNotIn(List<String> values) {
|
||||
addCriterion("report_id not in", values, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdBetween(String value1, String value2) {
|
||||
addCriterion("report_id between", value1, value2, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdNotBetween(String value1, String value2) {
|
||||
addCriterion("report_id not between", value1, value2, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecutorIsNull() {
|
||||
addCriterion("executor is null");
|
||||
return (Criteria) this;
|
||||
|
@ -644,76 +714,6 @@ public class TestPlanTestCaseExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdIsNull() {
|
||||
addCriterion("report_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdIsNotNull() {
|
||||
addCriterion("report_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdEqualTo(String value) {
|
||||
addCriterion("report_id =", value, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdNotEqualTo(String value) {
|
||||
addCriterion("report_id <>", value, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdGreaterThan(String value) {
|
||||
addCriterion("report_id >", value, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("report_id >=", value, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdLessThan(String value) {
|
||||
addCriterion("report_id <", value, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("report_id <=", value, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdLike(String value) {
|
||||
addCriterion("report_id like", value, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdNotLike(String value) {
|
||||
addCriterion("report_id not like", value, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdIn(List<String> values) {
|
||||
addCriterion("report_id in", values, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdNotIn(List<String> values) {
|
||||
addCriterion("report_id not in", values, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdBetween(String value1, String value2) {
|
||||
addCriterion("report_id between", value1, value2, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andReportIdNotBetween(String value1, String value2) {
|
||||
addCriterion("report_id not between", value1, value2, "reportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserIsNull() {
|
||||
addCriterion("create_user is null");
|
||||
return (Criteria) this;
|
||||
|
|
|
@ -12,8 +12,9 @@
|
|||
<result column="platform" jdbcType="VARCHAR" property="platform" />
|
||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||
<result column="creator" jdbcType="VARCHAR" property="creator" />
|
||||
<result column="num" jdbcType="INTEGER" property="num" />
|
||||
<result column="resource_id" jdbcType="VARCHAR" property="resourceId" />
|
||||
<result column="num" jdbcType="INTEGER" property="num" />
|
||||
<result column="platform_status" jdbcType="VARCHAR" property="platformStatus" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.IssuesWithBLOBs">
|
||||
<result column="description" jdbcType="LONGVARCHAR" property="description" />
|
||||
|
@ -79,7 +80,7 @@
|
|||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, title, `status`, create_time, update_time, reporter, lastmodify, platform, project_id,
|
||||
creator, num, resource_id
|
||||
creator, resource_id, num, platform_status
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
description, custom_fields
|
||||
|
@ -136,13 +137,15 @@
|
|||
insert into issues (id, title, `status`,
|
||||
create_time, update_time, reporter,
|
||||
lastmodify, platform, project_id,
|
||||
creator, num, resource_id,
|
||||
description, custom_fields)
|
||||
creator, resource_id, num,
|
||||
platform_status, description, custom_fields
|
||||
)
|
||||
values (#{id,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{reporter,jdbcType=VARCHAR},
|
||||
#{lastmodify,jdbcType=VARCHAR}, #{platform,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR},
|
||||
#{creator,jdbcType=VARCHAR}, #{num,jdbcType=INTEGER}, #{resourceId,jdbcType=VARCHAR},
|
||||
#{description,jdbcType=LONGVARCHAR}, #{customFields,jdbcType=LONGVARCHAR})
|
||||
#{creator,jdbcType=VARCHAR}, #{resourceId,jdbcType=VARCHAR}, #{num,jdbcType=INTEGER},
|
||||
#{platformStatus,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR}, #{customFields,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.IssuesWithBLOBs">
|
||||
insert into issues
|
||||
|
@ -177,11 +180,14 @@
|
|||
<if test="creator != null">
|
||||
creator,
|
||||
</if>
|
||||
<if test="resourceId != null">
|
||||
resource_id,
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num,
|
||||
</if>
|
||||
<if test="resourceId != null">
|
||||
resource_id,
|
||||
<if test="platformStatus != null">
|
||||
platform_status,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
|
@ -221,11 +227,14 @@
|
|||
<if test="creator != null">
|
||||
#{creator,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="resourceId != null">
|
||||
#{resourceId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
#{num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="resourceId != null">
|
||||
#{resourceId,jdbcType=VARCHAR},
|
||||
<if test="platformStatus != null">
|
||||
#{platformStatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=LONGVARCHAR},
|
||||
|
@ -274,11 +283,14 @@
|
|||
<if test="record.creator != null">
|
||||
creator = #{record.creator,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.resourceId != null">
|
||||
resource_id = #{record.resourceId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.num != null">
|
||||
num = #{record.num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.resourceId != null">
|
||||
resource_id = #{record.resourceId,jdbcType=VARCHAR},
|
||||
<if test="record.platformStatus != null">
|
||||
platform_status = #{record.platformStatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.description != null">
|
||||
description = #{record.description,jdbcType=LONGVARCHAR},
|
||||
|
@ -303,8 +315,9 @@
|
|||
platform = #{record.platform,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
creator = #{record.creator,jdbcType=VARCHAR},
|
||||
num = #{record.num,jdbcType=INTEGER},
|
||||
resource_id = #{record.resourceId,jdbcType=VARCHAR},
|
||||
num = #{record.num,jdbcType=INTEGER},
|
||||
platform_status = #{record.platformStatus,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=LONGVARCHAR},
|
||||
custom_fields = #{record.customFields,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
|
@ -323,8 +336,9 @@
|
|||
platform = #{record.platform,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
creator = #{record.creator,jdbcType=VARCHAR},
|
||||
resource_id = #{record.resourceId,jdbcType=VARCHAR},
|
||||
num = #{record.num,jdbcType=INTEGER},
|
||||
resource_id = #{record.resourceId,jdbcType=VARCHAR}
|
||||
platform_status = #{record.platformStatus,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
|
@ -359,11 +373,14 @@
|
|||
<if test="creator != null">
|
||||
creator = #{creator,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="resourceId != null">
|
||||
resource_id = #{resourceId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="resourceId != null">
|
||||
resource_id = #{resourceId,jdbcType=VARCHAR},
|
||||
<if test="platformStatus != null">
|
||||
platform_status = #{platformStatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=LONGVARCHAR},
|
||||
|
@ -385,8 +402,9 @@
|
|||
platform = #{platform,jdbcType=VARCHAR},
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
creator = #{creator,jdbcType=VARCHAR},
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
resource_id = #{resourceId,jdbcType=VARCHAR},
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
platform_status = #{platformStatus,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=LONGVARCHAR},
|
||||
custom_fields = #{customFields,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
|
@ -402,8 +420,9 @@
|
|||
platform = #{platform,jdbcType=VARCHAR},
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
creator = #{creator,jdbcType=VARCHAR},
|
||||
resource_id = #{resourceId,jdbcType=VARCHAR},
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
resource_id = #{resourceId,jdbcType=VARCHAR}
|
||||
platform_status = #{platformStatus,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
|
@ -5,14 +5,14 @@
|
|||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="plan_id" jdbcType="VARCHAR" property="planId" />
|
||||
<result column="case_id" jdbcType="VARCHAR" property="caseId" />
|
||||
<result column="report_id" jdbcType="VARCHAR" property="reportId" />
|
||||
<result column="executor" jdbcType="VARCHAR" property="executor" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
<result column="report_id" jdbcType="VARCHAR" property="reportId" />
|
||||
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
|
||||
<result column="issues_count" jdbcType="INTEGER" property="issuesCount"/>
|
||||
<result column="issues_count" jdbcType="INTEGER" property="issuesCount" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.TestPlanTestCaseWithBLOBs">
|
||||
<result column="results" jdbcType="LONGVARCHAR" property="results" />
|
||||
|
@ -78,7 +78,7 @@
|
|||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, plan_id, case_id, executor, `status`, remark, create_time, update_time, report_id,
|
||||
id, plan_id, case_id, report_id, executor, `status`, remark, create_time, update_time,
|
||||
create_user, issues_count
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
|
@ -133,16 +133,16 @@
|
|||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.base.domain.TestPlanTestCaseWithBLOBs">
|
||||
insert into test_plan_test_case (id, plan_id, case_id,
|
||||
executor, `status`, remark,
|
||||
create_time, update_time, report_id,
|
||||
create_user, issues_count, results,
|
||||
issues, actual_result)
|
||||
values (#{id,jdbcType=VARCHAR}, #{planId,jdbcType=VARCHAR}, #{caseId,jdbcType=VARCHAR},
|
||||
#{executor,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{reportId,jdbcType=VARCHAR},
|
||||
#{createUser,jdbcType=VARCHAR}, #{issuesCount,jdbcType=INTEGER}, #{results,jdbcType=LONGVARCHAR},
|
||||
#{issues,jdbcType=LONGVARCHAR}, #{actualResult,jdbcType=LONGVARCHAR})
|
||||
insert into test_plan_test_case (id, plan_id, case_id,
|
||||
report_id, executor, `status`,
|
||||
remark, create_time, update_time,
|
||||
create_user, issues_count, results,
|
||||
issues, actual_result)
|
||||
values (#{id,jdbcType=VARCHAR}, #{planId,jdbcType=VARCHAR}, #{caseId,jdbcType=VARCHAR},
|
||||
#{reportId,jdbcType=VARCHAR}, #{executor,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
|
||||
#{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||
#{createUser,jdbcType=VARCHAR}, #{issuesCount,jdbcType=INTEGER}, #{results,jdbcType=LONGVARCHAR},
|
||||
#{issues,jdbcType=LONGVARCHAR}, #{actualResult,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestPlanTestCaseWithBLOBs">
|
||||
insert into test_plan_test_case
|
||||
|
@ -156,6 +156,9 @@
|
|||
<if test="caseId != null">
|
||||
case_id,
|
||||
</if>
|
||||
<if test="reportId != null">
|
||||
report_id,
|
||||
</if>
|
||||
<if test="executor != null">
|
||||
executor,
|
||||
</if>
|
||||
|
@ -171,9 +174,6 @@
|
|||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="reportId != null">
|
||||
report_id,
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user,
|
||||
</if>
|
||||
|
@ -200,6 +200,9 @@
|
|||
<if test="caseId != null">
|
||||
#{caseId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="reportId != null">
|
||||
#{reportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="executor != null">
|
||||
#{executor,jdbcType=VARCHAR},
|
||||
</if>
|
||||
|
@ -215,9 +218,6 @@
|
|||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="reportId != null">
|
||||
#{reportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
#{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
|
@ -253,6 +253,9 @@
|
|||
<if test="record.caseId != null">
|
||||
case_id = #{record.caseId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.reportId != null">
|
||||
report_id = #{record.reportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.executor != null">
|
||||
executor = #{record.executor,jdbcType=VARCHAR},
|
||||
</if>
|
||||
|
@ -268,9 +271,6 @@
|
|||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.reportId != null">
|
||||
report_id = #{record.reportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createUser != null">
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
|
@ -294,19 +294,19 @@
|
|||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update test_plan_test_case
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
plan_id = #{record.planId,jdbcType=VARCHAR},
|
||||
case_id = #{record.caseId,jdbcType=VARCHAR},
|
||||
executor = #{record.executor,jdbcType=VARCHAR},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
remark = #{record.remark,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
report_id = #{record.reportId,jdbcType=VARCHAR},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
issues_count = #{record.issuesCount,jdbcType=INTEGER},
|
||||
results = #{record.results,jdbcType=LONGVARCHAR},
|
||||
issues = #{record.issues,jdbcType=LONGVARCHAR},
|
||||
actual_result = #{record.actualResult,jdbcType=LONGVARCHAR}
|
||||
plan_id = #{record.planId,jdbcType=VARCHAR},
|
||||
case_id = #{record.caseId,jdbcType=VARCHAR},
|
||||
report_id = #{record.reportId,jdbcType=VARCHAR},
|
||||
executor = #{record.executor,jdbcType=VARCHAR},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
remark = #{record.remark,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
issues_count = #{record.issuesCount,jdbcType=INTEGER},
|
||||
results = #{record.results,jdbcType=LONGVARCHAR},
|
||||
issues = #{record.issues,jdbcType=LONGVARCHAR},
|
||||
actual_result = #{record.actualResult,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
|
@ -314,16 +314,16 @@
|
|||
<update id="updateByExample" parameterType="map">
|
||||
update test_plan_test_case
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
plan_id = #{record.planId,jdbcType=VARCHAR},
|
||||
case_id = #{record.caseId,jdbcType=VARCHAR},
|
||||
executor = #{record.executor,jdbcType=VARCHAR},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
remark = #{record.remark,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
report_id = #{record.reportId,jdbcType=VARCHAR},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
issues_count = #{record.issuesCount,jdbcType=INTEGER}
|
||||
plan_id = #{record.planId,jdbcType=VARCHAR},
|
||||
case_id = #{record.caseId,jdbcType=VARCHAR},
|
||||
report_id = #{record.reportId,jdbcType=VARCHAR},
|
||||
executor = #{record.executor,jdbcType=VARCHAR},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
remark = #{record.remark,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
issues_count = #{record.issuesCount,jdbcType=INTEGER}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
|
@ -337,6 +337,9 @@
|
|||
<if test="caseId != null">
|
||||
case_id = #{caseId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="reportId != null">
|
||||
report_id = #{reportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="executor != null">
|
||||
executor = #{executor,jdbcType=VARCHAR},
|
||||
</if>
|
||||
|
@ -352,9 +355,6 @@
|
|||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="reportId != null">
|
||||
report_id = #{reportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
|
@ -375,33 +375,33 @@
|
|||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.TestPlanTestCaseWithBLOBs">
|
||||
update test_plan_test_case
|
||||
set plan_id = #{planId,jdbcType=VARCHAR},
|
||||
case_id = #{caseId,jdbcType=VARCHAR},
|
||||
executor = #{executor,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
report_id = #{reportId,jdbcType=VARCHAR},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
issues_count = #{issuesCount,jdbcType=INTEGER},
|
||||
results = #{results,jdbcType=LONGVARCHAR},
|
||||
issues = #{issues,jdbcType=LONGVARCHAR},
|
||||
actual_result = #{actualResult,jdbcType=LONGVARCHAR}
|
||||
set plan_id = #{planId,jdbcType=VARCHAR},
|
||||
case_id = #{caseId,jdbcType=VARCHAR},
|
||||
report_id = #{reportId,jdbcType=VARCHAR},
|
||||
executor = #{executor,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
issues_count = #{issuesCount,jdbcType=INTEGER},
|
||||
results = #{results,jdbcType=LONGVARCHAR},
|
||||
issues = #{issues,jdbcType=LONGVARCHAR},
|
||||
actual_result = #{actualResult,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestPlanTestCase">
|
||||
update test_plan_test_case
|
||||
set plan_id = #{planId,jdbcType=VARCHAR},
|
||||
case_id = #{caseId,jdbcType=VARCHAR},
|
||||
executor = #{executor,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
report_id = #{reportId,jdbcType=VARCHAR},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
issues_count = #{issuesCount,jdbcType=INTEGER}
|
||||
set plan_id = #{planId,jdbcType=VARCHAR},
|
||||
case_id = #{caseId,jdbcType=VARCHAR},
|
||||
report_id = #{reportId,jdbcType=VARCHAR},
|
||||
executor = #{executor,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
issues_count = #{issuesCount,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
|
@ -14,7 +14,7 @@
|
|||
<select id="getIssuesByProjectId" resultType="io.metersphere.base.domain.IssuesDao">
|
||||
select issues.id, issues.num, ifnull(issues.title, '') as title, issues.project_id, issues.create_time, issues.update_time,
|
||||
ifnull(issues.description, '') as description, issues.status, issues.platform, issues.custom_fields, issues.reporter,
|
||||
issues.creator,issues.resource_id,
|
||||
issues.creator,issues.resource_id,issues.platform_status,
|
||||
issues.lastmodify
|
||||
from issues
|
||||
<include refid="queryWhereCondition"/>
|
||||
|
|
|
@ -1444,8 +1444,8 @@ public class UserService {
|
|||
return SessionUtils.getUser();
|
||||
}
|
||||
|
||||
public UserDTO.PlatformInfo getCurrentPlatformInfo(String orgId, String userId) {
|
||||
User user = userMapper.selectByPrimaryKey(userId);
|
||||
public UserDTO.PlatformInfo getCurrentPlatformInfo(String orgId) {
|
||||
User user = userMapper.selectByPrimaryKey(SessionUtils.getUserId());
|
||||
String platformInfoStr = user.getPlatformInfo();
|
||||
if (StringUtils.isBlank(orgId) || StringUtils.isBlank(platformInfoStr)) {
|
||||
return null;
|
||||
|
|
|
@ -207,7 +207,7 @@ public abstract class AbstractIssuePlatform implements IssuesPlatform {
|
|||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
protected UserDTO.PlatformInfo getUserPlatInfo(String orgId, String userId) {
|
||||
return userService.getCurrentPlatformInfo(orgId, userId);
|
||||
protected UserDTO.PlatformInfo getUserPlatInfo(String orgId) {
|
||||
return userService.getCurrentPlatformInfo(orgId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,12 +49,19 @@ public class JiraPlatform extends AbstractIssuePlatform {
|
|||
super(issuesRequest);
|
||||
}
|
||||
|
||||
public JiraConfig getConfig(String orgId) {
|
||||
public JiraConfig getConfig() {
|
||||
String config = getPlatformConfig(IssuesManagePlatform.Jira.toString());
|
||||
JiraConfig jiraConfig = JSONObject.parseObject(config, JiraConfig.class);
|
||||
validateConfig(jiraConfig);
|
||||
return jiraConfig;
|
||||
}
|
||||
|
||||
public JiraConfig getUserConfig() {
|
||||
JiraConfig jiraConfig = null;
|
||||
String config = getPlatformConfig(IssuesManagePlatform.Jira.toString());
|
||||
if (StringUtils.isNotBlank(config)) {
|
||||
jiraConfig = JSONObject.parseObject(config, JiraConfig.class);
|
||||
UserDTO.PlatformInfo userPlatInfo = getUserPlatInfo(orgId, userId);
|
||||
UserDTO.PlatformInfo userPlatInfo = getUserPlatInfo(this.orgId);
|
||||
if (userPlatInfo != null && StringUtils.isNotBlank(userPlatInfo.getJiraAccount())
|
||||
&& StringUtils.isNotBlank(userPlatInfo.getJiraPassword())) {
|
||||
jiraConfig.setAccount(userPlatInfo.getJiraAccount());
|
||||
|
@ -74,25 +81,6 @@ public class JiraPlatform extends AbstractIssuePlatform {
|
|||
} else {
|
||||
issues = extIssuesMapper.getIssuesByCaseId(issuesRequest);
|
||||
}
|
||||
// setConfig(issuesRequest.getOrganizationId());
|
||||
// issues.forEach(item -> {
|
||||
// String issuesId = item.getId();
|
||||
// parseIssue(item, jiraClientV2.getIssues(issuesId));
|
||||
// if (StringUtils.isBlank(item.getId())) {
|
||||
// // 缺陷不存在,解除用例和缺陷的关联
|
||||
// TestCaseIssuesExample issuesExample = new TestCaseIssuesExample();
|
||||
// issuesExample.createCriteria()
|
||||
// .andTestCaseIdEqualTo(testCaseId)
|
||||
// .andIssuesIdEqualTo(issuesId);
|
||||
// testCaseIssuesMapper.deleteByExample(issuesExample);
|
||||
// issuesMapper.deleteByPrimaryKey(issuesId);
|
||||
// } else {
|
||||
// // 缺陷状态为 完成,则不显示
|
||||
// if (!StringUtils.equals("done", item.getStatus())) {
|
||||
// list.add(item);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
return issues;
|
||||
}
|
||||
|
||||
|
@ -104,7 +92,7 @@ public class JiraPlatform extends AbstractIssuePlatform {
|
|||
JSONObject assignee = (JSONObject) fields.get("assignee");
|
||||
if (statusObj != null) {
|
||||
JSONObject statusCategory = (JSONObject) statusObj.get("statusCategory");
|
||||
status = statusCategory.getString("key");
|
||||
status = statusCategory.getString("name");
|
||||
}
|
||||
|
||||
String description = fields.getString("description");
|
||||
|
@ -122,7 +110,7 @@ public class JiraPlatform extends AbstractIssuePlatform {
|
|||
item.setCreateTime(fields.getLong("created"));
|
||||
item.setLastmodify(lastmodify);
|
||||
item.setDescription(description);
|
||||
item.setStatus(status);
|
||||
item.setPlatformStatus(status);
|
||||
item.setPlatform(IssuesManagePlatform.Jira.toString());
|
||||
}
|
||||
|
||||
|
@ -198,14 +186,14 @@ public class JiraPlatform extends AbstractIssuePlatform {
|
|||
public void addIssue(IssuesUpdateRequest issuesRequest) {
|
||||
issuesRequest.setPlatform(IssuesManagePlatform.Jira.toString());
|
||||
|
||||
JiraConfig config = setConfig(issuesRequest.getOrganizationId());// todo
|
||||
JiraConfig config = getUserConfig();
|
||||
jiraClientV2.setConfig(config);
|
||||
|
||||
String jiraKey = validateJiraKey(issuesRequest.getProjectId());
|
||||
|
||||
JSONObject fields = new JSONObject();
|
||||
JSONObject project = new JSONObject();
|
||||
|
||||
// String desc = ms2JiraDescription(issuesRequest.getDescription());
|
||||
String desc = issuesRequest.getDescription();
|
||||
|
||||
fields.put("project", project);
|
||||
|
@ -273,7 +261,7 @@ public class JiraPlatform extends AbstractIssuePlatform {
|
|||
|
||||
@Override
|
||||
public void testAuth() {
|
||||
setConfig(null);
|
||||
setConfig();
|
||||
jiraClientV2.getIssueCreateMetadata();
|
||||
}
|
||||
|
||||
|
@ -283,21 +271,17 @@ public class JiraPlatform extends AbstractIssuePlatform {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void syncIssues(Project project, List<IssuesDao> tapdIssues) {
|
||||
tapdIssues.forEach(item -> {
|
||||
setConfig(null);
|
||||
public void syncIssues(Project project, List<IssuesDao> issues) {
|
||||
issues.forEach(item -> {
|
||||
setConfig();
|
||||
try {
|
||||
parseIssue(item, jiraClientV2.getIssues(item.getId()));
|
||||
item.setDescription(jiraDescription2Ms(item.getDescription()));
|
||||
// 缺陷状态为 完成,则不显示
|
||||
if (StringUtils.equals("done", item.getStatus())) {
|
||||
item.setStatus(IssuesStatus.RESOLVED.toString());
|
||||
}
|
||||
issuesMapper.updateByPrimaryKeySelective(item);
|
||||
} catch (HttpClientErrorException e) {
|
||||
if (e.getRawStatusCode() == 404) {
|
||||
// 标记成删除
|
||||
item.setStatus(IssuesStatus.DELETE.toString());
|
||||
item.setPlatformStatus(IssuesStatus.DELETE.toString());
|
||||
issuesMapper.deleteByPrimaryKey(item.getId());
|
||||
}
|
||||
}
|
||||
|
@ -314,19 +298,9 @@ public class JiraPlatform extends AbstractIssuePlatform {
|
|||
return project.getJiraKey();
|
||||
}
|
||||
|
||||
public JiraConfig setConfig(String orgId) {
|
||||
JiraConfig config = getConfig(orgId);
|
||||
public JiraConfig setConfig() {
|
||||
JiraConfig config = getConfig();
|
||||
jiraClientV2.setConfig(config);
|
||||
return config;
|
||||
}
|
||||
|
||||
public IssuesWithBLOBs getJiraIssues(IssuesWithBLOBs issuesDao, String issueId) {
|
||||
setConfig(null);
|
||||
if (issuesDao == null) {
|
||||
issuesDao = new IssuesDao();
|
||||
}
|
||||
parseIssue(issuesDao, jiraClientV2.getIssues(issueId));
|
||||
return issuesDao;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import io.metersphere.base.domain.IssuesDao;
|
|||
import io.metersphere.base.domain.Project;
|
||||
import io.metersphere.base.domain.TestCaseWithBLOBs;
|
||||
import io.metersphere.commons.constants.IssuesManagePlatform;
|
||||
import io.metersphere.commons.constants.IssuesStatus;
|
||||
import io.metersphere.commons.exception.MSException;
|
||||
import io.metersphere.commons.utils.BeanUtils;
|
||||
import io.metersphere.commons.utils.LogUtil;
|
||||
|
@ -56,28 +57,6 @@ public class TapdPlatform extends AbstractIssuePlatform {
|
|||
} else {
|
||||
issues = extIssuesMapper.getIssuesByCaseId(issuesRequest);
|
||||
}
|
||||
// issues.forEach(item -> {
|
||||
// String issuesId = item.getId();
|
||||
// IssuesDao dto = getTapdIssues(tapdId, issuesId);
|
||||
// dto.setNum(item.getNum());
|
||||
// if (StringUtils.isBlank(dto.getId())) {
|
||||
// // 缺陷不存在,解除用例和缺陷的关联
|
||||
// TestCaseIssuesExample issuesExample = new TestCaseIssuesExample();
|
||||
// TestCaseIssuesExample.Criteria criteria = issuesExample.createCriteria();
|
||||
// if (StringUtils.isNotBlank(testCaseId)) {
|
||||
// criteria.andTestCaseIdEqualTo(testCaseId);
|
||||
// }
|
||||
// criteria.andIssuesIdEqualTo(issuesId);
|
||||
// testCaseIssuesMapper.deleteByExample(issuesExample);
|
||||
// issuesMapper.deleteByPrimaryKey(issuesId);
|
||||
// } else {
|
||||
// dto.setPlatform(IssuesManagePlatform.Tapd.toString());
|
||||
// // 缺陷状态为 关闭,则不显示
|
||||
// if (!StringUtils.equals(IssuesStatus.CLOSED.toString(), dto.getStatus())) {
|
||||
// list.add(dto);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
return issues;
|
||||
}
|
||||
|
||||
|
@ -102,31 +81,6 @@ public class TapdPlatform extends AbstractIssuePlatform {
|
|||
return demandList;
|
||||
}
|
||||
|
||||
public IssuesDao getTapdIssues(String projectId, String issuesId) {
|
||||
String url = "https://api.tapd.cn/bugs?workspace_id=" + projectId + "&id=" + issuesId;
|
||||
ResultHolder call = call(url);
|
||||
String listJson = JSON.toJSONString(call.getData());
|
||||
if (StringUtils.equals(Boolean.FALSE.toString(), listJson)) {
|
||||
return new IssuesDao();
|
||||
}
|
||||
JSONObject jsonObject = JSONObject.parseObject(listJson);
|
||||
JSONObject bug = jsonObject.getJSONObject("Bug");
|
||||
Long created = bug.getLong("created");
|
||||
IssuesDao issues = jsonObject.getObject("Bug", IssuesDao.class);
|
||||
|
||||
// 获取工作流中缺陷状态名称 todo
|
||||
String workflow = "https://api.tapd.cn/workflows/status_map?workspace_id=" + projectId + "&system=bug";
|
||||
ResultHolder resultHolder = call(workflow);
|
||||
String workflowJson = JSON.toJSONString(resultHolder.getData());
|
||||
if (!StringUtils.equals(Boolean.FALSE.toString(), workflowJson)) {
|
||||
Map map = (Map) JSONObject.parse(workflowJson);
|
||||
issues.setStatus((String) map.get(issues.getStatus()));
|
||||
}
|
||||
|
||||
issues.setCreateTime(created);
|
||||
return issues;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addIssue(IssuesUpdateRequest issuesRequest) {
|
||||
issuesRequest.setPlatform(IssuesManagePlatform.Tapd.toString());
|
||||
|
@ -226,11 +180,18 @@ public class TapdPlatform extends AbstractIssuePlatform {
|
|||
int pageNum = 1;
|
||||
int limit = 200;
|
||||
int count = 200;
|
||||
|
||||
List<String> ids = tapdIssues.stream()
|
||||
.map(Issues::getId)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
setConfig(null);
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
return;
|
||||
}
|
||||
|
||||
setConfig();
|
||||
|
||||
Map<String, String> statusMap = tapdClient.getStatusMap(project.getTapdId());
|
||||
|
||||
while (count == limit) {
|
||||
count = 0;
|
||||
|
@ -242,10 +203,18 @@ public class TapdPlatform extends AbstractIssuePlatform {
|
|||
TapdGetIssueResponse.Bug bug = issue.getBug();
|
||||
IssuesDao issuesDao = new IssuesDao();
|
||||
BeanUtils.copyBean(issuesDao, bug);
|
||||
// tapdClient.getStatusMap(projectId);
|
||||
issuesDao.setPlatformStatus(statusMap.get(bug.getStatus()));
|
||||
issuesMapper.updateByPrimaryKeySelective(issuesDao);
|
||||
ids.remove(issue.getBug().getId());
|
||||
});
|
||||
}
|
||||
// 查不到的就置为删除
|
||||
ids.forEach((id) -> {
|
||||
IssuesDao issuesDao = new IssuesDao();
|
||||
issuesDao.setId(id);
|
||||
issuesDao.setPlatformStatus(IssuesStatus.DELETE.toString());
|
||||
issuesMapper.updateByPrimaryKeySelective(issuesDao);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -258,12 +227,12 @@ public class TapdPlatform extends AbstractIssuePlatform {
|
|||
return project.getTapdId();
|
||||
}
|
||||
|
||||
public TapdConfig getConfig(String orgId) {
|
||||
public TapdConfig getConfig() {
|
||||
TapdConfig tapdConfig = null;
|
||||
String config = getPlatformConfig(IssuesManagePlatform.Tapd.toString());
|
||||
if (StringUtils.isNotBlank(config)) {
|
||||
tapdConfig = JSONObject.parseObject(config, TapdConfig.class);
|
||||
UserDTO.PlatformInfo userPlatInfo = getUserPlatInfo(orgId, SessionUtils.getUserId());
|
||||
UserDTO.PlatformInfo userPlatInfo = getUserPlatInfo(this.orgId);
|
||||
if (userPlatInfo != null && StringUtils.isNotBlank(userPlatInfo.getTapdUserName())) {
|
||||
// tapdConfig.setAccount(userPlatInfo.getTapdUserName());
|
||||
}
|
||||
|
@ -272,8 +241,8 @@ public class TapdPlatform extends AbstractIssuePlatform {
|
|||
return tapdConfig;
|
||||
}
|
||||
|
||||
public TapdConfig setConfig(String orgId) {
|
||||
TapdConfig config = getConfig(orgId);
|
||||
public TapdConfig setConfig() {
|
||||
TapdConfig config = getConfig();
|
||||
tapdClient.setConfig(config);
|
||||
return config;
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import io.metersphere.base.domain.IssuesExample;
|
|||
import io.metersphere.base.domain.Project;
|
||||
import io.metersphere.base.domain.TestCaseWithBLOBs;
|
||||
import io.metersphere.commons.constants.IssuesManagePlatform;
|
||||
import io.metersphere.commons.constants.IssuesStatus;
|
||||
import io.metersphere.commons.exception.MSException;
|
||||
import io.metersphere.commons.utils.LogUtil;
|
||||
import io.metersphere.track.dto.DemandDTO;
|
||||
|
@ -66,6 +67,7 @@ public class ZentaoPlatform extends AbstractIssuePlatform {
|
|||
this.account = object.getString("account");
|
||||
this.password = object.getString("password");
|
||||
this.url = object.getString("url");
|
||||
this.orgId = issuesRequest.getOrganizationId();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -137,15 +139,15 @@ public class ZentaoPlatform extends AbstractIssuePlatform {
|
|||
} catch (Exception e) {
|
||||
LogUtil.error(e.getMessage(), e);
|
||||
}
|
||||
if (StringUtils.equals(bug.getDeleted(),"1")) {
|
||||
// todo
|
||||
return new IssuesDao();
|
||||
}
|
||||
IssuesDao issues = new IssuesDao();
|
||||
issues.setId(bug.getId());
|
||||
if (StringUtils.equals(bug.getDeleted(),"1")) {
|
||||
issues.setPlatformStatus(IssuesStatus.DELETE.toString());
|
||||
issuesMapper.updateByPrimaryKeySelective(issues);
|
||||
}
|
||||
issues.setTitle(bug.getTitle());
|
||||
issues.setDescription(steps);
|
||||
issues.setStatus(bug.getStatus());
|
||||
issues.setPlatformStatus(bug.getStatus());
|
||||
issues.setReporter(bug.getOpenedBy());
|
||||
return issues;
|
||||
}
|
||||
|
@ -275,28 +277,6 @@ public class ZentaoPlatform extends AbstractIssuePlatform {
|
|||
setConfig();
|
||||
IssuesDao issuesDao = getZentaoIssues(item.getId());
|
||||
issuesMapper.updateByPrimaryKeySelective(issuesDao);
|
||||
|
||||
// 标记成删除
|
||||
// item.setStatus(IssuesStatus.DELETE.toString());
|
||||
// issuesMapper.deleteByPrimaryKey(item.getId());
|
||||
|
||||
// if (StringUtils.isBlank(dto.getId())) {
|
||||
// // 缺陷不存在,解除用例和缺陷的关联
|
||||
// TestCaseIssuesExample issuesExample = new TestCaseIssuesExample();
|
||||
// TestCaseIssuesExample.Criteria criteria = issuesExample.createCriteria();
|
||||
// if (StringUtils.isNotBlank(testCaseId)) {
|
||||
// criteria.andTestCaseIdEqualTo(testCaseId);
|
||||
// }
|
||||
// criteria.andIssuesIdEqualTo(issuesId);
|
||||
// testCaseIssuesMapper.deleteByExample(issuesExample);
|
||||
// issuesMapper.deleteByPrimaryKey(issuesId);
|
||||
// } else {
|
||||
// dto.setPlatform(IssuesManagePlatform.Zentao.toString());
|
||||
// // 缺陷状态为 关闭,则不显示
|
||||
// if (!StringUtils.equals("closed", dto.getStatus())) {
|
||||
// list.add(dto);
|
||||
// }
|
||||
// }
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package io.metersphere.track.issue.client;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.metersphere.commons.exception.MSException;
|
||||
import io.metersphere.track.issue.domain.tapd.TapdConfig;
|
||||
import io.metersphere.track.issue.domain.tapd.TapdGetIssueResponse;
|
||||
import io.metersphere.track.issue.domain.tapd.TapdStatusMapResponse;
|
||||
import org.springframework.http.HttpEntity;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpMethod;
|
||||
|
@ -13,6 +13,7 @@ import org.springframework.util.CollectionUtils;
|
|||
import org.springframework.util.MultiValueMap;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Component
|
||||
public class TapdClient extends BaseClient {
|
||||
|
@ -28,10 +29,13 @@ public class TapdClient extends BaseClient {
|
|||
return getIssueForPageByIds(projectId, pageNum, limit, null);
|
||||
}
|
||||
|
||||
public TapdStatusMapResponse getStatusMap(String projectId) {
|
||||
public Map<String, String> getStatusMap(String projectId) {
|
||||
String url = getBaseUrl() + "/workflows/status_map?workspace_id={1}&system=bug";
|
||||
ResponseEntity<String> response = restTemplate.exchange(url, HttpMethod.GET, getAuthHttpEntity(), String.class, projectId);
|
||||
return (TapdStatusMapResponse) getResultForObject(TapdStatusMapResponse.class, response);
|
||||
String resultForObject = (String) getResultForObject(String.class, response);
|
||||
JSONObject jsonObject = JSONObject.parseObject(resultForObject);
|
||||
String data = jsonObject.getString("data");
|
||||
return JSONObject.parseObject(data, Map.class);
|
||||
}
|
||||
|
||||
public TapdGetIssueResponse getIssueForPageByIds(String projectId, int pageNum, int limit, List<String> ids) {
|
||||
|
|
|
@ -28,6 +28,6 @@ public class TapdGetIssueResponse {
|
|||
// private String priority;
|
||||
// private String severity;
|
||||
// private String reporter;
|
||||
// private String status;
|
||||
private String status;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
package io.metersphere.track.issue.domain.tapd;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class TapdStatusMapResponse {
|
||||
|
||||
private int status;
|
||||
private Data data;
|
||||
private String info;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class Data {
|
||||
@JSONField(name = "new")
|
||||
private String create;
|
||||
@JSONField(name = "in_progress")
|
||||
private String inProgress;
|
||||
private String resolved;
|
||||
private String verified;
|
||||
private String reopened;
|
||||
private String rejected;
|
||||
private String closed;
|
||||
}
|
||||
|
||||
}
|
|
@ -8,6 +8,7 @@ import io.metersphere.commons.constants.IssuesManagePlatform;
|
|||
import io.metersphere.commons.constants.NoticeConstants;
|
||||
import io.metersphere.commons.exception.MSException;
|
||||
import io.metersphere.commons.user.SessionUser;
|
||||
import io.metersphere.commons.utils.BeanUtils;
|
||||
import io.metersphere.commons.utils.LogUtil;
|
||||
import io.metersphere.commons.utils.ServiceUtils;
|
||||
import io.metersphere.commons.utils.SessionUtils;
|
||||
|
@ -129,7 +130,7 @@ public class IssuesService {
|
|||
platforms.add(IssuesManagePlatform.Local.toString());
|
||||
}
|
||||
IssuesRequest issuesRequest = new IssuesRequest();
|
||||
issuesRequest.setTestCaseId(updateRequest.getTestCaseId());
|
||||
BeanUtils.copyBean(issuesRequest, updateRequest);
|
||||
return IssueFactory.createPlatforms(platforms, issuesRequest);
|
||||
}
|
||||
|
||||
|
@ -402,6 +403,7 @@ public class IssuesService {
|
|||
public void syncThirdPartyIssues(String projectId) {
|
||||
if (StringUtils.isNotBlank(projectId)) {
|
||||
Project project = projectService.getProjectById(projectId);
|
||||
Workspace workspace = workspaceMapper.selectByPrimaryKey(project.getWorkspaceId());
|
||||
|
||||
List<IssuesDao> issues = extIssuesMapper.getIssueForSync(projectId);
|
||||
|
||||
|
@ -421,12 +423,13 @@ public class IssuesService {
|
|||
|
||||
IssuesRequest issuesRequest = new IssuesRequest();
|
||||
issuesRequest.setProjectId(projectId);
|
||||
issuesRequest.setOrganizationId(workspace.getOrganizationId());
|
||||
if (CollectionUtils.isNotEmpty(tapdIssues)) {
|
||||
TapdPlatform tapdPlatform = new TapdPlatform(issuesRequest);
|
||||
syncThirdPartyIssues(tapdPlatform::syncIssues, project, tapdIssues);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(jiraIssues)) {
|
||||
JiraPlatform jiraPlatform = new JiraPlatform(new IssuesRequest());
|
||||
JiraPlatform jiraPlatform = new JiraPlatform(issuesRequest);
|
||||
syncThirdPartyIssues(jiraPlatform::syncIssues, project, jiraIssues);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(zentaoIssues)) {
|
||||
|
|
|
@ -45,7 +45,7 @@ CREATE TABLE `QRTZ_TRIGGERS` (
|
|||
KEY `IDX_QRTZ_T_NFT_MISFIRE` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`),
|
||||
KEY `IDX_QRTZ_T_NFT_ST_MISFIRE` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`,`TRIGGER_STATE`),
|
||||
KEY `IDX_QRTZ_T_NFT_ST_MISFIRE_GRP` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`,`TRIGGER_GROUP`,`TRIGGER_STATE`),
|
||||
CONSTRAINT `qrtz_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) REFERENCES `qrtz_job_details` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`)
|
||||
CONSTRAINT `qrtz_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) REFERENCES `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci;
|
||||
|
||||
CREATE TABLE `QRTZ_BLOB_TRIGGERS` (
|
||||
|
@ -55,7 +55,7 @@ CREATE TABLE `QRTZ_BLOB_TRIGGERS` (
|
|||
`BLOB_DATA` blob,
|
||||
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
|
||||
KEY `SCHED_NAME` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
|
||||
CONSTRAINT `qrtz_blob_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `qrtz_triggers` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
|
||||
CONSTRAINT `qrtz_blob_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci;
|
||||
|
||||
CREATE TABLE `QRTZ_CALENDARS` (
|
||||
|
@ -72,7 +72,7 @@ CREATE TABLE `QRTZ_CRON_TRIGGERS` (
|
|||
`CRON_EXPRESSION` varchar(120) NOT NULL,
|
||||
`TIME_ZONE_ID` varchar(80) DEFAULT NULL,
|
||||
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
|
||||
CONSTRAINT `qrtz_cron_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `qrtz_triggers` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
|
||||
CONSTRAINT `qrtz_cron_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci;
|
||||
|
||||
CREATE TABLE `QRTZ_FIRED_TRIGGERS` (
|
||||
|
@ -126,7 +126,7 @@ CREATE TABLE `QRTZ_SIMPLE_TRIGGERS` (
|
|||
`REPEAT_INTERVAL` bigint(12) NOT NULL,
|
||||
`TIMES_TRIGGERED` bigint(10) NOT NULL,
|
||||
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
|
||||
CONSTRAINT `qrtz_simple_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `qrtz_triggers` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
|
||||
CONSTRAINT `qrtz_simple_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci;
|
||||
|
||||
CREATE TABLE `QRTZ_SIMPROP_TRIGGERS` (
|
||||
|
@ -145,7 +145,7 @@ CREATE TABLE `QRTZ_SIMPROP_TRIGGERS` (
|
|||
`BOOL_PROP_1` varchar(1) DEFAULT NULL,
|
||||
`BOOL_PROP_2` varchar(1) DEFAULT NULL,
|
||||
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
|
||||
CONSTRAINT `qrtz_simprop_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `qrtz_triggers` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
|
||||
CONSTRAINT `qrtz_simprop_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci;
|
||||
|
||||
-- quartz end
|
||||
|
|
|
@ -15,3 +15,5 @@ alter table test_plan_test_case
|
|||
-- 对接Jira等平台认证信息
|
||||
ALTER TABLE `user`
|
||||
ADD platform_info LONGTEXT NULL COMMENT ' 其他平台对接信息';
|
||||
|
||||
ALTER TABLE issues ADD platform_status varchar(50) NULL COMMENT '第三方平台状态';
|
||||
|
|
|
@ -169,7 +169,7 @@ export default {
|
|||
}
|
||||
if (platform === 'Tapd') {
|
||||
this.hasTapdId = true;
|
||||
this.result = this.$post("/issues/tapd/user", {projectId: this.projectId}, (response) => {
|
||||
this.result = this.$post("/issues/tapd/user", {projectId: this.projectId, organizationId: getCurrentOrganizationId()}, (response) => {
|
||||
this.tapdUsers = response.data;
|
||||
});
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
:create-tip="$t('test_track.issue.create_issue')" :title="$t('test_track.issue.issue_list')"
|
||||
:tip="$t('commons.search_by_name_or_id')">
|
||||
<template v-slot:button>
|
||||
<el-tooltip v-if="hasThirdPart" :content="'更新第三方平台的缺陷内容'">
|
||||
<el-tooltip v-if="isThirdPart" :content="'更新第三方平台的缺陷'">
|
||||
<ms-table-button icon="el-icon-refresh" v-if="true"
|
||||
:content="'同步缺陷'" @click="syncIssues"/>
|
||||
</el-tooltip>
|
||||
|
@ -66,6 +66,13 @@
|
|||
prop="platform">
|
||||
</ms-table-column>
|
||||
|
||||
<ms-table-column
|
||||
:field="item"
|
||||
:fields-width="fieldsWidth"
|
||||
:label="$t('test_track.issue.status')"
|
||||
prop="platformStatus">
|
||||
</ms-table-column>
|
||||
|
||||
<ms-table-column
|
||||
:field="item"
|
||||
:fields-width="fieldsWidth"
|
||||
|
@ -194,20 +201,30 @@ export default {
|
|||
],
|
||||
issueTemplate: {},
|
||||
members: [],
|
||||
platforms: []
|
||||
isThirdPart: false
|
||||
};
|
||||
},
|
||||
activated() {
|
||||
getProjectMember((data) => {
|
||||
this.members = data;
|
||||
});
|
||||
getIntegrationService((data) => {
|
||||
this.platforms = data.map(d => d.platform);
|
||||
});
|
||||
getIssueTemplate()
|
||||
.then((template) => {
|
||||
this.issueTemplate = template;
|
||||
if (this.issueTemplate.platform === 'metersphere') {
|
||||
this.isThirdPart = false;
|
||||
} else {
|
||||
this.isThirdPart = true;
|
||||
}
|
||||
this.fields = getTableHeaderWithCustomFields('ISSUE_LIST', this.issueTemplate.customFields);
|
||||
if (!this.isThirdPart) {
|
||||
for (let i = 0; i < this.fields.length; i++) {
|
||||
if (this.fields[i].id === 'platformStatus') {
|
||||
this.fields.splice(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.$refs.table.reloadTable();
|
||||
});
|
||||
this.getIssues();
|
||||
|
@ -230,14 +247,6 @@ export default {
|
|||
},
|
||||
projectId() {
|
||||
return getCurrentProjectID();
|
||||
},
|
||||
hasThirdPart() {
|
||||
if (this.platforms.indexOf("Tapd") !== -1
|
||||
|| this.platforms.indexOf("Jira") !== -1
|
||||
|| this.platforms.indexOf("Zentao") !== -1) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -180,7 +180,7 @@ export const CUSTOM_TABLE_HEADER = {
|
|||
ISSUE_LIST: [
|
||||
{id: 'num', key: '1', label: i18n.t('test_track.issue.id')},
|
||||
{id: 'title', key: '2', label: i18n.t('test_track.issue.title')},
|
||||
{id: 'status', key: '3', label: i18n.t('test_track.issue.status')},
|
||||
{id: 'platformStatus', key: '3', label: i18n.t('test_track.issue.status')},
|
||||
{id: 'platform', key: '4', label: i18n.t('test_track.issue.platform')},
|
||||
{id: 'creatorName', key: '5', label: i18n.t('custom_field.issue_creator')},
|
||||
{id: 'resourceName', key: '6', label: i18n.t('test_track.issue.issue_resource')},
|
||||
|
|
Loading…
Reference in New Issue