Forums

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

Build custom count query to find the LinkedIssueType=Causes AND issuetype=Fault..

Laxman Magar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 20, 2025

I need a query for Build custom count to get the count of the tickets which are linked with type "Causes" and are only of issueType = Fault.. I am interested to count only fault tickets linked as causes to the ticket... 

can you please provide the query? is it supported in JIRA?

3 answers

4 votes
Lukas Ortner
Contributor
August 20, 2025
issueLinkType in ("created by", "Defect") and issuetype = Bug

where

Defect = Name of Link Type
created by = Inward Description (alternatively outward)
You can find these in Jira Admin Settings under "Work item features" -> "Work item linking"

 

Best,

Lukas

Laxman Magar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 20, 2025

Thanks Lucas.. I will try

2 votes
Sushant Verma
Community Champion
August 20, 2025

Hi @Laxman Magar 

Welcome to the community!

Jira’s native JQL does not support filtering by link type directly. To achieve this, you’ll need ScriptRunner and then you can use.

issueFunction in linkedIssuesOf("issueType = Fault", "Causes")

Regards,
Sushant Verma

Laxman Magar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 20, 2025

Thanks Sushant.. will this support in build costom count? I tried and results are 0 count which is not correct... can you please check below and suggest

Screenshot 2025-08-20 134504.png

Sushant Verma
Community Champion
August 20, 2025

@Laxman Magar  I think Build Custom Count feature in Jira only supports native JQL. ScriptRunner’s advanced JQL functions are only supported in:

  • ScriptRunner Enhanced Search
  • Scripted Fields
  • Scripted Dashboard Gadgets
  • ScriptRunner REST API scripts

Regards,
Sushant Verma

Laxman Magar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 20, 2025

Tried both but it is still not working.. I think function you mentioned in not available in my JIRA, check the following error message  -

JQL error  Field 'issuefunction' does not exist or you do not have permission to view it.
0 votes
Cristiano Alves -Appfire-
Contributor
August 20, 2025

hello @Laxman Magar 

 

I'm Cristiano, with the Appfire team here.

This is not possible directly with native jira.
If you're open to using third part apps, the software our team works on, JQL Search Extension for Jira will easily help you with that.

With the following query:

issue in linkedIssuesOfQuery("type=Fault", "Causes")

You're also able to save this query as a filter and use it outside the app.

If you need any help setting this up, feel free to contact our support team.

Regards,

Suggest an answer

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

Atlassian Community Events