Easy way to update roles list


I want to update th roles in many projects, my problem is that I need to add a different list of user to each project. I got the list already in excel file.

Is there an easy way to update the roles ? Something like updating a file ?

Even copy paste of user names doesn't seem to work.

I don't want to use groups for this as it differs for every project.

Using version 5.0.7


2 answers

1 accepted

0 votes
Accepted answer

JIRA Command Line Interface has role actions like addProjectRoleActors.

Depending on how you identify your users and projects, use one of the run actions like runFromSql or runFromCsv .

Thanks. Works great and easy to use.

0 votes

No, there's no easy way to do this (although pasting the user IDs, comma separated, should work). I wouldn't try to move to groups either - you've still got the problem that you'd need to get the groups populated from your spreadsheets.

I'd consider automating it with scripts. The most simple way is probably to use the Jelly runner.

It's very easy to take a spreadsheet list and write formula that converts your data from "user/project" to the block of Jelly required to "add user to role in project". Have a look at https://confluence.atlassian.com/display/JIRA063/Jelly+Tags to get started, and when you've got the basic idea, head for the "add actors to project role" function.

The example I've got lying around for adding users to the (custom) role of "Tester" is below. This one adds the user who logs in as "mr.flibble" to the role (which has an id of 10001), in the project "PENGUIN"

<JiraJelly xmlns:jira="jelly:com.atlassian.jira.jelly.JiraTagLib">
<jira:AddActorsToProjectRole projectroleid="10001" actors="mr.flibble"
projectkey="PENGUIN" actortype="atlassian-user-role-actor" />

Thanks, the jelly script works great.

I tried again a comma seperated list and it doesn't work. once I have anything after the first username it cannot find a match.

From memory, you have to have one "add actors" line per user to add. That's why I use spreadsheets to do stuff like this - a quick formula and then a drag-expand fills it all for me.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,309 views 12 19
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