Forums

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

How Can I find all the broken filters and their owners?

Etai Leers
Contributor
July 5, 2023

I got more then 800 filters in my cloud instance.

I want to get a list of all the broken filters and also the filter name, id and owner.

I tried using python with rest API:
https://XXXX.atlassian.net/rest/api/3/filter/{filter_id}

 
but I only got my filters even though I'm a site admin.
How can I get the required list?

2 answers

1 accepted

1 vote
Answer accepted
Evgenii
Community Champion
July 5, 2023

Hi, @Etai Leers 

You can try to use another method:

/rest/api/3/filter/search

It has experimental feature overrideSharePermissions, to show all filters.

You can read about it here:

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

Evgenii
Community Champion
July 6, 2023

Hi, @Etai Leers 

Look at parameter overrideSharePermissions

If you set it true in query, I suggest that it will give you all filters.

image.png

Etai Leers
Contributor
July 6, 2023

Thanks @Evgenii  that's great !
I got all the filters in my cloud instance.

One more question - is there a way to know which filter is broken ?
broken means syntax error and hence no results retrieved. 

Evgenii
Community Champion
July 6, 2023

It's an interesting question...

Maybe variant, with pulling each filter, and watching at result, will help.

I found one tricky way, it's weird solution but it can help. 

You'll have to pull all filters, and then, make requests to get info on them:

In response, take string "searchUrl": "https://your-domain.atlassian.net/rest/api/3/search?jql=type%20%3D%20Bug%20and%20resolutino%20is%20empty",

And then try GET request with this URL. If it returns error - bingo, you found bad filter.

0 votes
Etai Leers
Contributor
July 6, 2023

Thanks @Evgenii  but I get only the filters that match the following conditions: 

  • filters owned by the user.
  • filters shared with a group that the user is a member of.
  • filters shared with a private project that the user has Browse projects project permission for.
  • filters shared with a public project.
  • filters shared with the public.

As a site admin I need to get all the filters in our Jira software, so I will be able to help fixing the broken ones.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events