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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


JQL to get linked stories of epic and bugs linked to the stories

Vasanthram Srinivas
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Sep 19, 2023


Can anyone suggest how can I get the list of all the stories linked to an epic and the bugs linked to the stories?

We have Scriptrunner and on the Jira server version we were using linkedIssuesOfAllRecursiveLimited function and it is no more available on the cloud version.

linkedIssuesOfRecursiveLimited function isn't giving the same results.

2 answers

2 accepted

8 votes
Answer accepted
Romy Greenfield
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.
Sep 20, 2023

Hello Vasanthram Srinivas

Have you completed a full cloud migration or recently installed ScriptRunner for Jira Cloud?

If so, have you started and waited for the initial JQL keyword sync to complete as per our docs here? If this has not completed, it could explain you not seeing some results. 

My understanding is that you want to see all the stories that are a child of the epic and the bugs that then have some type of link to a bug? Please correct me if I am wrong.

You can use issueFunction in issuesInEpics("issue = <epic issue>"), save this as a filter and then find it in the all filters menu and see the filter id in the URL. 

and then you can save a second filter below using the previous filter's ID

filter = <filter id> or (issueFunction in linkedIssuesOfRecursiveLimited("<filter id> ", 1) and type = bug)

This should give you a list of all the children of the epic and the bugs linked to those child tickets.

Let me know if that works for you.

Best regards,


Vasanthram Srinivas
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Sep 25, 2023

Results as expected, Thanks a ton.

Like Romy Greenfield likes this
7 votes
Answer accepted

Hi @Vasanthram Srinivas,

In ScriptRunner for Jira Cloud, you can get all the stories for the epics using the issuesInEpics function. You can then save the query as a filter, which you can reference in your subsequent queries. 

Here are the examples of how you can set this up:

Filter A

issueFunction in issuesInEpics("project = SUN")

To find all the stories for the SUN project's epics. 

Filter B

 issueFunction in linkedIssuesOfRecursiveLimited("filter = "Filter A"", 1) OR filter = "Filter A"

To get the issues linked to the stories (recursion limit is 1 here) as well as all the stories for the SUN project's epics.

As a side note, it's important to mention that you can only utilize the JQL functions offered by ScriptRunner on the ScriptRunner Enhanced Search page, which is accessible via the following URL within Jira Cloud:

<Jira_Base_URL> /plugins/servlet/ac/com.onresolve.jira.groovy.groovyrunner/jql-search-view 

For a more comprehensive understanding of the available functions and their comparisons between the server and cloud versions, you may refer to the following documentation: Comparison with ScriptRunner for Jira Server

Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events