Migrate JIRA filters and dashboards

Is there any way to migrate filters and dashboards of JIRA from one instance to other?

 

6 answers

Are you migrating just the filters and dashboards or you also plan to move the projects and issues that are used by these dashboards and filters ?

Actually we are using JIRA 6.4 version and planning to merge two JIRA instances. We cannot use full system restore as it will wipe out the contents on target instance hence we are planning to migrate projects and issues using Project Import. The problem with this approach is it will not import filters and dashboards  so I am looking for options to migrate filters and dashboards separately.

You will probably face a lot more problems during the merge than you initially expected:

  • Merging agile boards
  • JIRA Project Import breaks the issue history, so Agile reports will be broken after the merge
  • Filters that refer to object by id i.e. custom fields will be broken
  • Dashboard gadgets usually refer to filters, projects and other by id, so you'll also have broken dashboards
  • To be able to execute the JIRA Project Import you need to first transfer the configuration of all projects and it needs to match exactly the configuration on the source instance - otherwise the import will probably fail for 90% of the projects
  • If you have a lot of add-ons there is a big chance to end up with missing or broken add-on data (again because it might refer to objects by their ID which will change when you merge it into the new instance)
  • If you have integration with Confluence i.e. remote links to confluence pages - these will also be broken.
  • If you plan to merge Confluence instances at the same time you may need to also update confluence pages to point to the issues in the merged instance

This is an example of some of issues that you will face (there is more). We have a lot of experience doing such migrations and we can help. If you are interested I suggest we get on a call and discuss it in more details - just drop us a mail at support@botronsoft.com


 

Our main concern is filters and dashboards. Can you suggest a way to import them?

You could use Script Runner console to 

  1. Get all filters on first instance
  2. Set it all on second instance

Here is code example how to get all filters:

import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.issue.search.SearchRequest;
import com.atlassian.jira.issue.search.SearchRequestManager;
import com.atlassian.jira.sharing.SharePermission;
import com.atlassian.jira.user.ApplicationUser;
import com.atlassian.jira.user.util.UserUtil;

ArrayList<String> Filters = new ArrayList<String>();
UserUtil userUtil = ComponentAccessor.getUserUtil();
SearchRequestManager searchRequestManager = ComponentAccessor.getComponent(SearchRequestManager.class);
ArrayList<SearchRequest> FilterList;
String CurFilter = "";
boolean HasGlobal;
String CurPerm;
for(ApplicationUser CurUser: (ArrayList<ApplicationUser>) userUtil.getAllApplicationUsers())
{
    FilterList = (ArrayList<SearchRequest>) searchRequestManager.getAllOwnedSearchRequests(CurUser);
    for (SearchRequest Search: FilterList)
    {
        CurFilter = Search.getName() + "#" + Search.getQuery() + "/" + Search.getOwnerUserName() + "#";

        HasGlobal = false;

        for (SharePermission Perm: Search.getPermissions().getPermissionSet())
        {
            CurPerm = Perm.getType().get();
            CurFilter += CurPerm + "/" + Perm.getParam1() + "/" + Perm.getParam2() + "#";

            if (CurPerm == "global")
                HasGlobal = true;
        }

        CurFilter += " \n"
        if (!Filters.contains(CurFilter))
            if (HasGlobal)
            {
                Filters.add(CurFilter);
            }
    }
}
String Result = "";
for (String Filter: Filters)
{
    Result += Filter + "\n@";
}
return Result

Nice script to  get the filters but how to you set them on the second instance?

Srinivas - I saw your post on the Atlassian Q&A blogs. As you can see from Bori's comments, our Botron PSO team has years of everyday-experience managing the merge, un-merge, and migration of JIRA & Confluence instances.

I can set up a call to discuss how you can accelerate getting your project completed with the least amount of fuss & muss. Just let me know smile rich.bowman@botronsoft.com

 

PS: I sent you a LinkedIN email also 

Suggest an answer

Log in or Join to answer
Community showcase
Teodora [Botron]
Published Thursday in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

938 views 5 18
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot