how to find filters that are connected to a project?

stephan.lewis September 20, 2023

Is there a way to query which filters are calling out a specific project?

1 answer

0 votes
Bill Sheboy
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.
September 20, 2023

Hi @stephan.lewis 

What do you mean by "connected to a project"?

If you mean shared with the project, you could use this REST API function and filter by projectId:

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-filters/#api-rest-api-3-filter-search-get

If you mean the JQL for the filter references the project, I believe would need to remove the filter, add expand=jql, repeatedly run the function to page through the results, and search for the project name in the  JQL.

Kind regards,
Bill

stephan.lewis September 20, 2023

not sure what you mean by "remove the filter, and expand=jql"

The REST API seems like it will do what I want - but I've never done this, How do I get started? 

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 20, 2023

In the API @Bill Sheboy mentioned you can provide as an input parameter the ID or name of a specific filter and retrieve that one filter.

Alternately you can opt to not provide those inputs and instead add the parameter expand=jql to get all filters and include the JQL of each filter in the output. You may have to run the API command multiple times depending on the total number of filters in your system.

You would need to collect the output of all those executions and they yourself execute a search against that output to look for the project of interest within the JQL statements contained in the output.

One easy way to run the REST APIs is:

1. login to your Jira instance.

2. Open a new browser tab.

3. Take the base URL for your Jira instance (i.e. https://yourCo.atlassian.net), append the REST API endpoint (i.e. /rest/api/3/filter/search) and then append the parameters you want to use, and put that all in the URL field of the new browser tab.

Like Bill Sheboy likes this
Stephan Lewis September 21, 2023

Sounds good - but I'm having problems with appending the parameters

https://yourCo.atlassian.net/rest/api/3/filter/search

I want to search for the project MARO

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 21, 2023

If you want to follow Bill's suggestion you need to use this URL in a browser tab:

https://<your jira URL>/rest/api/3/filter/search?expand=jql

Note that you need to replace <your jira URL> with the actual base URL for your Jira instance.

You will get output similar to the following - a list of the filters on your instance including the JQL for each filter. Notice the JQL underlined in red:

Screenshot 2023-09-21 at 10.10.42 AM.png

 

You will have to search that output for the text of your project key or project name contained in the JQL statements.

Note that if you have a lot of filters the API will paginate the data. That means the first execution will return only the first "page" of results. Notice the sixth line in the output that says "total": 67 and the third line that says "maxResults": 50. That tells you that there are a total of 67 filters on the system and only the first 50 have been returned.

Stephan Lewis September 21, 2023

I tried your suggestion - but I have over 1700 filters for my Jira instance.

That's whyI was trying to find a way to search the filters to contain a specific Project name.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 21, 2023

I just stumbled across this free app that might help you.

Super Search for Jira 

They say you can search for other entities, like filters, but their documentation doesn't go into detail about what you use for search criteria.

It has only 3 installs documented, and they have not provided any Privacy or Security information on their Marketplace listing, but have a Privacy Policy in their documentation.

I am not endorsing the app. You would be using it at your own risk.

 

There may be other apps available in the Markeplace that provide similar functionality, or that would enable you to export all your filters at once.

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