diff --git a/backend/src/main/java/io/metersphere/track/service/IssuesService.java b/backend/src/main/java/io/metersphere/track/service/IssuesService.java index 76e55cf953..d57d482ef0 100644 --- a/backend/src/main/java/io/metersphere/track/service/IssuesService.java +++ b/backend/src/main/java/io/metersphere/track/service/IssuesService.java @@ -346,10 +346,19 @@ public class IssuesService { String body = responseEntity.getBody(); JSONObject obj = JSONObject.parseObject(body); + LogUtil.info(obj); + + String lastmodify = ""; + String status = ""; + JSONObject fields = (JSONObject) obj.get("fields"); JSONObject statusObj = (JSONObject) fields.get("status"); JSONObject assignee = (JSONObject) fields.get("assignee"); - JSONObject statusCategory = (JSONObject) statusObj.get("statusCategory"); + + if (statusObj != null) { + JSONObject statusCategory = (JSONObject) statusObj.get("statusCategory"); + status = statusCategory.getString("key"); + } String id = obj.getString("id"); String title = fields.getString("summary"); @@ -360,9 +369,8 @@ public class IssuesService { HtmlRenderer renderer = HtmlRenderer.builder().build(); description = renderer.render(document); - String status = statusCategory.getString("key"); Long createTime = fields.getLong("created"); - String lastmodify = ""; + if (assignee != null) { lastmodify = assignee.getString("displayName"); }