The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

State transition condition based on a field value of parent

Omkar Rajale
Contributor
June 5, 2024

Hi,

I have a select list field "Epic type" on epic which has some values like architecture , development ,etc. Some stories are linked to these epics. 

Currently I have constraint in the story workflow which restrict stories from moving into "in progress" status until Sprint field is filled. 

What I want is, to make this sprint optional on story which are linked to epics having types as "Architecture".

Is it possible?

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Jack Brickey
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 Champions.
June 5, 2024

Hi @Omkar Rajale , if you are asking if you can make your condition optional in your workflow based on the associated parent having a specific field value, then the answer is no at least natively. What you could do is have a different issue type for your stories associated to architecture, Epics. Then you could have a different workflow for those architectural story types.

Omkar Rajale
Contributor
June 5, 2024

OK Understood. Thanks 

 

0 votes
Maciej Dudziak _Forgappify_
Atlassian Partner
June 5, 2024

Hi @Omkar Rajale 

It is quite complex, and you would need an app for that. It can be done with a custom Jira expression-based validator. There are several options available on the Atlassian marketplace.

I am from Forgappify, and we developed Jira Expression Validator, which is part of the Workflow Building Blocks for Jira free app. 

I think the expression you need is something like following:

issue.parent && issue.parent.customfield_xyz?.value == 'Architecture' 
? true
: issue.sprint != null

Which allows the transition if the story is part of the Epic (has a parent) and a custom field is set to 'Architecture'; otherwise, a sprint is required.

You need to change the ID of the custom field to a valid one. In the editor start typing the name of the Epic type field, you will get suggestions with the correct value.

I am leaving a link to the app's documentation if you are interested.

Cheers

 

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events