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