Jira SQL query that returns all filters that are shared

I am looking for a Jira SQL query that returns all filters that are shared with other users (that are not private).

4 answers

1 accepted

This widget could not be displayed.
SELECT sp.entityid, sp.sharetype, sp.PARAM1, s.filtername, s.authorname, s.DESCRIPTION FROM searchrequest s LEFT JOIN sharepermissions sp ON sp.entityid = s.ID WHERE sp.entitytype = "SearchRequest" AND sp.sharetype != "global"

Sorry to bring up this old one again, but I was looking for the exact opposite of this ;)

Thanks Scott. This is exactly what I want. Norman you are right it is easy when you know where to find information what you yre looking for, but if you can only copy, paste and run it is more easier :-D. Thank you both guys.

Petr, I hope you will take some time to learn alittle SQL. It is a very important skill to have to understanding the various systems you might work with now and in the future. Copying code without a minimal understanding can be very dangerous to projects.

This widget could not be displayed.

There is a table called sharepermissions. It contains a row for each shared filter rule.

The entitytype field will have value 'SearchRequest'

The sharetype field will have values of global, project or group.

The entityid field contains the id of the searchrequest table.

The filename in the searchrequest table is the name of the filter.

There are no rows in the sharepermissions table if filters are private.

If you really need me to create the sql query, let me know. This is a simple query once you understand the table structure.

This widget could not be displayed.

Hi,

Any one have idea about sql Query to fetch the project name in shared filters

ie if filter name is fdpio which consists project =xyz

i would like to get the filters with particular value xyz

This widget could not be displayed.

Try this query:

select count(*) from searchrequest where reqcontent LIKE '%project = xyz%'

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

155 views 2 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you