jiraatlassian-sourcetreejqlatlassian-plugin-sdk

JQL search: figure out list of distinct projects for a given text search


I am doing a search in Jira and I would like to know the names of the projects satisfying my JQL search. I am performing the following search: enter image description here

The problem is that there are hundreds of issues that satisfy this text search belonging to the same project so I need to scroll through the thousands of issues till I find the other projects satisfying this text search. Is there a simpler way to return the list of projects satisfying this query withtout needing to scroll through thousands of projects?


Solution

  • You can try to execute the JQL many times. And each time, you get the name of the project for the first issue visible in the list. You note the name somewhere, and you run again the JQL with adding this name in the list of project that should not match it. You should repeat this action until your JQL will return an empty list.

    Example :
    Execute 1 :
    JQL : text ~ jacada
    First issue project name in the list : IT Project
    Execute 2 :
    JQL : text ~ jacada and project != "IT Project"
    First issue project name in the list : HR Project
    Execute 3 :
    JQL : text ~ jacada and (project != "IT Project" and project != "HR Project")
    First issue project name in the list : Kanban project
    .
    .
    .
    Execute n :
    JQL : text ~ jacada and (project != "IT Project" and project != "HR Project" and project != "Kanban project" and ...)
    First issue project name in the list : (empty list)