how can I make a filter a favorite for all of my Jira users?

All of my users (especially outside development) want access to my shared filters for a release, but they are either too lazy or too inexperienced to do it themselves.

Is there a way as an administrator that I can make a shared filter a favorite for specific or all users?

3 answers

For cloud - I don't think so, for JIRA server - you can use a groovy script to do that.

Here's a sample which adds all visible filters as favorites for the current user:

import com.atlassian.jira.favourites.FavouritesManager;
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.issue.search.SearchRequestManager;
import com.atlassian.jira.util.Visitor;
import com.atlassian.jira.issue.search.SearchRequestEntity;
import com.atlassian.jira.exception.PermissionException;
def fm = ComponentAccessor.getComponent(FavouritesManager.class)
def srm = ComponentAccessor.getComponent(SearchRequestManager.class)
def user = ComponentAccessor.getJiraAuthenticationContext().getUser()
srm.visitAll(new Visitor<SearchRequestEntity>(){
  void  visit(SearchRequestEntity sr) {
      try {
      	fm.addFavourite(user, srm.getSearchRequestById(sr.id));
      } catch (PermissionException e) {
        //ignore  
      }
  }
    
})

Thanks, but we're not moving from Cloud any time soon.  This issue is really hurting the uptake of JIRA here.  Basically there are only 4 of us using it and I don't see the others budging until I can set things up for each of them.  If Cloud doesn't support an administrator setting up management and non-development access, then IMHO it's not really ready for prime time.  I like to use tools that make my job easier, not harder.

For what purpose do they require that filter as being favorite?

Hm, I see I hit that button too fast. It's for a release. What are non-developers looking at exactly? Progress? Do they really need to see that in a filter search result, or maybe you could share something via a dashboard, or link result to a confluence page, or ...

 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,752 views 18 21
Read article

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