Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to get statues in a workflow?


Is there a way to get the statues in workflow by code?

For example, in the following screenshot, there is a "View workflow" text next to "Status" field. Click the text, you will see a workflow dialogue with statues and transitions.

I'd like to get those statues in the workflow dialogue by code.

Thanks for any suggestions.

Screen Shot 2021-12-07 at 3.57.54 PM.png

2 answers

Are you asking to inject a workflow status by automation? 

The best way to do this is to go into the workflow and update the current workflow with the status you want to put in there. 

Remember that an active workflow you can not remove a status only add a status. If you need to remove a status you can do the following.

1. Copy the current workflow and make changes then replace after done making changes.

2. Take current workflow out into inactive and replace with a temp workflow.

Please be in mind you need Jira admin permission at trusted user or above to make workflow changes.

0 votes

Welcome to the Community!

"get status by code" is not a clear question, but let's split it up in to the two parts that need an answer:

  • What does "get status" really mean?  I would guess you mean you want a list of status, probably for a specific workflow, but I cannot be sure.  Is that the right question?
  • "by code" is a bit more easy to question (but the conversation maybe longer) - are you writing an app for Jira or do you want to talk to it over the REST API?

Hi, thank you for the help!

I want a list of statuses for a specific workflow using the REST API.

For example, given an issue, SAMPLE-001. How can I get a list of statues from the workflow SAMPLE-001 is using?

API in the above link will return all statuses associated with workflows. But I only want a list of statues from a specific workflow.

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you