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

JQL to get details of linked parent initiatives

With a query we search for all Epics in a project. At the same time we would like to retrieve the linked parent and some details of the parent initiatives.

- Can this be achieved when parents are linked via issue links (Implements).

- Can this be achieved when parents are linked via the Parent Link field from Portfolio?

2 answers

1 accepted

1 vote
Answer accepted

Hi @Ron Becker

Using JQL without an add-on, you can do some searching - for example:

  • issueLinkType: This allows you to search for all issues within one link type
  • issuekey in parentIssuesOf("ABC-123"): This would allow you to search for the parent of one specific Epic. See more details on Portfolio JQL on this page

^ This returns all the results though, rather than a subset. If you want to locate all the parents of a group of Epics, you need to be able to implement a sub-query into the JQL search, and you'll need an add-on for this such as ScriptRunner.

With ScriptRunner, you can embed the sub-query, such as:

issueFunction in portfolioParentsOf("project = ABC and issuetype = Epic")

^ This searches for all Initiatives above which are parents of all the Epics in project ABC. Similarly with linked issues you could have:

issueFunction in linkedIssuesOf("project = ABC and issuetype = Epic","implements")

----------------------------

Just to clarify, this would find just the Initiatives themselves. You can have both on one search filter by adding...

OR project = ABC and issuetype = Epic

...to end of the query.

Ste

Just to add to Ste's helpful note, for anyone looking to solve this challenge in Jira Cloud, the portfolioParentsOf() function is not currently available in ScriptRunner for Jira Cloud as the API to implement this function does not exist in Jira Cloud. 

However linkedIssuesOf() is included in ScriptRunner for Jira Cloud, as well as in Enhanced Search for Jira Cloud for those not requiring the scripting functionality of ScriptRunner.

Seb (Adaptavist)

Thanks for your help. Scriptrunner solved the problem. 

Like # people like this

Hi Ron,

In addition to previous responses you can achieve the desired results using i.e. JQL Booster Pack as well, instead of using Script Runner if your application is self-hosted.


Some examples here:

 

- Can this be achieved when parents are linked via the Parent Link field from Portfolio?

issue in portfolioParentOf("project = XXXX and type = Epic")

 

- Can this be achieved when parents are linked via issue links (Implements).

issue in linkedIssuesOf("project = XXXX and type = Epic","implements")

 

 

Using this app you can also query other issues relations, check:

 

References:

 

Hope this helps you to create awesome queries <3

Kind regards

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Advanced Roadmaps

Introducing Advanced Roadmap’s new dependency report

To see this feature in action check out our recent dependencies demo here: https://www.youtube.com/watch?v=eQu5VsUqyZA Keeping on top of your dependencies is a key part of ensuring project success....

148 views 2 6
Read article

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