Forums

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

Need Help with JQL Query

PLaksh11
Contributor
September 3, 2024

 

We have a Multiple issue types and links are there between each issue types.

Issue types: Bug->Root Cause->CRB/Replacement->Maintenance

Bug issue type will linked with Root cause, Root cause will be linked with Either CRB or Replacement, CRB or Replacement will be linked with Maintenance.

Example: Bug is linked as "is caused by" to Root cause then Root cause "is fixed by" to CRB/Replacement, CRB/Replacement "is implemented by" to Maintenance.

Now i need JQL which gives Bug issue type which have link till Maintenance issue type.

Bug->Root Cause->CRB/Replacement->Maintenance

We are using Script runner Enhanced Search.

3 answers

0 votes
Shivam Sharma
Community Champion
December 16, 2024

Hi @PLaksh11 

The use case that you've shared is encountered by me & my teammates as well. 

The chain you’ve described—Bug → Root Cause → CRB/Replacement → Maintenance—is a common issue linkage. You’re trying to use JQL to track linked issues across different types and stages in your workflow. That’s pretty cool! 

I’ve been looking into a solution that might help with this. It’s called Report X - Multilevel Traceability Report, and it’s made to work with linked issues and hierarchical workflows.

This tool makes it easier to work with linked issues and hierarchical workflows by letting you query across multiple levels (like Bug → Root Cause → CRB/Replacement → Maintenance). It also shows you clear visualizations of issue relationships and gives you reports to analyze dependencies—all without needing complicated JQL.

1. 1.png

2. 2.png

3.3.png

4. 4.png

I thought you might find this tool helpful in solving your problem. Let me know if this resonates with what you’re looking for or if you’d like me to share more details! 😊

0 votes
Kishan Sharma
Community Champion
September 10, 2024

Hi @PLaksh11 

To create a JQL query that finds all Bug issue types linked through a chain of Root Cause -> Replacement -> Maintenance, you can use ScriptRunner's Enhanced Search functions like issueFunction in linkedIssuesOf to recursively traverse issue links.

You can use below JQL in ScriptRunner Enhanced Search, to identify Bugs, which has linked issues.

issueFunction in linkedIssuesOf("issueType = 'Root Cause' OR issueType = 'Replacement' OR issuetype = 'Maintenance'", "is caused by")

In my example, I have a Bug which is linked to a Root Cause

Bug.png

When I run the earlier shared JQL in ScriptRunner Enhanced Search, I get below output -

bug-advanced-search.png

 

You can save such filter and use it to find related Issue Types.

For example, below query finds all Replacement issues that are linked to Root Cause issues, using the link type "fixes".

issueFunction in linkedIssuesOf("filter = causes", "fixes") AND (issueType = 'Replacement')

replacement1.jpg

 

Below query will retrieve all Maintenance issues linked to Replacement issues using the link type "implements".

issueFunction in linkedIssuesOf("filter = replacement", "implements") AND issueType = Maintenance

maintenance.jpg

Hope this helps.

 

0 votes
Ekaterina Smykova
Contributor
September 6, 2024

Hello,

Have you considered to use Plans? It contains Dependency report with visualisation.

https://support.atlassian.com/jira-software-cloud/docs/what-is-the-dependencies-report-in-advanced-roadmaps/

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