Forums

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

Extract stories and not sub-tasks (or) Intakes under the EPIC

KE
Contributor
February 6, 2023

I have tried the below query to extract linked issues and issues under the EPIC "ABC". However, the results show up sub-tasks and intake type. How can I only filter out user stories?

issue in linkedIssues(ABC) OR "Epic Link" = ABC AND issuetype = Story AND Status not in (closed, de-scoped)

Also, can I use the above query to include multiple EPICS, if not what tweaks should be made to include multiple epics. 

2 answers

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
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.
February 6, 2023

Your query would work if you used parenthesis to make it clear to the computers what to do.

At the moment you're including sub-tasks and intake type because Jira has no choice but to read the query left to right, it's not doing the and/or things the way you are thinking.

I suspect you really mean is

( issue in linkedIssues(ABC) OR ("Epic Link" = ABC AND issuetype = Story ) AND Status not in (closed, de-scoped) 

KE
Contributor
February 6, 2023

Appreciate your response, Nic. Your query doesn't seem to work. I still see all the sub-tasks and Intakes along with User Stories in my resultPicture2.png

Nic Brough -Adaptavist-
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.
February 6, 2023

Um, that's what you said you wanted to see.  But that is just the way I read your question.

Could you write your search out as you would explain it to us if we were talking?

" extract linked issues and issues under the EPIC "ABC"" is a bit hazy in Jira speak.  Sub-tasks and "intake" are linked issues in Epics, linked issues are different to issues that are "under" an Epic, and and and.  Epics and the issues within them can each have their own sub-tasks, which is a third type of link, so I'm not clear on whether you think the Epic's sub-tasks count as "being in the Epic"

KE
Contributor
February 6, 2023

There are Sub-tasks, stories and Intake linked to an EPIC “ABC” along with some user stories that have EPIC link field tied to the EPIC “ABC”.

my request was to extract issues linked and tied to the EPIC with exception of sub tasks and intakes. 

Nic Brough -Adaptavist-
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.
February 6, 2023

Ok, that has helped me understand, but I am not sure I have this completely right. 

This query will find issues linked to your Epic (meaning with issue links)

 issue in linkedIssues(ABC) AND Status not in (closed, de-scoped) AND issuetype not in (subTaskIssueTypes(), Intake)

This query will find issues in your Epic (meaning stories and other issues where the Epic is the parent)

"Epic Link" = ABC AND issuetype = Story AND Status not in (closed, de-scoped) AND issuetype not in (subTaskIssueTypes(), Intake)

However, Atlassian are in the process of changing how parent issues work, so you might find 

Parent = ABC AND issuetype = Story AND Status not in (closed, de-scoped) AND issuetype not in (subTaskIssueTypes(), Intake)

works as we would expect now.

KE
Contributor
February 7, 2023

When I tried the above queries you provided - the below warning message appears:

The value 'Intake' does not exist for the field 'issuetype'.

Nic Brough -Adaptavist-
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.
February 7, 2023

I was guessing that you had an issue type called "intake" from "with the exception of sub-tasks and intakes".

How are you actually identifying "intakes" if it is not by issue type?

KE
Contributor
February 7, 2023

issuetype in ("Project Request","Project Work") is the way I identify Intakes

Nic Brough -Adaptavist-
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.
February 7, 2023

Ok, great!  All you need to do is change my "(subTaskIssueTypes(), Intake)" to "(subTaskIssueTypes(), "Project Request","Project Work")"

KE
Contributor
February 7, 2023

issuetype = Story AND Status not in (closed, de-scoped) AND issuetype not in (subTaskIssueTypes(), "Project Request","Project Work") AND issue in linkedIssues(ABC) OR "Epic Link" = ABC

This is the query that worked. Thank you so much for your patience and correspondence. Appreciate it. 

KE
Contributor
February 7, 2023

One last question - Looking for what to be included in the below query to remove non-development issue types from the results:

Status not in ("Closed", "De-scoped") AND issuetype = Story AND issuetype not in (subTaskIssueTypes(), "Project Request","Project Work") AND issue in linkedIssues(TTIFES-3450) OR "Epic Link" in ( TTIFES-3450, TTIFES-3455, TTIFES-3456)

Nic Brough -Adaptavist-
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.
February 7, 2023

So how are you identifying "non development issues"?

KE
Contributor
February 7, 2023

issuetype = "Non Development"

Nic Brough -Adaptavist-
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.
February 7, 2023

Ok, so include that in the query clause that excludes issue types.

KE
Contributor
February 7, 2023

Status not in (Closed, De-scoped) AND issuetype = Story AND issuetype not in (subTaskIssueTypes(), "Non Development", "Project Work") AND issue in linkedIssues(3450) OR "Epic Link" in (3450, 3455)

When the above query is executed - the results still display non-development issue types and user stories that are closed and de-scoped.

Nic Brough -Adaptavist-
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.
February 7, 2023

You need to use the parenthesis I talked about earlier.  That query is being read left-to-right, the "or" is not doing what you think it should.

Like KE likes this
KE
Contributor
February 9, 2023

Thank you

0 votes
Jack Brickey
Community Champion
February 6, 2023

Can you try this...

issue in linkedIssues(ABC) OR "Epic Link" = ABC AND (issuetype = Story AND Status not in (closed, de-scoped))

If you want multiple epics maybe...

issue in linkedIssues(ABC) OR "Epic Link" in (ABC, XYZ, QWE) AND (issuetype = Story AND Status not in (closed, de-scoped))

The exact JQL depends on improving my understanding of your exact goal.

KE
Contributor
February 6, 2023

Appreciate your response, Jack. Your query doesn't seem to work. I still see all the sub-tasks and Intakes along with User Stories in my result.

Picture1.png

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events