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

Ria 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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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