How to change an issue of phase in the workflow of the project?

Ronald Antonny Vargas Mora October 5, 2018

Hello everybody,

 

I'm trying to integrate the execution of my jenkins pipeline with a kanban project destined to have a changes control monitoring, i need to put a issue in the initial workflow phase when the execution of my jenkins pipeline starts, then if the execution was success, i need to move the issue related to the deploy to another worklfow phase, which is "deployment" and need put and valid state like success or failure.

Currently, i'm working with the REST API for JIRA and i achieved to create the issue, but i don't know what can use for move the issue for another workflow phase, can anybody give me some idea?

 

Thank you a lot your help! :)

1 answer

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 8, 2018

Are you looking to transition an issue via REST into a new state (for example, change the issue status from something like 'to do' into some other status, like 'in progress')?   If so, then you can do this via the rest call POST /rest/api/2/issue/{issueIdOrKey}/transitions

However perhaps I am misunderstanding your request here.  If you are looking to change what kinds of workflow the Jira issue is using, this is something that would only happen if you were able to move the issue to a different issue type.  (You can edit the issue type of issues in Jira, but only if the issue types in the same project are configured to use the same workflow.  Hence if you want to change what workflow that single issue is using, you need to move the issue to a different issue type that has the workflow you want.)  You can also change the project an issue exists in with the move function.  But the problem with this approach is that you cannot currently move issues in Jira via the REST API.  There is a feature request for this ability via the REST API over in https://jira.atlassian.com/browse/JRASERVER-61359

Suggest an answer

Log in or Sign up to answer