Search code examples
jirajqljira-filter

JQL for Finding Open Issues having Linked Issues in status "Done"


I am having an issue named "TEST-5547" which is linked with a development ticket named "DEVP-8978".

Here the development ticket (DEVP-8978) is in status="Done". but the main issue "TEST-5547" is in status= "In Progress" which I want to transition to status="Done"

I have many tickets like "TEST-5547" which I want to close via Bulk Change.

Please Help with the JQL Filter query which should I use to find these types of tickets whose linked issues are in "DONE".

I am searching for this a while now but haven't found the solution. Guys, please help me!!!!

Thank You for trying :)


Solution

  • As it was mentioned in the other reply, the full solution to your question requires a Scriptrunner for Jira add-on. It is not free, but it is powerful and very useful extension which may be worth having. The query would be something like this:

    Project = DEVP AND status = "In Progress" AND issueFunction in linkedIssuesOf("status = Done", "relates to")
    

    Alternatively, there is not fully automated but free solution:

    Starting with Jira Server 8, Jira now has the native functionality for searching by link types. It may be helpful to find all issues that are "In Progress" and that have links to other issues of the needed type (for example "relates to"). The query would be:

    Project = DEVP AND issueLinkType in ("relates to") AND status = "In Progress"
    

    You can also add "Linked issues" field that would add "Links" column to your issue navigator. It would display the linked issues. Now, if it wasn't changed in your Jira configuration, the issues that are in "Done" status should be treated by Jira as resolved (and should be indicated as stroked through). So after you run the query and start Bulk Change, you'll only have to manually pick all the issues that have stroked through issues in links column.

    enter image description here