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

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

Avatar

1 badge earned

Collect

Participate in fun challenges

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

Challenges
Coins

Gift kudos to your peers

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

Recognition
Ribbon

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!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,559,096
Community Members
 
Community Events
184
Community Groups

How to get all issues without an epic and their subtasks?

Hello,

 

How to get all issues without epics and their subtasks? I tried the following JQL, but it fetches all subtasks from the project (even if they linked to the irrelevant story).

type != Epic AND "Epic Link" is EMPTY 

If I try to exclude these subtasks, I cannot see subtasks at all in the output list:

type not in ("Epic","Sub-tasks") AND "Epic Link" is EMPTY

Thanks,

 

 

1 answer

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 26, 2023

Hello @Victoria Luskin 

Are you working with Jira Cloud or Jira Server/Data Center? If your URL is like the following then you are working with Jira Cloud.

https://<something>.atlassian.net

If you are working with Jira Cloud, are you trying to get issues from Company Managed projects or Team Managed projects or both?

I understand you want to get a list of standard issues and their subtasks. Is it also true that you want only the standard issues that are not children of Epics?

To get the subtasks of a list of standard issues use this:

linkedissues in (<comma separated list of standard issues>) and issuetype in subtaskIssueTypes()

You have to use an explicit list of issue keys for the standard issues in the above statement. Jira does not have a native method to let you provide that list dynamically for the linkedissues keyword.

There are third party apps that would allow you to get the subtasks for a list of standard issues where the list of standard issues is derived dynamically from another JQL statement.

Do you have any such third party apps, or would you consider acquiring one?

Hello @Trudy Claspill 

Thanks for your assistance.

I am working on Server/Data center.

You got it correct,  I need to get the list of all items without Epic and if those items have subtasks, I want to display them as well.

I have tried to use JQL you suggested, but it doesn't work for me.

Now  I am trying this way: to show all items, except Epic & Subtasks OR all subtasks from the stories without Epics, but the list does not include subtasks at all. Can you please take a look?

(project = RAIN) AND (type not in (Epic,Sub-task) AND "Epic Link" is EMPTY) OR (filter ="Story without Epic" OR (issueFunction in subtasksOf("filter = 'Story without Epic' ")))

Thank you

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 29, 2023 • edited May 30, 2023

Hello @Victoria Luskin 

For future posts you might want to make sure that you tag your post to identify your hosting type and specify the version of the product you are using. That will help us direct you to the correct answer/documentation more quickly.

There was a typo in the JQL I provided to you. It should be linkedIssue (singular) rather than linkedIssues (plural).

Regardless, I see that you have "issueFunction" in the new filter that you tried, which indicates you have a third party app that extends the JQL functionality with additional functions.

If you create and save a filter for stories without epics thus:

project = X and issuetype not in (Epic, subtaskIssueTypes()) and "Epic Link" is empty

Then you can get the standard tasks and their sub-tasks thus:

 

filter = "Stories without Epics" or issueFunction in subtasksOf("filter = 'Stories without Epics'")

 

@Trudy Claspill Thanks a lot for guiding me. It works!

Like Trudy Claspill likes this

Suggest an answer

Log in or Sign up to answer