Forums

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

Loop in Automation to a Parent of an Epic

Pancake November 3, 2024

I am running Jira Data Centre not Cloud, so I know automation has slightly different features. We have an advanced heirachy set up, with Capability above Epic. I would like to perform an action on the Capability in the Parent Link when a trigger occurs on the Epic. I cannot figure out how to do this, is it possible?

eg:

Trigger: Epic Transitions

Loop ??? (this is the bit I can't figure out)

    Add Comment to issue

3 answers

1 accepted

0 votes
Answer accepted
Pancake November 4, 2024

As mentioned above finals solution is:

Trigger: Issues transitioned to Done

If: Issue type equals Epic

Loop: JQL: project = <capbility project> and key in parentIssuesOf{{{triggerIssue}})

Then Add a comment to issue: Test Comment

1 vote
Marc - Devoteam
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.
November 3, 2024

Hi @Pancake 

Welcome to the community.

Can you please share the config (screenshots) of your automation rule and details of the steps in the rule and the errors shown in the audit log (of there are any)

This will help community members to loo at your way of reasoning.

Pancake November 3, 2024

There are no errors because I cannot figure out how to do this. The loop on parent option only seems to work for sub-tasks to tasks parent link, not on parent links introduced by an advanced heirachy.

Like Peter_DevSamurai likes this
0 votes
John Funk
Community Champion
November 3, 2024

Hi Pancake - Welcome to the Atlassian Community!

You would use the lookup issues function in automation to "loop" through your issues. The Capability issue is still a "Parent" to the Epic. So use an automation trigger based on the Epic changeing and then in your Lookup Issues option, use:

Parent = triggerIssue.parent

Pancake November 4, 2024

Hi John, thanks for helping, when I try this I get errors, I tried a couple of things, so a couple of errors below.

My automation is:

Trigger: Issues transitioned to Done

If: Issue type equals Epic

Then: Lookup Issues (see below)

And: add value to the audit Log: {lookupIssues}}

 

When I put {{triggerIssue.Parent}} or {{triggerIssue.parent.key}} in the lookup I get:

Log: a list of 100 issue keys from the project where I know the parent is. Results are limited to 100 and appear to be the 100 most recently created issues in that project

 

When I put {{triggerIssue.Parent Link}} in the lookup I get:

Custom smart value JQL Search: "(PAR-123) and (project in (11111,22222))" - Error in the JQL Queary: Expencting operator but got )

Note 11111 and 22222 are the project ids for the project the epic lives in and the project the capability lives in, which my rule has scope over.

John Funk
Community Champion
November 4, 2024

What exactly are you trying to do? 

Pancake November 4, 2024

When someone closes the Epic, put a comment on the capability.

Pancake November 4, 2024

Ahhh I got it!

Trigger: Issues transitioned to Done

If: Issue type equals Epic

Loop: JQL: project = <capbility project> and key in parentIssuesOf{{{triggerIssue}})

Then Add a comment to issue: Test Comment

 

Thank you for your help, I always forget those functions are in JQL when using in.

Like John Funk likes this

Suggest an answer

Log in or Sign up to answer