ScriptRunner not delivering expected results

Michael Czyzewski September 23, 2022

I have created a filter that uses the following:

resolution = unresolved AND issueFunction in epicsOf(“Project = ‘PROJECTNAME’”) AND NOT issueFunction in epicsOf(“resolution = unresolved”)

My intent is to create a list of epics that are still open (unresolved) but which have no remaining unresolved children (stories, etc). 

This returns a relatively finite list, which I would expect.  Each of the items returned, indeed, do not have any unresolved children.  It appears to be working….until I find another Epic that ALSO has not unresolved children, is part of the PROJECTNAME project, but DOES NOT appear as a search result in the filter.  

Any ideas why?

2 answers

0 votes
Andrea Pannitti
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, 2022

Hi @Michael Czyzewski,

and what about a JQL like this:

project = PROJECTNAME AND issuetype = Epic AND resolution = unresolved AND NOT issueFunction in parentsOf("issueFunction in subtasksOf('project = PROJECTNAME AND issuetype = Epic AND issueFunction in hasSubtasks()') AND resolution = unresolved")

?

0 votes
Andrea Pannitti
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 23, 2022

Hi @Michael Czyzewski ,

you could try with this JQL:

project = "PROJECTNAME" AND issuetype = Epic AND resolution = unresolved AND NOT IN (issueFunction in portfolioParentsOf("project = 'PROJECTNAME' AND resolution != unresolved"))
Michael Czyzewski September 23, 2022

AND NOT IN fails.  I believe it is expecting a field (I.e. AND field NOT IN….)

Suggest an answer

Log in or Sign up to answer