I am doing some heavy house-keeping in a quite messy JIRA instance. There are tons of groups created and one task is to get a grip on this and minimize the number of groups as much as possible and start using existing LDAP groups and Roles instead.
When viewing a group in the Admin GUI I get a good picture of the group's occurence in Permission Schemes, Issue Security Schemes, Notification Schemes and if any Saved Filters are using the group.
But I haven't found any information about the usage of groups in the Workflows. I did some poking around and found almost immediately a couple of transition validators using jira-groups. Ouch!!!
I guess this may be possible to dig out from the database in some way but I haven't found any tables holding the e.g. validator info.
Is there a way to query the database for a specific jira group name, say: jira-CAB-members?
Any suggestions are highly appreciated!
The workflows are held mostly in xml in the database, so I'm afraid it's a case of searching rather large text fields. But not many of them
You could take a backup of the whole system in XML and explore it that way, but I doubt that's any cleaner than the SQL
However, in both cases, I wouldn't search for the groups - I'd go after the validators. The workflow stores it all in a way that says "for this validator, use class X, with parameters Y". So if you know what validator classes you have installed that might be using groups, you may find them a lot more quickly (this probably applies more to XML export and grep...)
Great answer, Nic! Thanks!
I ended up doing it this way:
I ran the following SQL query to find all workflows using the validator in question
select workflowname, descriptor from jiraworkflows where descriptor like '%com.atlassian.jira.workflow.condition.UserInGroupCondition%' order by workflowname
This gave me a list of 15 workflows (of which half was backup-copies :-)
Each row held the entire XML descriptor for the workflow in concern so I just copied the value of that into my editor and searched for the validator. The location in the XML file gave me the transitions in question!
Now I just had to jump into the workflows and update the transitions in concern to not use the JIRA group anymore.
Much nicer approach than walk through 100+ workflows.
If I could I would upvote your anwser twice!
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot