Forums

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

"issuelink in ({list})" works but "issuelink not in({samelist}) doesn't

Lily Goykhman April 27, 2021

"issuelink in ({list})" works but "issuelink not in({samelist}) AND project in ({list})" returns 0 while there're dozens of issues meeting the criteria.

 it seems that issuelink can't tolerate any other conditions in the JQL statement

1 answer

0 votes
Bill Sheboy
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.
April 27, 2021

Hi @Lily Goykhman 

Would you please provide a complete example of the JQL you are trying which you believe does not work?  That may provide more context for the community to answer.

issueLink NOT IN (ABC-123, ABC-456, DEF-123) 

uses keys in the list.  Is that what you are trying?

Best regards,

Bill

Lily Goykhman April 27, 2021

Hi Bill,

 Yes, that is what I am trying:

issueLink in (CM-1538, CM-1508) AND labels in (MR_20210506, MRCandidate_20210506) AND labels not in (Merged_1.22.0, NothingToRelease, QR_202103, QRCandidate_202103) AND issuetype not in (Epic, Sub-task, Sub-Defect) AND project not in (RTI, CM, "Custom Programming Requests", CMP, RC, RCRT) AND (resolution not in (Non-Issue, Rejected, Duplicate, Cancelled, Declined, "Cannot Reproduce", "Won't Do") OR resolution is EMPTY) AND status not in ("On Hold", Released) AND labels != COVID AND issuetype in (Story) 

that works.

 Once I replace "issueLink in (CM-1538, CM-1508")  with "issuelink not in (CM-1538, CM-1508)" it show 0 results. Upon manual check i do find issues that answer to this " not in" condition .

Thank you!

Bill Sheboy
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.
April 27, 2021

Thanks for confirming that, Lily.

Although there are definitely open defects for JQL, for a complex query like this it can help to rule out issues by incrementally building/testing to see when the results go to zero.  That may reveal if there is a defect or just a query error/misunderstanding.

Before doing that, it seems like there are some unneeded clauses in the query, or some missing parentheses.  For example if I reformat your JQL as below...

issueLink in (CM-1538, CM-1508)
AND labels in (MR_20210506, MRCandidate_20210506)
AND labels not in (Merged_1.22.0, NothingToRelease, QR_202103, QRCandidate_202103)
AND issuetype not in (Epic, Sub-task, Sub-Defect)
AND project not in (RTI, CM, "Custom Programming Requests", CMP, RC, RCRT)
AND (
resolution not in (Non-Issue, Rejected, Duplicate, Cancelled, Declined, "Cannot Reproduce", "Won't Do")
OR resolution is EMPTY
)
AND status not in ("On Hold", Released)
AND labels != COVID
AND issuetype in (Story)
  • It seems that issueType can only be Story.  If that is correct, the earlier check for "issueType NOT IN (...)" is not needed.
  • For the tests on "labels IN (...)" and "labels NOT IN(...)" and "labels != COVID", perhaps you only need the "labels IN (...)" one as the others would be excluded

The result would be:

issueLink in (CM-1538, CM-1508)
AND labels in (MR_20210506, MRCandidate_20210506)
AND issuetype = Story
AND project not in (RTI, CM, "Custom Programming Requests", CMP, RC, RCRT)
AND (
resolution not in (Non-Issue, Rejected, Duplicate, Cancelled, Declined, "Cannot Reproduce", "Won't Do")
OR resolution is EMPTY
)
AND status not in ("On Hold", Released)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events