Forums

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

How can I programmatically deactivate a Jira Workflow?

Laith Ata
Contributor
June 10, 2020

I am currently working on a requirement where I should programmatically import a Jira workflow Xml into another jira instance

I obtain the Jira workflow Xml by the workflow Xml Export function of Jira.

I have noticed that it is not possible to import an existing workflow. So I have come up with the following procedure

1. Deactivate the existing workflow programmatically

2. Delete the newly deactivated workflow programmatically

3. Import the workflow from the exported xml programmatically

4. Bind again with a project (workflow schemata and issue types schemata: this is not done automatically, it is by default deactivated after an import) programmatically

I can manage to do point 2 programmatically. I am working on point 3.

My current problem is about point 1

I searched in the communities without success. Any idea how I can do that?

1 answer

1 vote
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 10, 2020

To do point 1, you will need to write something that will

  • Work out a list of workflow schemes that are using the workflow
  • Work out a list of all the projects that have that scheme, and what issue types within those projects are associated with the workflow
  • Migrate the the issue types from the old workflow to your chosen new one, either by migrating the project to a new scheme or changing the workflow in the scheme

Once you've migrated all the issues and projects off the workflow you want to change, you'll find it becomes "deactivated"

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events