Search for JIRA group usage in Workflows

Hi all,

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!

Cheers,

// Svante

1 answer

1 accepted

This widget could not be displayed.

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!

Cheers,

// Svante

Hi Svante, I am facing the same issue we are renaming all exsisting jira groups i am looking for a query where i can check the groups usage could you please share the query to run in MSSQL 2012 could you please help me on this ?

 

Cheers,

Gopi

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

146 views 2 0
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