How to change the owner of a view in Structure?

Christian Olschinka December 12, 2018

Hi,

how can I change the owner of a view in Structure (not to be confused with the owner of the structure itself)? After migrating from one instance to another some of the views' owners were changed unexpectedly, and I have to switch them back to the original owners.

Any help appreciated, thank you!

Christian

 

1 answer

1 vote
Vlad Lessage
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.
December 18, 2018

Hi Christian,

Thanks for posting. 

Do you know if anything unusual happened during the migration? It would be great if we could find out how that happened in the first place but you'd have to be able to reproduce it, which I understand might not be possible.

Anyhow, this can be done a couple different ways. The easiest way would be to use a script to call the REST API. Do you use the ScriptRunner app by any chance?

I look forward to assisting you. 

Best Regards,

Vlad

Christian Olschinka December 19, 2018

Hi Vlad,

yes, we have Scriptrunner Plugin in use and I'd be glad if you could advise me or provide a code snippet how to do this.

Regarding the possible reason for the owner change:

I don't have access anymore to the source system the structures were migrated from, so unfortunately I cannot reproduce that exactly. The migration was performed as described in the "Backup Structure" and "Migrate Structure" paths in the documentation and took place between two JIRA instances on different systems. No structures were present on the target before migration.

Common to all owner changes is that Structure replaced the original owner with the user who carries out the migration (maybe the original owner could not be matched on the target instance?). The first screenshot lists some public views on the target instance with owner "olschink", who was logged in and carried out the migration as a JIRA system admin, but did not own any structures, nor was in any project role before migration.

The second screenshot shows another curiosity: A private view named "Tracking" doesn't have an owner at all (although I cannot safely verify  that the view did have an owner on the source instance before migration, but I suppose so).

Best regards

Christian

private_views.pngpublic_views.png

Christian Olschinka January 23, 2019

Hi @Vlad[ALM Works]

is there any news on this?

Best regards

Christian

Vlad Lessage
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.
February 13, 2019

Hi Christian,

Somehow I missed your updates here. I apologize.

We received your Service Desk request and I sent you a reply but wanted to post here as well. Would you prefer to make the changes as a "bulk" change or do you prefer to be able to go through them somewhat individually?

Once I hear back from you, I will work with our Solutions Engineer to put together a script for you. We should have it ready in a few days.

Best Regards,
Vlad

Lola_Ajayi April 6, 2020

Can we please get a scripts to bulk change the structure owner

Mario O.G
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 6, 2020

Hi Lola, 

Are you referring to the script which we shared with Christian, or you're facing a different scenario?

The script mentioned here works by recovering the ownership of the views. It doesn't relate to the ownership of the structures themselves.

If possible, kindly clarify your goal and the issue you're coming across.

Mario O.G
[ALM Works]

Lola_Ajayi April 6, 2020

Have seen the scripts. Thanks 

Marina Ferraz McCashin May 11, 2020

Hi @Mario O.G and @Vlad[ALM Works] 

I have a similar scenario where I need to change the owner of a Structure View as they are no longer part of the company. 

I have script runner available if you can provide a snippet of how to do this? 

Marina. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events