Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Script Runner Change Dashboard/Filter Owners in JIRA 4.4+

Adam Saint-Prix
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 12, 2012

I'm trying to use the Script Runner plugin in JIRA 4.4 to bulk change ownership of several Filters and Dashboards. I'm assuming this is a built in script, but I don't see it in the list of Built-In scripts.

Am I crazy or is this no longer available in 4.4 because JIRA supports part of this requirement out of the box?

Here's what I have:

Condition Tester

Test conditions that are used in your workflow functions

Send a custom email

Send an email based on the provided template if conditions are met

Switch to a different user

Switch to another user to deal with support problems and so on.

Copy custom field values

Copy custom field values from one field to another in bulk, to support changing a field type without using SQL or restarting.

Bulk Fix Resolutions

Modify resolution field in bulk, without creating a change entry. Useful after a bad import.

Renames a user ID

Changes a user's ID without reindexing or restarting

Copy project

This tool will create a new project, from the configuration of another project.

This includes: Schemes, Role memberships, Custom field configurations, and optionally, versions and components.

Reindex issues

Reindex issues for a project or corresponding to a filter, perhaps after an indexing problem or editing the database.

2 answers

1 accepted

1 vote
Answer accepted
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 12, 2012

> Am I crazy or is this no longer available in 4.4 because JIRA supports part of this requirement out of the box?

Adam, you may be going crazy, we are probably the wrong people to ask, but you are exactly right in that I stopped it being available since similar functionality became available in jira.

Covered here: https://studio.plugins.atlassian.com/wiki/display/GRV/Built-In+Scripts?focusedCommentId=67797171#comment-67797171

However I may have been premature, as there still seems to be a use case for people who need to make a bulk change. I will most likely put it back.

If you want to try it you can open the jar file with say winrar, edit /com/onresolve/jira/groovy/groovyRunner.properties, change the line:

com.onresolve.jira.groovy.canned.admin.ChangeSharedEntityOwnership.519.to.659 = com/onresolve/jira/groovy/canned/admin/ChangeSharedEntityOwnership.groovy

to
com.onresolve.jira.groovy.canned.admin.ChangeSharedEntityOwnership.519.to.0 = com/onresolve/jira/groovy/canned/admin/ChangeSharedEntityOwnership.groovy
repack it and upload. But I won't have tested it on versions greater than 4.4.1, but, it should work. Probably.
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 12, 2012

Yep... agree.

And +1 for doing it in a test environment.

Adam Saint-Prix
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 12, 2012

Jamie,

Thanks for chiming in. I just noticed the comment not two minutes before you answered. I agree and think you may need to bring this bad boy back. The out of the box feature is great, but doesn't meet this bulk change requirement which is probably the more typical use case.

I'll give it a whirl in a test environment and see if that does the trick. I'm not changing 300+ filters by hand.

Adam Saint-Prix
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 12, 2012

I made the changes and it worked great in test. I may run it 10 more times to be sure, but seemed to work fine.

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 12, 2012

Adam, if you're not done with this, please try 2.0.4. I've also made the choosers multiselects so you don't get RSI from clicking on all the checkboxes.

Adam Saint-Prix
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 15, 2012

I forgot to come back and comment, I was able to get this working making the modification you suggested. I'll install 2.0.4 so that I have it though.

Thanks again to you and Ramiro for your help.

1 vote
Ramiro Pointis
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 12, 2012

Built-in scripts are examples that you can use, but there is a possibility to create your own scripts.

You can look in the documentation

Adam Saint-Prix
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 12, 2012

Ramiro,

Your answer actually was helpful, not correct but helpful. I read through the 394 comments on the documentation page to find that changing ownership of dashboards and filters has been removed in Script Runner 2.0.3. JIRA's built in feature doesn't let you do so in bulk which is why this is still needed.

Ramiro Pointis
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 12, 2012

Glad it was helpful, too bad it wasn't the correct answer. Jamie is the one you have to listen to.

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 12, 2012

Nah... please keep chipping in. I need help ;-)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events