fix(接口测试): tfs平台缺陷模板添加自定义字段 同步问题处理

--bug=1012110 --user=zhaoqian
用户在tfs平台自定义缺陷模板,添加自定义字段,无法同步到ms的问题处理
This commit is contained in:
zhaoqian 2022-04-12 17:57:38 +08:00 committed by 刘瑞斌
parent f4aaccee4a
commit 5287294ae3
1 changed files with 7 additions and 24 deletions

View File

@ -1,5 +1,6 @@
package io.metersphere.track.issue.domain.azure;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Getter;
import lombok.Setter;
@ -19,32 +20,14 @@ public class AzureDevopsWorkItemsBatchResponse {
public class Value {
private int id;
private int rev;
private Fields fields;
private JSONObject fields;
private String url;
@Getter
@Setter
public class Fields {
@JSONField(name = "System.Id")
private int systemId;
@JSONField(name = "System.WorkItemType")
private String systemWorkItemType;
@JSONField(name = "System.Title")
private String systemTitle;
@JSONField(name = "System.State")
private String state;
@JSONField(name = "System.Description")
private String description;
@JSONField(name = "System.AssignedTo")
private String assignedTo;
@JSONField(name = "System.ChangedBy")
private String changedBy;
@JSONField(name = "System.CreatedBy")
private String createdBy;
@JSONField(name = "Microsoft.VSTS.TCM.ReproSteps")
private String reproSteps;
@JSONField(name = "System.CreatedDate")
private String createdDate;
public String getFieldsValue(String name) {
if (fields != null && fields.containsKey(name)) {
return fields.getString(name);
}
return "";
}
}
}