How to change jira project's workflow via REST API

kyco4ektopta June 16, 2017

Hi! I've a problem with changejira project's workflow via REST API.

I have a jira version 6.3.8

I tried to use this manual - https://docs.atlassian.com/jira/REST/6.3.8/

Maybe there is some hidden not documented API?

How can i do this?

Thanks.

2 answers

0 votes
Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 16, 2017

Using REST APIs the best you can do it to change the status of an issue i.e. do a workflow transition for a issue, but you can't change jira project's workflow to another workflow this isn't possible using REST API.

Programmatically this can be done - https://community.atlassian.com/t5/Answers-Developer-Questions/how-to-programatically-change-a-project-s-workflow-in-Jira/qaq-p/474694 

Samuel Skeen September 20, 2019

Link fails.  Do you have an example you can show me or even another link that isn't dead that I could look at?  I have had little success in finding non-prohibitively complex solutions to this problem.

Samuel Skeen September 23, 2019

To look a little closer at that question/searching around, this looks like it is an answer for if you have access to the Java API.  In my case, this will not work because I don't.  I'll need to do something if possible via the REST API.

I guess I could try to make a plugin that can do that, but I'm hoping to not have to go that deep just for this situation.

0 votes
Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 16, 2017

Hi,

I've never heard of a REST API to change a project's workflow scheme.

Why do you want to do that? 

kyco4ektopta June 16, 2017

Hi!

We often creating JIRA projects (for customers) and always change default WF to our custom WF scheme. So.. I just want to automate it.

Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 16, 2017

Why don't you create a template-project and then create the new project with shared configuration? 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 16, 2017

Changing a workflow requires JIRA to do a whole swathe of integrity checks that can often lead to a load of questions needing to go back to the user.

A REST interface for that would be hideously complex and barely ever used, so Atlassian have not written one.

The answer for your usage really is what Thomas said - use a shared configuration.

Samuel Skeen September 20, 2019

On this topic, I have no idea how to use the REST API to actually copy the settings from another project to a new project.  How do you do that?  I can find no documentation on how to accomplish this.  Sure, it mentions the `projectTemplateKey`, but I couldn't get it to work with that and it looks like it's more specifically an internal, non-changeable project template key.

If you please, could you give an example of how to do this via the API?

Samuel Skeen September 23, 2019

Rephrased to ask more directly:  How do you create a project with a shared configuration via the REST API.

Ricardo Silva October 8, 2020

Team, I know this topic is old... but if you plan to create projects programmaticaly using a shared configuration, take a look on this topic >> https://community.atlassian.com/t5/Jira-questions/How-to-create-project-with-shared-Configuration-via-REST-API/qaq-p/650062

Like Richard Cross likes this

Suggest an answer

Log in or Sign up to answer