How do you maintain Jira automation which refers to changing parent epic links?

Bryan Kim April 16, 2024

Hi all,

 

Our team has been using Jira x Slack automation such that Jira tickets meeting certain conditions within release epics are gathered and their information is posted as Slack threads in corresponding Slack channels. While this is working fine, we have a big maintenance issue because we have to manually update each Jira automation's JQL for Lookup Issue action to refer to a correct parent epic.

 

For example, let's say parent epics for our next imminent releases are DEV-1111 and DEV-2222. The JQL for the corresponding Lookup Issue action for the Jira automation may be:

project = XXX AND issuetype = "Issue Report" AND "Parent" in (DEV-1111, DEV-2222)

Once either or both releases are rolled out, the JQL above is no longer valid and we would have to find the next releases to be monitored (e.g. DEV-3333 and DEV-4444). Then we end up manually finding the corresponding epic links (DEV-3333 and DEV-4444) and putting them in the JQL.

 

So I thought of adjusting the automation in a way that it does not look at a specific epic link. Instead, it would consider status of an epic link:

project = XXX AND issuetype = "Issue Report" AND find_parent_epic_status = in_progress

However, it seems like the italicized / underlined JQL condition written in a pseudo way just does not exist.

 

How can I implement a Jira automation using Lookup Issue action w. JQL in a way that I do not have to manually update epic links? I feel like there may be a default Jira feature that can fulfil the needs, but I'm looking past it perhaps.

 

Thank you in advance

 

3 answers

1 vote
Stephen_Lugton
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.
April 16, 2024

One simple way would be to use labels in your search term:

e.g. project = XXX AND issuetype = "Issue Report" AND labels in (Next_Release)

You would only then have to update the label for each ticket

 

You could then use automation to add/remove labels so you only have to add the 'Next_Release' label to an epic and the automations will add the label to child issues and remove it when the epic is done:

Add labels from parent.pngAdd Next_Release label to Children.pngRemove labels when Epic Done.png

Stephen_Lugton
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.
April 16, 2024

Alternatively use fixversion:

e.g. project = XXX AND issuetype = "Issue Report" AND fixversion in unreleasedVersions()

All you need to do then is create and manage releases

Bryan Kim April 17, 2024

Hi @Stephen_Lugton , this could work. I will look into this, thank you!

0 votes
Bill Sheboy
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.
April 16, 2024

Hi @Bryan Kim 

For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected.  Those will provide context for the community to offer ideas.  Thanks!

Until we see those...

You could perform two lookup issues actions:

  • the first one finds the epics needed with JQL
project = XXX
AND issuetype = "Epic"
AND status = "In Progress"
  • the second lookup uses the first result to build the dynamic JQL:
project = XXX
AND issuetype = "Issue Report"
AND "Parent" IN ( {{#lookupIssues}}{{key}}{{^last}}, {{/}}{{/}} )

 

Kind regards,
Bill

Bryan Kim April 17, 2024

Next time I will share images of automation rules! And I did not think about using two lookup issues consecutively. Will give it a shot, thank you

Like Bill Sheboy likes this
0 votes
Marc Koppelaar
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.
April 16, 2024

Hi @Bryan Kim 

You can look at the option provided by @Stephen_Lugton 

If this is not what you are looking for is the option to extend your JQL functions. This will require a marketplace to fulfil this option.

This can't be done ootb.

Jira apps that can extend JQL and have hierarchy related JQL options for multiple issues are:

 

Bryan Kim April 17, 2024

It is unfortunate that it cannot be done out of the box :/ I will look at Stephen's suggestion, and explore Jira apps if it doesn't work out. Thank you Marc!

Like Marc Koppelaar likes this

Suggest an answer

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

Atlassian Community Events