Merge branch 'v1.2'
This commit is contained in:
commit
fdd401280e
|
@ -346,10 +346,19 @@ public class IssuesService {
|
||||||
String body = responseEntity.getBody();
|
String body = responseEntity.getBody();
|
||||||
|
|
||||||
JSONObject obj = JSONObject.parseObject(body);
|
JSONObject obj = JSONObject.parseObject(body);
|
||||||
|
LogUtil.info(obj);
|
||||||
|
|
||||||
|
String lastmodify = "";
|
||||||
|
String status = "";
|
||||||
|
|
||||||
JSONObject fields = (JSONObject) obj.get("fields");
|
JSONObject fields = (JSONObject) obj.get("fields");
|
||||||
JSONObject statusObj = (JSONObject) fields.get("status");
|
JSONObject statusObj = (JSONObject) fields.get("status");
|
||||||
JSONObject assignee = (JSONObject) fields.get("assignee");
|
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 id = obj.getString("id");
|
||||||
String title = fields.getString("summary");
|
String title = fields.getString("summary");
|
||||||
|
@ -360,9 +369,8 @@ public class IssuesService {
|
||||||
HtmlRenderer renderer = HtmlRenderer.builder().build();
|
HtmlRenderer renderer = HtmlRenderer.builder().build();
|
||||||
description = renderer.render(document);
|
description = renderer.render(document);
|
||||||
|
|
||||||
String status = statusCategory.getString("key");
|
|
||||||
Long createTime = fields.getLong("created");
|
Long createTime = fields.getLong("created");
|
||||||
String lastmodify = "";
|
|
||||||
if (assignee != null) {
|
if (assignee != null) {
|
||||||
lastmodify = assignee.getString("displayName");
|
lastmodify = assignee.getString("displayName");
|
||||||
}
|
}
|
||||||
|
|
|
@ -384,7 +384,13 @@ public class TestCaseService {
|
||||||
data.setPrerequisite(t.getPrerequisite());
|
data.setPrerequisite(t.getPrerequisite());
|
||||||
if (t.getMethod().equals("manual")) {
|
if (t.getMethod().equals("manual")) {
|
||||||
String steps = t.getSteps();
|
String steps = t.getSteps();
|
||||||
JSONArray jsonArray = JSON.parseArray(steps);
|
String setp = "";
|
||||||
|
if (steps.contains("null")) {
|
||||||
|
setp = steps.replace("null", "");
|
||||||
|
} else {
|
||||||
|
setp = steps;
|
||||||
|
}
|
||||||
|
JSONArray jsonArray = JSON.parseArray(setp);
|
||||||
for (int j = 0; j < jsonArray.size(); j++) {
|
for (int j = 0; j < jsonArray.size(); j++) {
|
||||||
int num = j + 1;
|
int num = j + 1;
|
||||||
step.append(num + "." + jsonArray.getJSONObject(j).getString("desc") + "\n");
|
step.append(num + "." + jsonArray.getJSONObject(j).getString("desc") + "\n");
|
||||||
|
|
Loading…
Reference in New Issue