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?
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.
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.
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.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...
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!
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