Forums

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

I want to create a custom query to pull defects which are Issuelinked to "Is related to"

Bhasker chary October 23, 2018

I want to create a custom query to pull defects which are Issuelinked to "Is related to"

Please help me

 

I am trying this but I am not getting the search,

project = FSR AND issuetype in (Defect, Bug) and issue in linkedIssues("issuekey, is related to"),

 

2 answers

1 accepted

0 votes
Answer accepted
Bhasker chary October 25, 2018

Solution:

project = FSR AND issuetype in (Bug, Defect) AND issueFunction in hasLinks("is related to")

2 votes
Alexey Matveev
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.
October 23, 2018

Hello,

if you want to use the out of the box JQL, then you should use the linkedIssue function. The problem is that you need to provide an issue key as the first parameter, that is why it is not that much flexible.

If you want to have a more flexible solution, you would need an add-on. For example, you could use the Power Scripts add-on:

https://marketplace.atlassian.com/apps/43318/power-scripts-jira-script-automation?hosting=cloud&tab=overview

With this add-on you could write a JQL query like this:

key in hasLinksOfType("project = fsr", "is related to") and project = FSR AND issuetype in (Defect, Bug) 
Bhasker chary October 23, 2018

Thanks for the details, Is there any way to write a query within JQL?

If yes, please provide the details.

Alexey Matveev
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.
October 23, 2018

What do you mean to write a query within JQL?

Bhasker chary October 23, 2018

Yes.

Alexey Matveev
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.
October 23, 2018

I do not understand what you mean by "write a query with JQL"? If you mean to write an inner query like in SQL, then it is not possible. For example,

select (select fielda from table2 b where b.id = a.id) from table1 a 

It is not possible in JQL

Bhasker chary October 25, 2018

Thanks, I found the answer and I am to pull the require data

project = FSR AND issuetype in (Bug, Defect) AND issueFunction in hasLinks("is related to")

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events