Is there any way to search across quick filters in Jira?

Tester- Amy March 19, 2023

The same quick filter has been setup under numerous boards in a Jira Server installation and I need to alter the quick filter. Is there a way I can find all instances of the quick filter without having to open hundreds of boards?

2 answers

2 accepted

2 votes
Answer accepted
David Bakkers
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.
March 19, 2023

Hello @Tester- Amy 

Not easily. Each quick filter is specific to the board it is on. Altering one on a board will have no effect on the others on the other boards.

You can use the REST API to search for all the quick filters across all the boards and change them, but you will need a programmer to help you achieve that.

0 votes
Answer accepted
habib rahman
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.
March 19, 2023

Hi @Tester- Amy My name is Habib. I will do my best to help you with your request.


Yes, there is a way to find all instances of a quick filter set up under numerous boards in a Jira Server installation without having to open each board one by one. You can use the Jira REST API to retrieve all the boards that contain the quick filter and then update the quick filter for each board using the API.

Here are the steps to do this:

 

1. First, you need to find the ID of the quick filter you want to update. You can do this by opening the board that contains the quick filter and inspecting the URL. The ID will be in the URL after the "quickFilter=" parameter.
2. Next, you can use the Jira REST API to retrieve a list of all boards that contain the quick filter. You can use the following API endpoint:
    ```

    GET /rest/agile/1.0/board?type=scrum&filter=quickFilter=<quick_filter_id>

    ```
    Replace `<quick_filter_id>` with the ID you found in step 1. This API endpoint will return a JSON object with an array of boards that contain the quick filter.
3. Loop through the array of boards returned by the API and update the quick filter for each board. You can use the following API endpoint to update the quick filter for a board:
    ```

    PUT /rest/agile/1.0/board/<board_id>/filter/<quick_filter_id>

    ```
    Replace `<board_id>` with the ID of the board you want to update and `<quick_filter_id>` with the ID of the quick filter you want to set for the board.
You can set  the new quick filter by passing a JSON object in the request body with the following format:
    ```

    {

        "id": "<quick_filter_id>",

        "name": "<quick_filter_name>",

        "jql": "<new_jql>"

    }

    ```
    Replace `<quick_filter_name>` with the name you want to give to the quick filter and `<new_jql>` with the new JQL query for the quick filter.
4. Repeat step 3 for each board returned by the API.

By following these steps, you can update the quick filter for all boards that contain it without having to open each board one by one.
I hope this helps you. If you are happy with the answer, please accept it so it can help others having the same issues.
Thank you 
Habib Rahman
David Bakkers
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.
March 19, 2023

Hello @habib rahman 

There is a serious flaw in your solution.

Where you said... "Replace `<quick_filter_id>` with the ID you found in step 1. This API endpoint will return a JSON object with an array of boards that contain the quick filter." this is not correct. The IDs of quick filters are unique per board, you cannot re-used the ID of a quick filter on one board to find 'the same filter' on another board.

Even if the IDs of the two quick filters were by some miracle identical across the two boards, the chances that they contained the same JQL would be so astronomically high as to be impossible.

The OP is looking for some mechanism to find IDENTICAL quick filters across all boards, so you solution will not work in this instance. The correct solution would be:

  1. Getting all the boards on a project
  2. Getting all the quick filters on each board
  3. Comparing the JQL content of every single quick filter to find a match for the offending content
  4. Changing the JQL content to the preferred state
  5. Repeating this for every single project.
Like habib rahman likes this
habib rahman
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.
March 19, 2023

Hi @David Bakkers 

Thank you for bringing this to my attention. You are correct that the ID of a quick filter is unique per board, and my previous solution would not work to find identical quick filters across all boards. Your suggested solution of getting all the boards on a project, getting all the quick filters on each board, and comparing the JQL content of every single quick filter to find a match for the offending content is a valid approach to solving the problem. Thank you for providing a more accurate solution.

Thank you 🙏🏻 

Like David Bakkers likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events