Forums

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

Need Help with JQL Query

PLaksh11
Contributor
August 26, 2024

We have 3 issue types

1.Bug

2. Root cause

3. Non Software

Root cause issue type will be linked with Both (Bug and Non Software) or (Bug or Non software) 

Bug and Non software both has same issuelinktype "Causes" with Root cause.

Now i want JQL which gives Root cause ticket which linked with "Bug" only.

I tried below JQL but its giving both BUG and Non software which are linked with Root cause.

 

project = "Newhw" AND type = "Root cause" and issueLinkType="causes"

Is there any JQL which gives linked issue based on issuetype?

3 answers

1 accepted

2 votes
Answer accepted
Trudy Claspill
Community Champion
August 26, 2024

Hello @PLaksh11 

That is not possible if you have only native Jira JQL functionality available to you.

It is possible with third party apps. Are you willing to consider getting an app that extends the capabilities of JQL? 

Prem
Contributor
August 27, 2024

Hi @Trudy Claspill ,

 

Thanks for the clarification. But then it can be filtered out via issuetype != "Non Software"

Correct JQL - Project = "Newhw" AND issuetype = "Root Cause" And issueLinkType = "causes" AND issuetype != "Non Software"

PLaksh11
Contributor
August 27, 2024

Hi @Prem 

The Above Query is not working as per expectation. It still shows the Root cause ticket which has Non software.

Hi @Trudy Claspill 

we are using Script runner enhanced Search is it possible to get through it?

Like Prem likes this
Prem
Contributor
August 27, 2024

Hi @PLaksh11 

Can you share a screenshot of the query result, if possible?

Trudy Claspill
Community Champion
August 27, 2024

@Prem 

No your modified query also does not work.

The criteria

issuetype="Root Cause" 

...tells Jira you want only issues of type "Root Cause" in the results.

The criteria

and issuetype != "Non Software"

is not applied to the linked issues, which is what @PLaksh11 is asking for.

Like Prem likes this
Trudy Claspill
Community Champion
August 27, 2024

@PLaksh11 

Yes, you can get what you want with ScriptRunner using the linkedIssuesOf() function.

https://docs.adaptavist.com/sr4jc/latest/features/scriptrunner-enhanced-search/jql-functions#linkedissuesof

project = "Newhw" AND type = "Root cause" and

issueFunction in linkedIssuesOf("project='Newhw' and issuetype='Bug' and issueLinkType='is caused by' ") and

not issueFunction in linkedIssuesOf("project='Newhw' and issuetype='Non Software' and issueLinkType='is caused by' ")

The first part says you want Root Cause issues.

The second part says you want only Root Cause issues that are part of the set of issues that are linked to Bug issues with the relationship 'Bug is caused by Root Cause'.

The third part says you want to exclude Root Cause issues that are part of the set of issues that are linked to Non Software issues with the relationship 'Non Software is caused by Root Cause'.

 

Like Reece Smith likes this
Prem
Contributor
August 27, 2024

@Trudy Claspill - Thank you so much for corrections.

0 votes
Hannes Obweger - JXL for Jira
Atlassian Partner
August 29, 2024

Hi @PLaksh11

if you're open to solutions from the Atlassian Marketplace, your use case should be easy to solve using the app that my team and I are working on, JXL for Jira.

JXL is a full-fledged spreadsheet/table view for your issues that allows viewing, inline-editing, sorting, and filtering by all your issue fields, much like you’d do in e.g. Excel or Google Sheets. It also comes with a number of so-called smart columns that aren’t natively available, including the linked issue types. You can easily filter your issues by these smart columns, like so:

linked-issue-type-filtering.gif

Once you've narrowed down your list of issues, you can work on your issues directly in JXL, trigger various operations in Jira, or export your issues with just one click.

I should add that JXL can do much more than that: From support for configurable issue hierarchies, to issue grouping by any issue field(s), sum-ups, or conditional formatting.

Any questions just let me know,

Best,

Hannes

0 votes
Prem
Contributor
August 27, 2024

Hi @PLaksh11 

 

As far as I am understanding your query. This is what you should try.

JQL -
Project = "Newhw" AND issuetype = "Route Cause" AND issueLinkType = "causes" AND issuetype != "Non Software"

Trudy Claspill
Community Champion
August 27, 2024

Hello @Prem 

Your answer is not correct.

@PLaksh11 asked to get a list of only the Root Cause issues that are linked to only Bug issues. Your JQL will provide Root Cause issues linked to any type of issue with the "causes" link.

Like Prem likes this
Prem
Contributor
August 27, 2024

Thanks @Trudy Claspill  Have made the necessary corrections.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events