Create Multiple group in database

Rilwan Ahmed
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 7, 2018

I want to create around 100 groups in jira internal directory. Is there any easy way to do it rather manually adding group from UI ?  I mean from groovy script or INSERT query (Database) ?

2 answers

0 votes
Rilwan Ahmed
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 8, 2018

We use groovy runner internal plugin. 

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.
March 7, 2018

Definitely not by touching the database.  What scripting add-on do you have?

Rilwan Ahmed
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 8, 2018

Groovy Script

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.
March 8, 2018

Which one?  I know of  4 that use Groovy one way or another.

Rilwan Ahmed
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 8, 2018

We use groovy runner internal plugin. 

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.
March 8, 2018

Please, tell us which one.

Rilwan Ahmed
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 8, 2018

I dont know which one exactly. It is developed by our internal team. 
Sample code which runs there:

/* getAllUsersCount.groovy */
/* calculate all the user count */

import com.atlassian.jira.user.ApplicationUser

Iterator<ApplicationUser> userIterator = userManager.getUsers().iterator()
int count = 0
while (userIterator.hasNext()) {
userIterator.next()
count++
}

println(count)

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.
March 8, 2018

Ok, there's not a lot I can tell you, as we have no idea of the capabilities of that, including where it runs.

You'll need something like GroupManager.AddGroup() calls, but I can't do a lot else for you.

Suggest an answer

Log in or Sign up to answer