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?
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
Hi @Earl McCutcheon ,
Is there a way to get that information or some workaround if you can suggest?
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.