Forums

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

My client asked Hello, I need help working through a JQL filter in jira.

Kelvin Fielding May 25, 2023

Hello, I need help working through a JQL filter in jira. The goal is to bring in and initiative level and all associated issue types from any project, and I need to pull initiative level starting in 2 different project keys (BUILD, and WORKPL).

issueFunction in linkedIssuesOfAllRecursive ("issue =WORKPL-353") AND issueFunction in linkedIssuesOfAllRecursive ("issue =BUILD-57") does not pull any issues at all, which I think is because of the AND.

issueFunction in linkedIssuesOfAllRecursive ("issue =WORKPL-353") OR issueFunction in linkedIssuesOfAllRecursive ("issue =BUILD-57") brings in over 250k issues into the search that has a lot more than just the 2 initiatives I have listed in the query.

I’d like to expand this to more than just these two initiatives, if I can figure out the correct way to write this query. Thank you!|

I can't see a way of meeting his requirements. Any of you clever people know a way?

2 answers

2 accepted

0 votes
Answer accepted
Mirek
Community Champion
May 25, 2023

Hi @Kelvin Fielding 

linkedIssuesOfAllRecursive function would bring all linked issues until the end.. Using AND would not work since it would be hard to the the same logic in both sets of issues..

What kind of structure you are having? Is there any specific link that you do do the "initiative"? How many levels?

Maybe you can simply create and save a filter that would give you results of specific issues e.g "project in (BUILD, WORKPL)" or "key in (WORKPL-353, BUILD-57)" depends how many results you want - this would give you all the issues that would be "scanned".. name this filter somehow "MyFilter" then execute the linked issues function

issueFunction in linkedIssuesOfAllRecursive("filter = \"MyFilter\"")

 Anyway if you want to limit there is you can also use

linkedIssuesOfRecursiveLimited

 which would allow you limit the number of levels etc. 

For more information how to use those functions you can refer to documentation

https://docs.adaptavist.com/sr4js/latest/features/jql-functions/included-jql-functions/issue-links

There are couple od examples that would give you an idea how to solve it.. If not please share your structure and relations and we would try to figure out together.

Kelvin Fielding May 26, 2023

Thanks, Will work with the customer on this.

Like Mirek likes this
Mirek
Community Champion
May 26, 2023

Sure, let us know if you need more help.

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.
May 25, 2023

Well, the function parameter is a subquery, so you could write the filter there:

issueFunction in linkedIssuesOfAllRecursive("project in (BUILD, WORKPL) and issuetype = Initiative")

And you can also include the initiatives themselves by appending

OR project in (BUILD, WORKPL) and issuetype = Initiative"

 

But here I'm not so sure you really want "linkedIssuesOfAllRecursive", whether you just want the immediate linked issues but nothing beyond that. What also I'm unsure of whether we are talking about issue links, or Parent Link (roadmaps). IssueFunction also has 'portfolioChildrenOf(subquery)' which is more what you're after?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.2.10
TAGS
AUG Leaders

Atlassian Community Events