diff --git a/tasks/jira/src/main/java/com/walmartlabs/concord/plugins/jira/JiraTaskCommon.java b/tasks/jira/src/main/java/com/walmartlabs/concord/plugins/jira/JiraTaskCommon.java index 44b01de3..7f40f33b 100644 --- a/tasks/jira/src/main/java/com/walmartlabs/concord/plugins/jira/JiraTaskCommon.java +++ b/tasks/jira/src/main/java/com/walmartlabs/concord/plugins/jira/JiraTaskCommon.java @@ -129,7 +129,6 @@ Map createIssue(CreateIssueParams in) { String description = in.description(); String requestorUid = in.requestorUid(); String issueType = in.issueType(); - String issuePriority = in.issuePriority(); Map assignee = in.assignee(); List labels = in.labels(); List components = in.components(); @@ -141,7 +140,6 @@ Map createIssue(CreateIssueParams in) { try { //Build JSON data Map objProj = Collections.singletonMap("key", projectKey); - Map objPriority = Collections.singletonMap("name", issuePriority); Map objIssueType = Collections.singletonMap("name", issueType); Map objMain = new HashMap<>(); @@ -153,7 +151,10 @@ Map createIssue(CreateIssueParams in) { objMain.put("reporter", Collections.singletonMap("name", requestorUid)); } - objMain.put("priority", objPriority); + if (in.issuePriority() != null) { + objMain.put("priority", Map.of("name", in.issuePriority())); + } + objMain.put("issuetype", objIssueType); if (labels != null && !labels.isEmpty()) {