How to identify Workflow Diagram in Jira database
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
When a workflow is created:
its XML data are stored in
descriptor
column of tablejiraworkflows
, together with the workflow name (workflowname
column) and idits Diagram is stored in table
propertytext
, referred to by columnproperty_key
of tablepropertyentry
column
property_key
of tablepropertyentry
however doesn't signify which workflow it is in an easy way
This article discusses how to identify which Diagram belongs to which workflow
JIRA uses md5 to encode the workflow names to be used in column property_key
of table propertyentry
. We can use md5 Hash Generator to get the md5 hashcode of a workflow.
Solution
Step-by-step guide
Run the following SQL query to get the md5 hashcode of a workflow based on the workflow name:
1 2
select md5(workflowname) from jiraworkflows where workflowname = 'JIRA MD5 Workflow';
Please replace the
'JIRA MD5 Workflow'
with the actual name of your workflow. The md5 hashcode returned by the query looks like "a5f6ec9e0aaa7ed764a8f1a58d4b95ab" (actual value would vary based on the workflow name supplied).Run the following query to get the Diagram (replace the hashcode accordingly):
1 2 3 4 5 6 7 8 9 10
select pe.id, pe.property_key, pt.propertyvalue from propertyentry pe inner join propertytext pt on pe.id = pt.id where entity_name like '%workflow%' and property_key like '%<md5 value>';
In this example the query would look like this:
1 2 3 4 5 6 7 8 9 10
select pe.id, pe.property_key, pt.propertyvalue from propertyentry pe inner join propertytext pt on pe.id = pt.id where entity_name like '%workflow%' and property_key like '%a5f6ec9e0aaa7ed764a8f1a58d4b95ab';
Replace
<md5 value>
with the actual value returned by the previous query. Please make sure to put the '%' sign before the md5 hashcode value in the query, since the value at property_key has similar to the following format "jira.workflow.layout:a5f6ec9e0aaa7ed764a8f1a58d4b95ab"
Was this helpful?