Forums

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

[JQL] How to exclude specific link issue (issuetype)?

RIZKY JTUASIKAL
Contributor
April 21, 2025

How can I exclude certain issue types using JQL?

Example
issuetype = ‘Release Infra/Net/Security’ AND project = BTPNCORE AND status changed to COMPLETED during (2023-09-01,2024-12-31) and (Linkissuetype = ‘relates to’ and excludeissuetype = (issuetype A)) 

 

something like that (?)


I'm using Jira Cloud Standard

2 answers

1 accepted

3 votes
Answer accepted
Anshul Arora
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 21, 2025

Hi Rizky,

 

Say you are looking for linktype 'relates to' and want to exclude 'Task' issue type in a project BTPNCORE. You can try this. 

project = BTPNCORE AND issueLinkType = "relates to" AND issuetype != Task

Hope this helps.

Thanks,
Anshul

RIZKY JTUASIKAL
Contributor
April 21, 2025

Hi @Anshul Arora ,

 

Thank you for answering my question.
I would like to ask again.

 

First, 
I have issuetype A, B, C, and D

 

The question is, 

How can I get issuetype A, which has no linkissue (relates to) to issuetype B (yellow mark on the picture)?

Screenshot 2025-04-21 153430.png

and if issuetype A has a linkissue to issuetype other than A (issuetype C and D), then it's okay.



Is this possible with jira standard?

Anshul Arora
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 21, 2025

Hi Rizky,

 

Thanks for the clarification. Unfortunately, JQL doesn’t support negative issue link conditions natively. You can't directly reference the issue type of linked issues in a simple JQL statement.

If you have ScriptRunner, you can try using the issueFunction to achieve this or any other marketplace plugin.

Like RIZKY JTUASIKAL likes this
RIZKY JTUASIKAL
Contributor
April 21, 2025

Hi @Anshul Arora ,

 

once again, thank you for the answer :)

Like Anshul Arora likes this
1 vote
cyrine belhadj
Contributor
April 29, 2025

Hello @RIZKY JTUASIKAL  , 

In jira native you can't create issue link with specific types 

As alternative you can try this solution : 
   Create a field for example name = "linked to type " 

   Then go to create an automation rule : 
       Pick Issue linked as Trigger and choose the type you want 'relates to ' for example 
       And for the condition make the fied issue type equal A
       Then in the action add value  A for the field linked to type  
After that you can use a JQL to filter 

And if you're open to other solutions you can use app to create linked issue based on types or either projects and one of these apps is Enhanced Links for Jira 


Add JQL-20250325-094619 (1).png

Suggest an answer

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

Atlassian Community Events