Bulk update project roles

To make things more flexible for project administators, we're looking to use project roles. I've hit a snag however, in that the default membership only applies on projects created after the defaults were set.

This does make sense to a degree, however if I want to make a bulk change there doesn't appear to be an easy way to do this.

Any suggestions? Aside from manually changing all the projects by hand (time consuming and error prone).

We've come up with the below sql query, however it's not quite right yet (it doesn't appear to correct filter out devs, although it does when you include roletypeparameter in the select statement). The below filters by project catagory.

SELECT  DISTINCT
    p.id
FROM
    project p INNER JOIN nodeassociation na ON p.id = na.source_node_id
  LEFT OUTER JOIN projectroleactor pra ON p.id = pra.PID
 WHERE
  na.sink_node_id = 10101 AND na.sink_node_entity = 'ProjectCategory' AND pra.roletypeparameter != 'Project Devs';

The project category filter does work, so I think there is something wrong with the joins (still wrapping my head around them).

Thanks,

Leon

1 answer

1 accepted

Playing with fire :(! JIRA Command Line Interface has some "legal" ways for dealing with project roles, etc... See Documentation .

Thanks! I really didn't want to fiddle with the database. Quite comfortable with the CLI in general, so I should be able to knock something up.

Thanks for posting the link! I don't see a parameter for Project roles though... Were either of you able to work it out?

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,798 views 11 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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot