Easy way to update roles list

Alon Erez
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.
January 29, 2013

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

0 votes
Answer accepted
Bob Swift OSS (Bob Swift Atlassian Apps)
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.
January 29, 2013

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 .

Alon Erez
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.
January 29, 2013

Thanks. Works great and easy to use.

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 29, 2013

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>
Alon Erez
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.
January 29, 2013

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.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 29, 2013

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