ScriptRunner JQL function help

Brian Karp February 7, 2018

Hello,

I'm hoping someone on the community can help with this. I'm trying to write a filter using ScriptRunner JQL functions but I've hit a roadblock.

Here's my current filter

project = AEM AND issuetype != Initiative AND status != Unreviewed OR status != Unreviewed AND issueFunction in epicsOf("project = AEM and issuetype != Initiative AND status != Unreviewed") ORDER BY Rank ASC

What I can't seem to take out of this filter are any issues linked to Epics in which the status of the Epic is "Unreviewed".  I don't want those to show up. Any ideas for what I could do here?

1 answer

4 votes
Kyle Moseley
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 7, 2018
(project = AEM AND issuetype != Initiative AND status != Unreviewed) OR (status != Unreviewed AND issueFunction in epicsOf("project = AEM and issuetype != Initiative AND status != Unreviewed")) ORDER BY Rank ASC

Try adding parenthesis to clarify the order of operations. I took a guess at the order you're going for. Set A OR Set B. Also, consider adding/substituting ...

AND issueFunction in issuesInEpics("project = AEM AND status != Unreviewed")

Which should search for issues in AEM, Unreviewed Epics. My logic may be off because I don't know know your project like you do, but I suspect that issuesInEpics function may help you.

https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html

Brian Karp February 12, 2018

Thanks for the reply Kyle. The parenthesis didn't change anything and the "issuesinEpics" function doesn't help either.  Stories under "Unreviewed" Epics are still showing up.

I used the "epicsOf" function because I wanted to be able to pull in linked Epics that may exist in another Jira Project. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events