Hi,
I am trying to create an issue using Jira REST API on Postman but I am getting errors, Please find below error. All fields are available on the create and edit screen, I do have permission to create an issue.
{ "errorMessages": [], "errors": {
"Assignee": "Field 'Assignee' cannot be set. It is not on the appropriate screen, or unknown.",
"Alarm Type": "Field 'Alarm Type' cannot be set. It is not on the appropriate screen, or unknown.",
"Description": "Field 'Description' cannot be set. It is not on the appropriate screen, or unknown.",
"Nagios Host Name": "Field 'Nagios Host Name' cannot be set. It is not on the appropriate screen, or unknown.",
"Reported Date": "Field 'Reported Date' cannot be set. It is not on the appropriate screen, or unknown.",
"Alarm State": "Field 'Alarm State' cannot be set. It is not on the appropriate screen, or unknown.",
"SEV Level": "Field 'SEV Level' cannot be set. It is not on the appropriate screen, or unknown.",
"Host Name": "Field 'Host Name' cannot be set. It is not on the appropriate screen, or unknown.",
"Alarm Text": "Field 'Alarm Text' cannot be set. It is not on the appropriate screen, or unknown.",
"Service Type": "Field 'Service Type' cannot be set. It is not on the appropriate screen, or unknown.",
"Notes": "Field 'Notes' cannot be set. It is not on the appropriate screen, or unknown." }}Thank you.
Hi @Murugan Mittapalli ,
I think the main problem is you are using fields' names instead of identifiers.
Please, look at the example in the create issue section: https://docs.atlassian.com/software/jira/docs/api/REST/latest/#api/2/issue-createIssue
Request body should look like this (you need to modify it based on the types and ids of your fields):
{
"fields": {
"project": {
"id": "10000"
},
"summary": "My summary",
"issuetype": {
"id": "10000"
},
"assignee": {
"name": "myuser"
},
"customfield_30000": [
"10000",
"10002"
],
"customfield_80000": {
"value": "red"
},
"customfield_20000": "06/Jul/11 3:25 PM",
"customfield_40000": "this is a text field",
"customfield_70000": [
"jira-administrators",
"jira-software-users"
],
"customfield_60000": "jira-software-users",
"customfield_50000": "this is a text area. big text.",
"customfield_10000": "09/Jun/81"
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Murugan,
The below error clearly suggests that "Custom Field is not on the appropriate screen", so the easiest way to know which fields are required and are available on your "Create Screen" is to manually create a ticket via GUI and then make changes to your JSON accordingly or just try adding all the custom fields to your create screen before making a rest call.
Assignee": "Field 'Assignee' cannot be set. It is not on the appropriate screen, or unknown."
You can also look at below two articles and see if it helps.
Project screens, schemes and fields
Field 'customfield_10012' cannot be set
Best,
Sachin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your response Sachin,
All the fields are available on the create and edit screen, I have created some test tickets as well using those fields, Please find some screenshots.
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.