Forums

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

How to filter blocked issues in ScriptRunner Enhanced Search

Algimantas Stancelis September 25, 2018

I want to filter all issues in a AA project that are blocked (have "is blocked by" link).

Problem:  ScriptRunner Enhanced Search does not have hasLinks() function. So hasLink("is blocked by") is not possible.

I've tried a couple options. None of which produce satisfactory result.

1. linkedIssuesOf() times out because it has to query a lot of possible blockers

project = AA linkedIssuesOf("project in (BB, CC, DD) and status != Done", "blocks")

We have a lot of projects and any issue in any project could block AA issue.

2. I can't find how to filter 'is blocked by' in issueFieldMatch()

 issueFunction in issueFieldMatch("project = AA and status != Done", "issuelinks", ".+")

 

Does anyone know how to get blocked issues in Script Runner Enhanced Search?

2 answers

1 accepted

1 vote
Answer accepted
Lucas Garcia September 27, 2018

Try this instead

project = ABC AND hasLinks = "is blocked by"
Algimantas Stancelis October 1, 2018

Nice! This one is exactly what I need.

0 votes
Ignacio Pulgar
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.
September 25, 2018

Have you tried this one?

project = AA AND issueFunction in hasLinks("is blocked by")
Algimantas Stancelis September 27, 2018

As I've mentioned in my question, that is the problem I want to solve - ScriptRunner Enhanced Search does not have hasLinks() function. So hasLink("is blocked by") is not possible.

I'm looking for a workaround.

Lucas Garcia September 27, 2018

I'm looking for this answer as well.

 

Screen Shot 2018-09-27 at 9.44.59 AM.png

Ignacio Pulgar
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.
September 27, 2018

Oh, sorry! Try this one instead:

project = AA AND issueFunction in linkedIssuesOf("status != Done", "blocks")
Algimantas Stancelis September 30, 2018

Tried that as well.

1. linkedIssuesOf() times out because it has to query a lot of possible blockers

project = AA linkedIssuesOf("project in (BB, CC, DD) and status != Done", "blocks")

Suggest an answer

Log in or Sign up to answer