Trying to view all issues linked to the output of a filter or query...

Lisa Napier February 9, 2021

We have stories with often 5-7 tasks associated, and from 1 or 2 of those tasks, we have bugs cross linked to other projects. 

for Example: 

PRD-1 (Story) 

PRD-2 (Task - linked to PRD-1) 

Linked to JOB-1, JOB-10, JOB-47. (Because Task PRD-2 was to make more work for JOB team) 

 

I'd like to make a report that allows me to use my filter which is defined as "IssueType = Story" 

project=PRD and linkedIssue in linkedIssues("PRD-1")

works - but is limited as I have 50 of those things I'd like to view. 

But my search: 

project = PRD and linkedIssue in linkedIssues("IssueType = Story")

Fails. 

As does 

project = PRD and linkedIssue in linkedIssues(Filter = My50Filter)

project = PRD and linkedIssue in linkedIssues("Filter = My50Filter")

All error out with "Issue 'Whatever in parens' could not be found in function... 

Would appreciate any help! 

 

2 answers

0 votes
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 18, 2021

Hello @Lisa Napier ,

The JQL "linkedIssues" that you are using only work for a single reference issue as the source.  The values are relying on the source issue to define an individual issue to reference a source, but there is not a method to pass in multiple issues, and we have a feature request tracking interest in this at the following link.  Make sure to add your vote to the request:

The Method that @Vinod Ramadoss mentioned would praobly be the best workaround for what you are looking to achieve but also require the third party add-on app ScriptRunner for Jira  which has the mentioned additional scripted JQL functions that can isolate for link types on nested filters, as noted above via the "issuefunction in linkedIssuesOf('filter = "AB"')" JQL,  some details can be seen on the Adaptivist documentation for scriptrunner here:

And some additional recommendations on using this function provided by ScriptRunner in the following Community posts where other users were looking for a similar action and this tool was the recommended solution:

An alternative approach would be to narrow down the results using the link types and statuses in the JQL with something like 

(project = PRD and issueLinkType = "is blocked by") OR (project != PRD AND issueLinkType in (blocks))

Another option is to incorporste open sprints if you wanted to isolate issues that are currently in the works that need attention and also trying to incorpoerate labels in some way to make the issues more distinguishable, however labels would require manual processes for the end users to add said lables in advance when the linking actions are taken, and has the potentioal for user error.

"project = PRD AND issueLinkType = "is blocked by" AND sprint in openSprints() AND labels = LABEL_NAME"

I recomend checking out the natively available JQL options in the following reference material to help narrow things down a bit further:

Regards,
Earl

0 votes
Vinod Ramadoss
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 13, 2021

Hi Lisa,

For such scenarios I generally use jql 

project = xyz and issuefunction in linkedIssuesOf('filter = "AB"'), try and let me know if you are able to get your desired results.

Lisa Napier February 15, 2021

Hi Vinod, That didn't help. 

I don't have issuefunction available, and linkedissuesOf isn't available either.  

When I use issuekey in linkedIssues I get the below error.  

 "filter='MyFilter''' could not be found in function 'linkedIssues'.

 

The same query works fine with 

project=PRD and issuekey in linkedIssues("PRD-1")

 

But I get the error message: Unable to find JQL function 'linkedIssuesof(PRD-1)'. 

When attempting to use that syntax. 

 

Unfortunately, due to our current plan & limited use of this function - I'm not going to get plugin approvals any time soon.  

Like Zeeshan Hasnain likes this
Zeeshan Hasnain November 29, 2022

Thank you.. It really really helped me. 

Priyanka Madaan January 11, 2023

Hi @Zeeshan Hasnain Could you please help me how you resolved this issue as I am looking for the similar thing.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events