Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a request REST API priority issue

Dave
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 20, 2020

I have a standard JIRA setup in the cloud, standard in that i havent made any changes to it. I want to add a request using the API which i am able to do. I now want to set the priority but i cant do it. I have searched a lot of discussions but cannot see what i am doing wrong. Clearly something is not set correctly in JIRA. In POSTMAN i am sending this 

{
"serviceDeskId": "1",
"requestTypeId": "1",
"requestFieldValues": {
"summary": "User unable to send emails",
"priority": {
"name": "High"
},
"description": "The user is unable to send emails and receives an error message."
}
}

and get this

Unable to create request because of theses errors : The field 'priority' is not valid for this request type 'IT help

 

if i remove the priority all works well. I have added (to my knowledge) priority to the screen so i can see it if i add a manual request however using the API doesnt do it! 

Please help!

 

 

1 answer

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 23, 2020

Hi Dave,

I understand that you're using the REST API to create a Jira Service Desk request, and you're trying to set the priority of the request when creating it.   I think I see the problem here. 

A touch of background though first on the differences between Jira Core/Software and Jira Service Desk.  Both types of projects have issues, but Service Desk has an additional layer called requests.  Each request has an issue on it, but this is an additional layer to separate it further.  The error message indicates that this request type does not yet have that field on it.  You likely have added it to the issuetype, but when creating issues using the Service Desk REST API, we need to add this field to the request type in this project called "IT Help".

You can do this by going into the Project settings -> Request types.  Find the 'IT Help' request type, and click the "Edit fields" link there.  You can then just click the pencil icon there to add a new field to the customer request form. Priority is one of those fields you can add there.  Alternatively, you can also follow the instructions in Customize the fields of a request type. Once the priority field is listed here on the request type, try your REST API POST call in Postman again, it should work as expected given your syntax there.

I hope this helps, let me know.

Andy

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events