Forums

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

Unable to change status of Jira via Jenkins, Receiving Invalid Event type: jira:issue_created error

Takshika Jambhule
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!
October 12, 2021

I have configured Jira Steps and Jira Trigger on Jenkins. I am able to create a Jira issue from Jenkins and trigger the Jenkins pipeline when the issue is updated/created on Jira.

However, I want to change the status of the Jira ticket with the Jenkins pipeline. But I get the error as:- "Received Webhook callback with an invalid event type or a body without comment/changelog. Event type: jira:issue_created. Event body contains: [timestamp, webhookEvent, issue_event_type_name, user, issue]."

node {
  stage ('Updating status') {
    def transitionInput =[ transition: [ id: '101' ]]
    jiraTransitionIssue idOrKey: 'KEY-1', input: transitionInput, site: "Jira's Site"
}

can someone suggest where things are going wrong, and how Jenkins should be able to interact with Jira for a change of transition state? 

1 answer

1 accepted

0 votes
Answer accepted
Kishan Sharma
Community Champion
October 12, 2021

Hi @Takshika Jambhule Welcome to the Atlassian Community!

You can use REST End point - POST /rest/api/2/issue/{issueIdOrKey}/transitions to transition the JIRA issue to different status, refer this link  for documentation.

Takshika Jambhule
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!
October 14, 2021

@Kishan Sharma Thanks With Rest API I am able to get the desired result:).
Can you let me know how can i get the value of the new issue id created in the particular project?

Kishan Sharma
Community Champion
October 14, 2021

good to know @Takshika Jambhule You can search using JQL eg: /rest/api/2/search?jql=project=XYZ&maxResults=1000, refer this thread. for details.

Suggest an answer

Log in or Sign up to answer