Change user account for structure synchronizer

I would like to transition the account used to set up our structure synchronizer to a service account. That way if I leave the organization, the sync will still work. How do I do this?

1 answer

1 accepted

1 vote

Hi Scott,

We'll add the ability to change synchronizer owner in one of the future versions, likely in Structure 2.7.

Meanwhile, there's a hack that involves using Script Runner plugin. If you're keen to try that, install Script Runner and execute the following Groovy script.

It's recommended to run the script during a quiet time, when there are no changes that the synchronizer could process. Alternatively, disable the synchronizer, run the script, then resync and enable again.

import com.atlassian.jira.ComponentManager 
def plugin = ComponentManager.getInstance().getPluginAccessor().getPlugin('com.almworks.jira.structure')
def syncManager = plugin.getModuleDescriptor('sync-manager').getModule()
def synchronizer = syncManager.getInstalledSynchronizer(3) // 3 is the synchronizer ID
synchronizer.myDefinition.setUserKey('tom') // tom is the new owner userkey
syncManager.updateDefinition(synchronizer.myDefinition)
return 'ok’

Hope this helps!
Igor

That's what we needed. Thank you

Hi Igor

 

I ran into the same problems as ScottW. I tried your querry with scriptrunner but it doesn't worked. Can you help me with another solution? Structure version 3.3.3.jira7

 

Thanks.

Jonas

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 21, 2018 in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

1,038 views 7 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