Hi there,
I have many directories configured in Jira 8. All directories are enabled. When I create group via UI or REST api, I see group gets created in all the directories (in cwd_group table).
I want to just create group in one directory. Is it possible? And what is the good way? I am fine with script.
Hi Gaurav,
You can use Script Runner plugin and run below code to create group in particular directory:
def directoryManager = ComponentAccessor.getComponent(DirectoryManager)
def GroupTemplate grpTemp = new GroupTemplate("New group name",1)
directoryManager.addGroup(1,grpTemp)
where 1 is directory id. You can see directory id from cwd_directory table.
However, if someone can guide to create a plugin and expose it as REST endpoint, so you can save cost of purchasing Script Runner plugin.
A bit too late, but yes... this works!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.