Forums

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

Create a ticket with existing fix version using Jenkins

Test Jenkins Jira
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!
May 18, 2021

I am trying to create a new Jira ticket using Jenkins. I want to give it an existing fixVersions

This is what I am doing:

def newIssue = [fields: [ project: [key: 'KEY'],
                             summary: 'This is a test',
                             description: 'Test',
                             issuetype: [name: 'Defect'],
                             components: [[name: 'someComponent']],
                             assignee: [name:'username'],
                             fixVersions: [{set:[{name : '2020.01.05'}]}]]]

I am getting the following error

15:27:47  Error Code: -1
15:27:47  Error Message: Conversion = 'ti'

If I set my fixversion as following

fixVersions: [name : '2020.01.05']]]

I am getting the following error:

Error Message: {"errorMessages":[],"errors":{"fixVersions":"data was not an array"}}

This is the last thing I tried and still not working:

String[] ver = ['2020.01.02']
def newIssue = [fields: [ project: [key: 'KEY'],
                             summary: 'This is a test',
                             description: 'Test',
                             issuetype: [name: 'Defect'],
                             components: [[name: 'someComponent']],
                             assignee: [name:'username'],
                             fixVersions: [name : ver[0]]]]

 

0 answers

Suggest an answer

Log in or Sign up to answer