Is it possible to script changing shared filters "Shared with" field?

Rich Wilkins January 19, 2018

Jira 7.2.2 eliminated the functionality of shares (dashboards, filters) to be accessed by public/anonymous users if your instance is not public. I have numerous filters that have the "Shared with" field populated with "Shared with public" that I would like to change to "Shared with logged-in users" as a bulk. Anything "Shared with public" is moved to "Shared with logged-in users". Is this possible?

2 answers

1 accepted

1 vote
Answer accepted
Rich Wilkins January 25, 2018

Pretty sure this is the solution:

1. Run the following query: 
     update SHAREPERMISSIONS 
     SET SHARETYPE = 'loggedin' 
     WHERE SHARETYPE = 'global' AND entitytype = 'SearchRequest' 

2. Run the following query: 
     update SHAREPERMISSIONS 
     SET SHARETYPE = 'loggedin' 
     WHERE SHARETYPE = 'global' AND entitytype = 'PortalPage' 

3.Restart JIRA 

4. Perform indexing

ref: https://jira.atlassian.com/browse/JRASERVER-23255

somethingblue
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 25, 2018

Hi Rich,

Thank you for posting that solution here.

Cheers,

Branden

Rich Wilkins January 25, 2018

My pleasure!

John January 26, 2018

As in run that query against the database?

May I ask which database you are using? and if this worked successfully?

I'm a little hesitant to run a query against a database without knowing the impacts.

Rich Wilkins July 13, 2018

Hi John,

Yes. Run it against your database using a tool like SQL Developer. I used that tool to run the SQL statements against our Oracle DB and it worked perfectly.

If you are uncomfortable running these, please seek a DB Admin in your organization to review them. Also, check out the ref link where I identified the solution.

Hesitation to run a SQL statement against your DB without understanding what its doing is a good thing. :)

0 votes
somethingblue
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 25, 2018

.

Suggest an answer

Log in or Sign up to answer