Know where/if a plugin is used. Both have to be adapted to match a specific plugin.
First version gives more data but requires ScriptRunner.
Second version only uses SQL, but is less extensive.
You need to know what you're looking for : com.innovalog.jmwe.jira-misc-workflow-extensions
Script Groovy
Adapted from : https://answers.atlassian.com/questions/205094/how-to-find-all-workflows-which-are-using-postfunctions-of-a-plugin
import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.workflow.JiraWorkflowimport com.atlassian.jira.workflow.WorkflowManagerimport java.util.regex.Matcher String searchText = 'com.innovalog.jmwe.jira-misc-workflow-extensions' WorkflowManager workflowManager = ComponentAccessor.getWorkflowManager()Collection<JiraWorkflow> workflows = workflowManager.getWorkflows() String result = "Workflow;Function;Type;Action;Step\r\n<br/>" workflows.each{workflow -> def workflowXml = workflow.descriptor.asXML() Matcher m = workflowXml =~ /${searchText}/ if (m.find()) { String workflow_name = "${workflow.name}${if(!workflow.isActive()){";(inactive)"} else ';active'}${if(workflow.isDraftWorkflow()){"(draft)"} else ''}" def wf = new XmlParser().parseText(workflowXml) List<Node> wf_flat = wf.depthFirst() wf_flat.each{ if (it.text() ==~ /.*${searchText}.*/){ result += "$workflow_name;${getNodeInfo(it,searchText)}\n\n<br/>" } } }}result String getNodeInfo(Node n, String search) { String nodetext = '' nodetext += "${n.text() - search}" def p = n.parent() while (p) { switch (p.name()) { case '"post-functions"': nodetext += ";post-function "; break case 'validators': nodetext += ";validator "; break case 'conditions': nodetext += ";condition "; break case 'action': nodetext += ";${p.attribute('name')} (${p.attribute('id')})"; break case 'step': nodetext += ";${p.attribute('name')} (${p.attribute('id')})"; break case 'global-actions': nodetext += ";GLOBAL "; break case 'initial-actions': nodetext += ";INITIAL "; break } p = p.parent() } return nodetext} |
SQL Query
SELECT workflowscheme.name, workflowschemeentity.scheme, issuetype.pname, workflowschemeentity.issuetypeFROM issuetype, workflowschemeentity, workflowschemeWHEREissuetype.id = workflowschemeentity.issuetype andworkflowscheme.id = workflowschemeentity.scheme and workflowschemeentity.workflow in (SELECT jiraworkflows.workflowname FROM jiraworkflows WHERE jiraworkflows.descriptor like '%com.company.plugin%'); |
