We have a user that left the company. They are owner of 70+ filters/dashboards. I just purchased a license for the latest version (4.1.3.15 ) of ScriptRunner since the old free version has a bug with changing ownership. I tested out the script and it worked fine for two active users. However, for the user that left the company, they are inactive (and we use Active Directory for logins, so I don't have control over that). When I use his email address for the "From" id and an active user for the "To" Id, the Dashboard and Filter IDs never populate.
Any thoughts or workaround for this scenario?
This now works "out of the box" in Scriptrunner for JIRA 5.5.5 ! Thanks Adaptavist, this makes life easier for JIRA admins !
So, this is actually a side effect of the fact that the user picker field can't display inactive users.
Since the "From" and "To" fields are actually user picker fields, they won't work if a proper user isn't returned from JIRA's built-in user picker REST endpoint.
One temporary workaround might be to call the built-in script via REST, though you'd have to know the IDs and such of the Dashboards.
Since this is a big use case for the change ownership feature, I'm going to see if we can't raise this as a bug for future development.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've been running into this of late. Wish you could just type the user name instead of using the picker. Although if REST can do it then that probably works.
Thanks for the tip!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No sweat. Here's the feature request, by the way. https://productsupport.adaptavist.com/browse/SRJIRA-2384
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nice, voted and watched that on Adaptavist support...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I ran into this problem, and was able to get this fixed using the script console and code taken from here: https://productsupport.adaptavist.com/browse/SRJIRA-762
import com.onresolve.scriptrunner.canned.jira.admin.ChangeSharedEntityOwnership
Map<String, Object> inputs = [
(ChangeSharedEntityOwnership.FIELD_FROM_USER_ID) : "olduser",
(ChangeSharedEntityOwnership.FIELD_TO_USER_ID) : "newuser",
(ChangeSharedEntityOwnership.FIELD_DASHBOARD_IDS) : ["1234"]
]
def changeSharedEntityOwnership = new ChangeSharedEntityOwnership()
assert ! changeSharedEntityOwnership.doValidate(inputs, false).hasAnyErrors()
changeSharedEntityOwnership.doScript(inputs)
Replace the olduser, newuser, and the dashboard ID(s) (taken from the DB).
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.