Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to lookup an Epic ID linked to a parent story in Jira Automation

I'm trying to create an automation as such:

 

When a Test issue type is created, look at the linked Story issue type and determine the Epic associated with that Story.  Once it gets that Epic, add a label to the Test indicating the Epic ID.

 

What I don't know how to do is look up that Epic ID associated with the Story that's associated with the Test.  Any ideas?

2 answers

1 accepted

0 votes
Answer accepted

Helpful information but not quite what I was looking for.  Our Tests issue types are at the same level as a Story, meaning they aren't sub tasks.  Trying to determine how I can look up the Epic that is linked to the Story via the Epic Link field.  

{{issue.parent.Epic Link}}

Returns the issue key of the parent issue's epic.

Assuming your "Test" issue type is at the Subtask level (not the Story level) in the Jira issue hierarchy, then the following might help you.

I created a test rule that can be manually invoked on any Subtask-level issue.

It will look up the parent Story, and then the parent Epic for that Story. The results are written to the log for that rule in Automation. Here's the output I got from my testing:

Rule triggered on Sub-task AAP-309 -- Parent Story is AAP-260 -- Epic is AAP-8

Screen Shot 2020-12-17 at 3.43.39 PM.png

I like using manually triggered rules to help figure things out. Tip: configure them for just one project (ideally a "playground" project) -- the default is that new rules are global to all projects.

Again, I'm assuming your "Test" issue type is a child of a Story (not a peer, and not a literally Linked issue). The wording in your original post is a bit ambiguous, particularly since "linked issues" in Jira have a meaning that is independent of the issue hierarchy.

Also, just know that Jira Automation does NOT treat an Epic as the "parent" of a Story:

  • use "issue.parent" to traverse from a Subtask-level issue to the related Story-level issue
  • use "issue.epic" to traverse from a Story-level issue to the related Epic.

This important detail is not real obvious from the documentation:

https://support.atlassian.com/jira-software-cloud/docs/smart-values-general/

Helpful information but not quite what I was looking for.  Our Tests issue types are at the same level as a Story, meaning they aren't sub tasks.  Trying to determine how I can look up the Epic that is linked to the Story via the Epic Link field.  

{{issue.parent.Epic Link}} - Returns the issue key of the parent issue's epic.

Suggest an answer

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

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you