Scriptrunner logic for Components

Thayne Munson
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.
July 17, 2024

I am running a scriptrunner filter to identify all the epics my team is working on in a given sprint.  

project = dis and issueFunction in epicsOf("sprint = 1625") order by status asc, assignee asc

There are some epics that I want to filter out of the query based on 2 component values(A,B).  When I add in the components I don't want, it also filters out epics with no components which I want to keep in the query. I have tried this query 2 ways.

1  Component != A and Component != B

2  Component not in (A, B)

Any thoughts to how I can make this work?  Thanks. 

 

1 answer

0 votes
Thayne Munson
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.
July 17, 2024

I knew if I kept looking through community responses I would find the answer.  I wasn't aware of the 'Component is Empty' option.  This fixed my problem. 

(component is EMPTY OR (component is not EMPTY AND component not in (A, B, C, D, E)))

Suggest an answer

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

Atlassian Community Events