diff --git a/fcli-ssc/src/main/java/com/fortify/cli/ssc/issue_template/cli/cmd/SSCIssueTemplateCreateCommand.java b/fcli-ssc/src/main/java/com/fortify/cli/ssc/issue_template/cli/cmd/SSCIssueTemplateCreateCommand.java index 582012b250..4c1272383e 100644 --- a/fcli-ssc/src/main/java/com/fortify/cli/ssc/issue_template/cli/cmd/SSCIssueTemplateCreateCommand.java +++ b/fcli-ssc/src/main/java/com/fortify/cli/ssc/issue_template/cli/cmd/SSCIssueTemplateCreateCommand.java @@ -33,6 +33,7 @@ import com.fortify.cli.ssc.output.cli.cmd.AbstractSSCOutputCommand; import com.fortify.cli.ssc.output.cli.mixin.SSCOutputHelperMixins; import com.fortify.cli.ssc.rest.SSCUrls; +import com.fortify.cli.ssc.rest.bulk.SSCBulkRequestBuilder; import io.micronaut.core.annotation.ReflectiveAccess; import kong.unirest.UnirestInstance; @@ -67,8 +68,12 @@ public JsonNode getJsonNode(UnirestInstance unirest) { if ( setAsDefault ) { ObjectNode data = (ObjectNode)body.get("data").deepCopy(); data.put("defaultTemplate", true); - body = unirest.put(SSCUrls.ISSUE_TEMPLATE(data.get("id").asText())) - .body(data).asObject(JsonNode.class).getBody(); + String url = SSCUrls.ISSUE_TEMPLATE(data.get("id").asText()); + body = new SSCBulkRequestBuilder() + .request("update", unirest.put(url).body(data)) + .request("result", unirest.get(url)) + .execute(unirest) + .body("result"); } return body; }