Forums

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

Jira REST API giving a NOT APPROPRIATE SCREEN OR UNKNOWN error when called via Jenkins Pipeline Job

Ria
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!
December 18, 2019

We created a Pipeline Job on Jenkins that is supposed to create a ticket on Jira. It worked initially but returns the below error on running the same code the next day

ERROR:  {"errorMessages":[],"errors":{"summary":"Field 'summary' 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.","reporter":"Field 'reporter' cannot be set. It is not on the appropriate screen, or unknown."}}

 The code we used for the Jenkins pipeline is as follows:

stage('Create Issue in JIRA') {
def testIssue = [fields: [ // id or key must present for project.
project: [key: 'KEY'],
summary: 'New JIRA Created from Jenkins',
description: 'New JIRA Created from Jenkins',
issuetype: [id: '1'],
reporter: [id: 'xxxxxxxxxxxxxxxxxxxxxxxxx']]]
response = jiraNewIssue issue: testIssue

echo response.successful.toString()
echo response.data.toString()
}

Can anybody suggest a solution process for this? 

1 answer

0 votes
brbojorque
Community Champion
December 19, 2019

You have to add the Summary to the Create screen.

Please refer to this solution below.

https://community.atlassian.com/t5/Jira-Core-questions/Jira-REST-API-Create-Issue/qaq-p/213945

Suggest an answer

Log in or Sign up to answer