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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.