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

ScriptRunner Query Filter returning incomplete results

Scott Napolitan June 27, 2024

I've written a query filter using ScriptRunner Enhanced Search and saved it as a filter so that I can share a hyperlink to the query.

When I run the query in the ScriptRunner Enhanced Search page, I see the correct results.Jira_ScriptRunnerView_Redacted.pngI've saved this query as a filter and have the following link to that query

 
 https://FOO.atlassian.net/issues/?filter=39034


When I use the hyperlink (logged in with the same account that created it and sees the result in the screenshot above) however, I see this result.  Note the number of items I see using the filter hyperlink is now 9 instead of 11.  Two of the items are missing.  This seems like a bug but perhaps I've overlooked something?  Is this a known issue?

JiraFilterView_redacted.png

2 answers

1 accepted

Suggest an answer

Log in or Sign up to answer
1 vote
Answer accepted
Scott Napolitan June 27, 2024

I think I have found the issue.  This would explain the behavior I am seeing. 
status.png

1 vote
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.
June 27, 2024

Hello @Scott Napolitan 

Have you identified the two missing issues? Do they match the conditions of the filter?

I would suggest that you break down the filter into its subparts and check each.

First does the subfilter within the linkedIssuesOf() function give you the same results in both screens?

Then, adding that subfilter to the linkedIssuesOf() function, do you get the same results in both screens?

Then, add the next component of the filter - the Status criteria - and compare the results again.

And so on. That will help you narrow down the source subpart of the query that is generating the discrepancy. Once you have the source of the discrepancy, then you can look at the details of the two results sets and find the specific issues that are discrepant and examine the details of those issues to determine why they are discrepant.

Scott Napolitan June 27, 2024

Hi @Trudy Claspill

First off, thanks for responding!  
Yes the two issues that are missing from the linked filter do indeed match the criteria of the query.  What's interesting to me is that the same query filter viewed from two different pages returns two different results; the first one being correct and the second missing items.  I'm using this particular filter as an example but I'm seeing the same behavior from others.  

I did follow the process you suggested, however I get the same outcome.  I'm seeing correct results in one place but not the other.  I do see that when I use the filter link, the first part of the query which gets the issues for which I want the linked issues, is expanded to show a list of issue IDs rather than the JQL.  When I look at this I do see that the list does NOT include all the issues for which I want to retrieve the linked issues, and that the missing linked issues are in fact linked to the items that are not in the expanded list. 
So this would suggest that there is an issue with the first part of the query, however when I go to the ScriptRunner page where I author the query filter I see the correct result!  So what would I change?  
Sure seems like a bug.

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events