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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.