diff --git a/backend/src/main/java/io/metersphere/track/issue/domain/azure/AzureDevopsWorkItemsBatchResponse.java b/backend/src/main/java/io/metersphere/track/issue/domain/azure/AzureDevopsWorkItemsBatchResponse.java index 15e011f564..9933d12c29 100644 --- a/backend/src/main/java/io/metersphere/track/issue/domain/azure/AzureDevopsWorkItemsBatchResponse.java +++ b/backend/src/main/java/io/metersphere/track/issue/domain/azure/AzureDevopsWorkItemsBatchResponse.java @@ -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 ""; } } }