How to get list of all unresolved linked issues which are linked to a different project?

Jeff Hayes
Contributor
August 8, 2022

Hey gang,

I'm having more problem converting/porting filters that worked just fine in Server over to Cloud.  I've tried regular JQL as well as Scriptrunner Enhanced Search with no good results.  

 

For reference, I have two projects, "RDT" and "RSD".  This Server query returns all the unresolved issues of project RDT which have the linkedIssue field filled out with an issue that lives in the RSD project:

project = RDT AND status in ("In Progress", "To Do", "In Testing", "In Review", QA, UAT) AND resolution = Unresolved AND issueLinkType in ("is blocked by", "relates to", blocks, clones, "is cloned by", duplicates, "is duplicated by", causes, "is caused by") AND issueFunction in linkedIssuesOf("project = RSD") ORDER BY priority DESC, updated DESC

 

I've tried numerous iterations of using the new "issueFunction in linkedIssuesOf" method and everything causes the parser to time out.  Since this query in Server runs in about a half second and only gives 20 results, the time-out makes no sense.

 

The latest test I've tried in Cloud was this and it too timed out:

project = RDT AND status in ("In Progress", "To Do", "In Testing", "In Review", QA, UAT) AND issueFunction in linkedIssuesOf("project = RSD", "resolution = Unresolved")

 

Is this Server search just not doable in Cloud?  So far we've been unimpressed with Cloud's features vs. Server's since they've removed much of the functionality we regularly use.

 

 

1 answer

1 accepted

0 votes
Answer accepted
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.
August 8, 2022

How many issues do you anticipate the filter would return?

Regarding your last filter attempt

project = RDT AND status in ("In Progress", "To Do", "In Testing", "In Review", QA, UAT) AND issueFunction in linkedIssuesOf("project = RSD", "resolution = Unresolved")

...I believe the syntax is wrong for  this part

 issueFunction in linkedIssuesOf("project = RSD", "resolution = Unresolved")

Looking at the documentation here, the syntax should be

issueFunction in linkedIssuesOf(<subquery>,[linktype])

 So the proper syntax would be

issueFunction in linkedIssuesOf("project = RSD AND resolution=Unresolved")

I don't have a lot of data in the Jira Cloud instance I use for testing, but this simple query returned the one issue I expected when run through ScriptRunner Enhanced Search:

project=CK and issuefunction in linkedIssuesOf("project=CS AND resolution=Unresolved") 
Jeff Hayes
Contributor
August 9, 2022

Trudy,

On the Server side, that filter returns 20 results.  It should return the same on the Cloud side.  I will try what you said and report back.  Thanks!

 

Jeff

Jeff Hayes
Contributor
August 10, 2022

Trudy, 

 

Thanks.  The syntax fix you provided allowed the filter to work as long as I had it ONLY look for the Unresolved tickets.  If I remove that resolution qualifier, the filter times out even though it should only find 4 additional issues.  

 

My best guess is that the latter part of the filter that looks for Resolved tickets returns thousands of issues from the RSD project and then it tries to perform the logical operations with my initial Project, RDT.

So basically, this works:

project = RDT AND status in ("In Progress", "To Do", "In Testing", "In Review", QA, UAT) AND resolution = Unresolved AND issueFunction in linkedIssuesOf("project = RSD AND resolution = Unresolved")

and these two things:

project = RDT AND status in ("In Progress", "To Do", "In Testing", "In Review", QA, UAT) AND resolution = Unresolved AND issueFunction in linkedIssuesOf("project = RSD AND resolution = Resolved")

or

project = RDT AND status in ("In Progress", "To Do", "In Testing", "In Review", QA, UAT) AND resolution = Unresolved AND issueFunction in linkedIssuesOf("project = RSD")

time out.

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.
August 10, 2022

Your assessment sounds logical to me. 

@Nic Brough -Adaptavist-  can you weigh in on this, since it relates to ScriptRunner?

Jeff Hayes
Contributor
August 15, 2022

@Nic Brough -Adaptavist- Any thoughts?

 

Thanks,

Jeff

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.
August 15, 2022

Cloud limits the amount of time a function can run before it times-out the process (to stop it chewing up all the resources Cloud has and eventually killing the system).  I'm afraid the issuefunction thing has to do a very large amount of work when you use it and it's simply finding too big a data set to get through in time.  It doesn't actually matter that a query "should only find 4 more issues", that's not the problem, it's "how many issues are being read to extract those 4"

You can check what it's trying to work with by running the problem clauses on their own.

project = RSD AND resolution = Unresolved

project = RSD AND resolution = Resolved

I think you'll find the result set from the first is a fraction of the second - like 100 unresolved issues, but 10,000 resolved.  And, of course, "project = RSD" is going to hit 10,100!  Issuefunction has to plough through all of them.

In your second query, you might try "and resolution is not empty" - I think that will change the index search in the background to actively looking for unresolved issues instead of trying to discard them from a list of everything.

Jeff Hayes
Contributor
August 15, 2022

Thanks for the reply, Nic. Unfortunately, the "and is not empty" solution timed out, as well. 

It's really disappointing that by moving to Cloud we seem to be making a pretty huge step backwards in terms of what we can do with the Jira product.  These queries ran quickly and easily in Server with no hint of a timeout.  And the number of resolved issues in our RSD project is only going to be growing by the thousands each month while the RDT project grows by the hundreds.  

Thanks again for the suggestion.

Jeff

Like Sarah Burton likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events