Forums

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

Automation for Missing Parent Epic Name

Rachel Stein August 28, 2024

Hi! I want to create an automation that fills in the Parent Epic Name field if it is missing, by connecting it to the Epic the issue was created under. 

For example, if a feature is created under my "Deals" Epic, but the Parent Epic Name wasn't filled out, the automation would automatically fill the Parent Epic Name field out with "Deals" (i.e. the Epic name)

Capture.PNG

 

I've drafted this automation but this is not doing what I want. The JQL is finding features/capabilities with missing Parent Link instead of missing Parent Epic Name field.

Capture.PNG

Anyone know how to adjust the JQL for this? Thanks in advance!

2 answers

1 accepted

1 vote
Answer accepted
Trudy Claspill
Community Champion
August 28, 2024

Hello @Rachel Stein 

Can you explain the issue type hierarchy for your system?

Are Feature and Capability issue types that you can create as child issues under an Epic directly?

As @Mikael Sandberg showed, if you have the Parent field in your issues then that field will show the key and summary for an issues parent issue You don't need to copy the information to a separate field in the child.

But, if you insist on doing that, and if Feature and Capability are issue types that can be set as children of Epics then I think the query you want is:

issuetype in (Feature, Capability) and Parent is not empty and "Parent Epic Name" is empty

That will get you all Feature and Capability issues that are the child of another issue and that have no value in their "Parent Epic Name" field.

To set that field to the Summary from the issues Parent you would use this smart value as the value for the field:

{{issue.parent.summary}}

 

However, I think your rule still might not work as you expect it to.

Are your running a JQL statement in your Schedule trigger? I ask with a scheduled rule that runs a JQL in the trigger you will execute the "For: JQL" branch for each issue found in the trigger's JQL statement.

Rachel Stein August 29, 2024

Thanks - appreciate the JQL. This did not work as you expected - it assigned the Parent Epic Name to the Parent, which in this meant all my features got the Capability's name instead of the Epic's name. 

I am not running a JQL in the scheduled trigger; I just have it set to run every morning and check through any issues that were added to Jira the day before and make the corrections on issues that satisfy the JQL query.

Any more suggestions for working around this?

Trudy Claspill
Community Champion
August 29, 2024

Can you explain the issue type hierarchy for your system?

Are Feature and Capability issue types that you can create as child issues under an Epic directly?

For which issue types are you trying to fill in Parent Epic Name?

Are those issue types direct children of Epics?

Rachel Stein August 29, 2024

Hierarchy is as follows: Epic -> Capability -> Feature. I am interested in filling out the Parent Epic Name field of features with the Epic name.

 

For example, for a feature called "Project XYZ" which is nested under the Epic called "Deals", I want the Parent Epic Name field for that feature to list "Deals". 

Trudy Claspill
Community Champion
August 29, 2024

Is the Parent field in the Feature filled with the issue key of the Capability issue? Or are the feature and Capability connected using generic issue linking?

Rachel Stein August 29, 2024

The parent field in the feature is filled out with the issue key of the Capability issue.

Trudy Claspill
Community Champion
August 29, 2024

Great! That makes this easier.

The JQL to use would be:

issuetype in (Feature) and Parent is not empty and "Parent Epic Name" is empty

That will get the Features that do have a parent Capability and don't have a value in their Parent Epic Name field.

 

To set the Parent Epic Name field in the Feature to it's "grandparent" Epic's Summary you would would use this smart value as the value for the field:

{{issue.parent.parent.summary}}

Get the summary from the parent (Epic) of the parent (Capability) of the issue (Feature).

 

Before the edit action you might want to add a condition to confirm that the Capability is actually the child of an issue (Epic)

Screenshot 2024-08-29 at 1.40.31 PM.png

Rachel Stein August 29, 2024

Wow, that worked!! Thank you so much for your help, this was a great learning experience for me!!

Like Trudy Claspill likes this
2 votes
Mikael Sandberg
Community Champion
August 28, 2024

What you are looking to do in JQL is not possible in the out-of-the-box version. You are looking to do a nested query and that can only be done if you have an app from the Marketplace that extends JQL to allow queries like that.

But why do you need to set the Parent Epic Name field when the parent name will show up in the Parent field?

Screenshot 2024-08-28 at 7.58.21 AM.png

Rachel Stein August 29, 2024

Thanks for the reply. The reason I want Parent Epic Name to be filled out with the Epic is because for my Power BI connection, I do aggregations of information at the feature level but show it at the Epic level. Therefore, I need every feature to have the corresponding Parent Epic Name filled out so it flows through correctly to my Power BI.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events