Easy way to update roles list

Hi,

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

Thanks.

2 answers

1 accepted

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 vote

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" />
</JiraJelly>

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

246 views 1 18
Join discussion

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