Forums

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

JQL- Exclude Epics with certain Issue Status

Christine Abbott November 27, 2019

I'm using a JQL to import my Jira issues to MSP using Ceptah Bridge. 

My code is set up to ask for the Initiatives, with linked Epics, and stories/dev tasks that are related to each Epic. 

issue in linkedIssues(TIPSN-6) OR ("Epic Link" = TIPSNRCRM-666)

I've then added a line to exclude any issues with the status's we deem as complete

AND status != "Code Complete"

However, when I combine my JQL filter for all our current work it is still pulling over the Epics that have a completed status. 

Is there a way using the JQL to apply the status exclusions to the Epic Links?

Or is it ignoring the exclusions because I've called the Epic links specifically.

 

1 answer

0 votes
Pete Singleton
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.
November 27, 2019

Can you post the combined JQL you are using?  This could maybe just be a question of parenthesis to order the logic, e.g.

Status != "Complete" AND ( issue in linkedIssues(TIPSN-6) OR "Epic Link" = TIPSNRCRM-666 )

Christine Abbott November 27, 2019

issue in linkedIssues("TIPSGAG-49") OR issue in linkedIssues("TIPSGAG-46") OR issue in linkedIssues("TIPSN-7") OR issue in linkedIssues("TIPSGAG-47")OR issue in linkedIssues("VER-8")OR issue in linkedIssues("TIPSTNW-1")OR issue in linkedIssues("TIPSTPE-3")OR issue in linkedIssues("VER-7") OR issue in linkedIssues( TIPSMRL-1)OR("Epic Link" in (TIPSGAGS-319,TIPSGAGCRM-334, TIPSGAGCRM-338, TIPSGAGCRM-340, TIPSGAGCRM-558, TIPSGAGOP-48, TIPSGAGA-725, TIPSGAGA-726, TIPSGAGA-733, TIPSGAGCRM-451, TIPSGAGA-754, TIPSGAGCRM-332, TIPSGAG-51,TIPSNRA-410,TIPSGTROP-33, TIPSGTROP-34,APM-394,TIPSTWS-96,TIPSMRCRM-195, TIPSMRCRM-194,TIPSTPECRM-170, TIPSTPECRM-158, TIPSTPEA-208,APW-546, TIPSMRCRM-195, TIPSMRCRM-194,TIPSTPE-4)) AND type!="Deployment Task" AND status != "Cannot reproduce" AND status != "Rejected" AND status != "Resolved" AND status != "Code Complete" AND status != "In Test" AND status != "Needs Testing"

Pete Singleton
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.
November 27, 2019

Try putting the Status JQL at the beginning of the query, and wrap the rest of it in brackets

Christine Abbott November 27, 2019

Hi Pete, I've reodered, but I then get over 3000 issues returned against the 200 I'm expecting.

The brackets didn't work so I did the following. Still getting my head around when to apply OR & AND to query's - sorry new to the game :)

 

status != "Cannot reproduce" AND status != "Rejected" AND status != "Resolved" AND status != "Code Complete" AND status != "In Test" AND status != "Needs Testing" OR issue in linkedIssues("TIPSGAG-49") OR issue in linkedIssues("TIPSGAG-46") OR issue in linkedIssues("TIPSN-7") OR issue in linkedIssues("TIPSGAG-47")OR issue in linkedIssues("VER-8")OR issue in linkedIssues("TIPSTNW-1")OR issue in linkedIssues("TIPSTPE-3")OR issue in linkedIssues("VER-7") OR issue in linkedIssues( TIPSMRL-1)OR("Epic Link" in (TIPSGAGS-319,TIPSGAGCRM-334, TIPSGAGCRM-338, TIPSGAGCRM-340, TIPSGAGCRM-558, TIPSGAGOP-48, TIPSGAGA-725, TIPSGAGA-726, TIPSGAGA-733, TIPSGAGCRM-451, TIPSGAGA-754, TIPSGAGCRM-332, TIPSGAG-51,TIPSNRA-410,TIPSGTROP-33, TIPSGTROP-34,APM-394,TIPSTWS-96,TIPSMRCRM-195, TIPSMRCRM-194,TIPSTPECRM-170, TIPSTPECRM-158, TIPSTPEA-208,APW-546, TIPSMRCRM-195, TIPSMRCRM-194,TIPSTPE-4)) AND type!="Deployment Task"

Pete Singleton
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.
November 27, 2019

I think you need to change the OR to an AND:

status != "Cannot reproduce" AND status != "Rejected" AND status != "Resolved" AND status != "Code Complete" AND status != "In Test" AND status != "Needs Testing" AND (issue in linkedIssues("TIPSGAG-49") OR issue in linkedIssues("TIPSGAG-46") OR issue in linkedIssues("TIPSN-7") OR issue in linkedIssues("TIPSGAG-47")OR issue in linkedIssues("VER-8")OR issue in linkedIssues("TIPSTNW-1")OR issue in linkedIssues("TIPSTPE-3")OR issue in linkedIssues("VER-7") OR issue in linkedIssues( TIPSMRL-1)OR("Epic Link" in (TIPSGAGS-319,TIPSGAGCRM-334, TIPSGAGCRM-338, TIPSGAGCRM-340, TIPSGAGCRM-558, TIPSGAGOP-48, TIPSGAGA-725, TIPSGAGA-726, TIPSGAGA-733, TIPSGAGCRM-451, TIPSGAGA-754, TIPSGAGCRM-332, TIPSGAG-51,TIPSNRA-410,TIPSGTROP-33, TIPSGTROP-34,APM-394,TIPSTWS-96,TIPSMRCRM-195, TIPSMRCRM-194,TIPSTPECRM-170, TIPSTPECRM-158, TIPSTPEA-208,APW-546, TIPSMRCRM-195, TIPSMRCRM-194,TIPSTPE-4)) AND type!="Deployment Task")

Christine Abbott November 27, 2019

Hi Pete, Thank you for this, unfortunately its not worked.

Its now returning all the issues types with the excluded Issue Status.

It has highlighted that I'm not pulling the Initiatives so I've had to add them to the end of the query but that's pulling all issues, again including the excluded status.

status != "Cannot reproduce" AND status != "Rejected" AND status != "Resolved" AND status != "Code Complete" AND status != "In Test" AND status != "Needs Testing" AND issue in linkedIssues("TIPSGAG-49") OR issue in linkedIssues("TIPSGAG-46") OR issue in linkedIssues("TIPSN-7") OR issue in linkedIssues("TIPSGAG-47")OR issue in linkedIssues("VER-8")OR issue in linkedIssues("TIPSTNW-1")OR issue in linkedIssues("TIPSTPE-3")OR issue in linkedIssues("VER-7") OR issue in linkedIssues( TIPSMRL-1)OR("Epic Link" in (TIPSGAGS-319,TIPSGAGCRM-334, TIPSGAGCRM-338, TIPSGAGCRM-340, TIPSGAGCRM-558, TIPSGAGOP-48, TIPSGAGA-725, TIPSGAGA-726, TIPSGAGA-733, TIPSGAGCRM-451, TIPSGAGA-754, TIPSGAGCRM-332, TIPSGAG-51,TIPSNRA-410,TIPSGTROP-33, TIPSGTROP-34,APM-394,TIPSTWS-96,TIPSMRCRM-195, TIPSMRCRM-194,TIPSTPECRM-170, TIPSTPECRM-158, TIPSTPEA-208,APW-546, TIPSMRCRM-195, TIPSMRCRM-194,TIPSTPE-4)) AND type!="Deployment Task" OR issue =TIPSGAG-49 OR  issue =TIPSGAG-46 OR issue =TIPSN-7 OR issue =TIPSGAG-47 OR issue =VER-8 OR issue =TIPSTNW-1 OR issue =TIPSTPE-3 OR issue = VER-7 OR issue = TIPSMRL-1 OR Issue TIPSGAGS-319

Any further thoughts in my errors? Thanks so much in advance for reviewing until this point.

Pete Singleton
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.
November 27, 2019

You still need to use brackets in the correct places....

E.g. "(Status = X OR Status = Y) AND (issue in Z)"  will return a different result to

"Status = X OR Status = Y AND issue in X"

Suggest an answer

Log in or Sign up to answer