@@ -129,7 +129,6 @@ Map<String, Object> createIssue(CreateIssueParams in) {
129129        String  description  = in .description ();
130130        String  requestorUid  = in .requestorUid ();
131131        String  issueType  = in .issueType ();
132-         String  issuePriority  = in .issuePriority ();
133132        Map <String , Object > assignee  = in .assignee ();
134133        List <String > labels  = in .labels ();
135134        List <String > components  = in .components ();
@@ -141,7 +140,6 @@ Map<String, Object> createIssue(CreateIssueParams in) {
141140        try  {
142141            //Build JSON data 
143142            Map <String , Object > objProj  = Collections .singletonMap ("key" , projectKey );
144-             Map <String , Object > objPriority  = Collections .singletonMap ("name" , issuePriority );
145143            Map <String , Object > objIssueType  = Collections .singletonMap ("name" , issueType );
146144
147145            Map <String , Object > objMain  = new  HashMap <>();
@@ -153,7 +151,10 @@ Map<String, Object> createIssue(CreateIssueParams in) {
153151                objMain .put ("reporter" , Collections .singletonMap ("name" , requestorUid ));
154152            }
155153
156-             objMain .put ("priority" , objPriority );
154+             if  (in .issuePriority () != null ) {
155+                 objMain .put ("priority" , Map .of ("name" , in .issuePriority ()));
156+             }
157+ 
157158            objMain .put ("issuetype" , objIssueType );
158159
159160            if  (labels  != null  && !labels .isEmpty ()) {
0 commit comments