As an admin I have created a filter seacrh querry and saved them
And I give permission to everyone
I logged as a user the filter created by admin should be added manualy to the user favorite filter
I don t want each time and admin create a filter to ask the user to add the filter , I want this operation to be automaticly
How to add automaticly in the favorit filter ?
thanks
for more info check this link :
https://jira.atlassian.com/browse/JRA-15841?from=sac_createissue
solved here by Jamie Echlin
https://answers.atlassian.com/questions/4687/request-working-script-to-favorite-issue-on-behalf-of-all-users
You can't. Favourite filters are a personal thing, not for an admin to set.
There is a big weakness in Jira's filter management. As designed, it's great, until a user leaves, at which point, the lack of "admin can change other people's filters" becomes a bit of a nightmare. There's a general catch-all improvement for admin managing filters at https://jira.atlassian.com/browse/JRA-9997
However, that's not quite what you asked. What you've asked for is a common question, that has two basic answers.
You are far better off defining the filters as shared, then adding them to a dashboard gadget on the system default dashboard, so they all see it and maybe add some text saying "click the star if you find any of these filters useful". In other words, stop trying to second-guess how your users will want to do things (because they won't use it the way you think) and give them pointers and advice instead of forcing things on them. Trust me - I implemented a simple database push to do exactly this once, and pulled it after I got over 100 calls saying "stop messing with my filter list"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But you can t tell 200 users: add this to your favorite list
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, and you don't want to either - the point is, they don't want you to. You can advise them to do it, which leaves the choice with them, but inflicting your opinion on them is absolutely the wrong thing to do. For new users, I'd be tempted to have "default favourites" if the functionality existed, but not push to existing users
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I downloaded dashboard distribution plugin. I tried but it s not scanning through my filters periodically
what do you suggest?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Problem with dashboard distro plugin is I think it read it shares absolutely everything, which is not what everyone wants.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"You are far better off defining the filters as shared, then adding them to a dashboard gadget on the system default dashboard" I think this would be a great way to introduce new users to helpful filters whilst allowing them to choose their own favourites long term. Can someone help me with how to actually do this? The favourite filters gadget presents exactly what I want, but this will only show a list of filters after the users have added them as favourites. I want to show a base list of filters on the default dashboard to get people going without users having to know how to find and favourite them... Any ideas?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use Bulk Favorite plugin https://marketplace.atlassian.com/plugins/ru.bia.jira.BatchFavoritesMaker/server/overview
There is an option to set preselected dashboards and filters for user group, and users will get it when they will log in into your JIRA instance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
An updated script for setting dashboards as favourites
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.favourites.FavouritesManager
import com.atlassian.jira.user.util.UserManager
import com.atlassian.jira.security.groups.GroupManager
import com.atlassian.crowd.embedded.api.Group
import com.atlassian.jira.favourites.FavouritesManager
import com.atlassian.jira.portal.PortalPage
import com.atlassian.jira.portal.PortalPageManager
import com.atlassian.jira.user.ApplicationUser
Long dashboardId = 11000
String group1 = "jira-software-users"
Collection<String> shareWith = new ArrayList()
shareWith.add(group1)
ApplicationUser user
FavouritesManager favouritesManager = ComponentAccessor.getComponentOfType(FavouritesManager.class);
GroupManager groupManager = ComponentAccessor.getGroupManager()
PortalPageManager portalPageManager = ComponentAccessor.getComponentOfType(PortalPageManager.class);
PortalPage portalPage = portalPageManager.getPortalPageById(dashboardId)
UserManager userManager = ComponentAccessor.getUserManager()
for (String groupName in shareWith) {
log.info(groupName)
Group group = groupManager.getGroup(groupName)
for (String userId in groupManager.getUserNamesInGroup(group)) {
log.info("id: " + userId)
user = userManager.getUserByKey(userId)
log.info("user: "+ user)
if (user != null) {
log.info("Add " + portalPage.getName() + " to user favourites for " + user.getDisplayName())
favouritesManager.addFavourite(user, portalPage)
}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If anyone's interested ...
We use JIRA V6.2.7, so we can not use Bulk Favorite plugin because it starts at V6.4
Groovy Script running in the Script Runner
import
com.atlassian.jira.ComponentManager
import
com.atlassian.jira.favourites.FavouritesManager
import
com.atlassian.jira.issue.search.SearchRequest
import
com.atlassian.jira.issue.search.SearchRequestManager
import
com.atlassian.jira.component.ComponentAccessor
// Set the filter ID and group to share with here
Long searchRequestId =
99999
String shareWith =
"jira_users"
ComponentManager componentManager = ComponentManager.getInstance()
FavouritesManager favouritesManager = (FavouritesManager) componentManager.getComponentInstanceOfType(FavouritesManager.
class
)
SearchRequestManager searchRequestManager = componentManager.getSearchRequestManager()
SearchRequest searchRequest = searchRequestManager.getSharedEntity(searchRequestId)
ComponentAccessor.getGroupManager().getUsersInGroup(shareWith).
each
{
favouritesManager.addFavourite(it, searchRequest)
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Earlier versions of groovy such as the 1.5 versions do not contain the script engine, so won't be "discovered" by this version of the plugin
this is mentioned here https://studio.plugins.atlassian.com/wiki/display/GRV/Script+Runner#ScriptRunner-Installation
is it the problem if so how can I solve it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But you are not using a 1.5 version!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
it's saying 10151 does not exist. Can you paste here the url of the dashboard
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am pasting this url :
http://192.168.0.84:8080/secure/ManageFilters.jspa
if it is not the right one can you please tell me how to retrieve the url?
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The script provided in the earlier comment seems to be provided for use with dashboards and not for issue filters. I believe this can be done with little modifications in the script
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You could expand on the Groovy script shown here and push out a filter to users. I agree with Nic that force-feeding a filter to users isn't always the best approach, but I also have seen that our users don't notice the instructions I put on the System Dashboard to help them find and favorite some of our more popular shared dashboards and filters. :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please find my screenshot you can see that only filter with star are showing
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The plugin betsy is referring to is the script runner. To share with everyone you share with "jira-users" or whatever group(s) you have given the USE permission to.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi BetsyW,
1) I am trying to add the pluggin but there are 4 pluggns wich one to add?
2) in the script there is :
String shareWith = "some group"
I want to share with everyone
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am getting this error :Could not find a handler capable of installing the plugin at C:\Program Files\Atlassian\JIRA 4.3.4\atlassian-jira\WEB-INF\lib\groovy-all-1.7.10.jar. Check that the file is a valid plugin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's a plugins 1 plugin... read the docs. You need to use the old school method of copying both jars to web-inf/lib
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I followed your steps I can only see below Options & settings:
There is no Groovy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
After running this script using Script Runner:
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.favourites.FavouritesManager
import com.atlassian.jira.portal.PortalPage
import com.atlassian.jira.portal.PortalPageManager
import com.opensymphony.user.UserManager
// Set the portal page ID and group to share with here
Long portalPageId = 10151
String shareWith = "jira-users"
ComponentManager componentManager = ComponentManager.getInstance()
FavouritesManager favouritesManager = (FavouritesManager) componentManager.getComponentInstanceOfType(FavouritesManager.class)
PortalPageManager portalPageManager = (PortalPageManager) componentManager.getComponentInstanceOfType(PortalPageManager.class)
PortalPage portalPage = portalPageManager.getPortalPageById(portalPageId)
UserManager userManager = UserManager.getInstance()
for (String userId in userManager.getGroup(shareWith).getUsers()) {
favouritesManager.addFavourite(userManager.getUser(userId), portalPage)
}
I am getting this error :
Result: |
javax.script.ScriptException: com.atlassian.jira.util.dbc.Assertions$NullArgumentException: entity should not be null!
and this is the trace:
|
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@BetsyW
"You could expand on the Groovy script shown here and push out a filter to users. ...."
I used the script but it didn t push anything still user has to add manually
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.