Forums

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

Is there a way to copy all the same roles from one project to another?

kk4065896 July 15, 2020

Hi All,

 Is there a way to copy all the same roles from one project to another? 

I have a project A and project B. I need same users and roles copy from project A to project B. Anyone can help me in this please.

Thanks in advance.

1 answer

1 accepted

1 vote
Answer accepted
Radek Dostál
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.
July 15, 2020

Hi,

 

Not natively (definitely not in Server, very much believe not on Cloud either).

 

I believe that you would either need to run a groovy script using public Java API (if you have a plugin able to run those scripts on Cloud) - but I have high doubts that you will be able to use it to full extent without resorting to REST anyway - which is the second and more likely way with Cloud.

 - get ProjectRoleActors from role 1, project A

 - get ProjectRoleActors from role 2, project A

 - update project B's project role 1's membership to include those users

 - update project B's project role 2's membership to include those users

 

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-role-actors/#api-group-project-role-actors

 

If anybody has a better way or a plugin to make this easier, all the better. Myself I'd go with REST if you have experience with remote requests.

 

Of course the page from the textbook would say "use groups to avoid handling users this way", but I get you cannot always predict that - might ease your way though and you could skip REST by defining the right user groups and using those in both projects.

 

Regards,

Radek

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events