Forums

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

How to get statues in a workflow?

Aviva Hu December 7, 2021

Hi,

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

0 votes
Aaron Geister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 7, 2021

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
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.
December 7, 2021

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?
Aviva Hu December 8, 2021

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?

Aaron Geister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 8, 2021

Here is the REST API Development URL for workflow status:
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflow-statuses/

Aviva Hu December 8, 2021

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