Forums

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

Is there a way to fetch the dependency on workflow transition field using REST

Deleted user March 17, 2021

For ex- if "In Progress" of status field  is dependent on some required field before it transitions into another state, is there a way to find the dependency using REST API in jira?

1 answer

0 votes
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 18, 2021

Hello @[deleted] ,

If the Required field is set in the field configuration scheme (i.e. a global field setting),  you can look at and expand the endpoint:

This will return either all transitions or a transition that can be performed by the user on an issue, based on the issue's status, and expanding on the transitions.fields, will show a "required" : {true or false} value for each field present.

However, if the required field is placed in a validator in the workflow, the rest API has no visibility into validators. Validators are executed by code in the workflow during a transition, and would therefore be an action independent from an issue's data directly and require knowledge of the workflow variables in advance.

Regards,
Earl

Deleted user March 22, 2021

Hi @Earl McCutcheon ,

Is there a way to get that information or some workaround if you can suggest?

 

Thanks!

Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 2, 2021

Hello @[deleted] ,

I did a bit of searching and found that while the rest API has no visibility into validators on the issue directly, the validator details can be pulled from the endpoints for the workflows directly on a Get workflows paginated call and expanding on "transition.rules" via:

/rest/api/3/workflow/search?expand=transitions.rules

So calling the workflow details related to the project first to identify that required knowledge of the workflow variables in advance.

Regards,
Earl 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events