Forums

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

Can't figure out how to reference another query's output

Heather Hale June 12, 2023

I currently have a query to pull stories that is like this:

Query1: issueFunction in issuesInEpics("filter = \"My Project Epics\"")

and another that is like this, to pull cancelled Stories:

Query2: issueFunction in issuesInEpics("filter = \"My Project Epics\"") and status = "Cancelled"

I'm trying to find a way to pull the Stories in Query2 by using Query1 , instead of repeating this part issueFunction in issuesInEpics("filter = \"My Project Epics\"") 

 I haven't been able to find a way to do this yet (I can only find Portfolio & Epic references.

I cannot hardcode the Epic keys since they are subject to change without me being told about it.

1 answer

1 accepted

0 votes
Answer accepted
Radek Dostál
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.
June 12, 2023

I don't follow what the question is.. You can either specify the JQL inside the subquery, or you can refer to a filter like in your example, but what's the problem?

You can also use ' and \' if you run out of quotes. I think you can chain them too i.e. \\\" but it might take some testing/tries, not quite sure since queries which need quote escapes should usually be broken down to smaller pieces.

Heather Hale June 12, 2023

I'm looking for a way to basically do something like:

"issues in 'Query1' and status = Cancelled"

Radek Dostál
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.
June 12, 2023

So why not do

query1 and status = Cancelled

or

filter=query1filter and status = Cancelled

 

'issues' seems needless, when the query already returns issues?

Like Heather Hale likes this
Heather Hale June 12, 2023

Thank you! That was the part I couldn't figure out from our stuff here at work (using "filter" as the starting point). 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events