Hi,
I'm lookig for a script/ a way to share all jira filters with "all logged users" at once.
I have around 3k filters and need to change permissions for all of them, anyone can help with that?
Best Regards
Joanna
List of User Logins/Logouts from Audit
This groovy script creates an xml output of the audit log filtered by the User Access category, so dates of when users logged in or logged out.
script:
Hi Dinesh,
It's not what I"m looking for I'm afraid,
I need to change permissions for all my filters, and what to do this with script if it's possible.
Joanna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Joanna,
Try this script in script runner plugin and if possible send the screenshot of your requirement where you should change the permissions of all your filters.
Dinesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This script does not work at all, please see screen shot, but as I said before it's not what I'm looking for (This groovy script creates an xml output of the audit log filtered by the User Access category, so dates of when users logged in or logged out)
What I need is:
I have over 2k shared filters - shared with some groups, projects, public etc. I
need to change Shared With parametr all of my filters to "Shared with all logged users". All users in my company need to be able to see all filters,
Doing this one by one will take ages, so I'm looking for a script or maybe database change will do the job.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Script to change permissions
import com.atlassian.jira.bc.JiraServiceContextImpl import com.atlassian.jira.bc.filter.SearchRequestService import com.atlassian.jira.bc.issue.search.SearchService import com.atlassian.jira.component.ComponentAccessor // import com.atlassian.jira.issue.search.SearchRequest import com.atlassian.jira.sharing.SharePermissionImpl import com.atlassian.jira.sharing.SharedEntity import com.atlassian.jira.sharing.type.ShareType import com.atlassian.jira.issue.search.SearchRequestManager import com.atlassian.jira.issue.search.SearchRequest def searchRequestService = ComponentAccessor.getComponent(SearchRequestService) def user = ComponentAccessor.jiraAuthenticationContext?.getLoggedInUser() def searchService = ComponentAccessor.getComponent(SearchService) def serviceContext = new JiraServiceContextImpl(user) long filterId = ------ def searchRequestManager = ComponentAccessor.getComponent(SearchRequestManager) def ab = searchRequestManager.getSearchRequestById(filterId) def sharePerm = new SharePermissionImpl(null, ShareType.Name.GLOBAL, null, null) ab.setPermissions(new SharedEntity.SharePermissions([sharePerm] as Set))
Try this and do some changes according to your requirement.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.