JIRA stores workflows in their native XML format as strings inside the database:
mysql> describe jiraworkflows; +--------------+---------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------------+---------------+------+-----+---------+-------+ | ID | decimal(18,0) | NO | PRI | 0 | | | workflowname | varchar(255) | YES | | NULL | | | creatorname | varchar(255) | YES | | NULL | | | DESCRIPTOR | text | YES | | NULL | | | ISLOCKED | varchar(60) | YES | | NULL | | +--------------+---------------+------+-----+---------+-------+ 5 rows in set (0.01 sec)
The 'descriptor' field contains the XML.
If you are using MySQL, and are a command-line junkie, here are three useful scripts, available for download as a tar.gz.
jira_listworkflows
This lists the custom workflows in a MySQL database:
jturner@teacup:/tmp/wf$ ./jira_listworkflows jira +-------+----------------+-------------+ | ID | workflowname | creatorname | +-------+----------------+-------------+ | 10040 | Quest Workflow | | | 10011 | Demo Workflow | | +-------+----------------+-------------+
jira_workflow
This prints a workflow's XML
jturner@teacup:/tmp/wf$ jira_workflow jira 'Demo Workflow'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE workflow PUBLIC "-//OpenSymphony Group//DTD OSWorkflow 2.8//EN" "http://www.opensymphony.com/osworkflow/workflow_2_8.dtd">
<workflow>
<meta name="jira.description">The default JIRA workflow.</meta>
<initial-actions>
<action id="1" name="Create Issue">
<meta name="jira.i18n.title">common.forms.create</meta>
<validators>
<validator type="class">
.....
jira_editworkflow
Loads an editor with the workflow XML (using the jira_workflow script), and saves modifications made to the database.
This script is useful for making small workflow edits that the JIRA editor doesn't let you (see issue JRA-7661 - editing workflows is too inflexible. Making any changes beyond small tweaks is dangerous - if you change the workflow step definitions from under JIRA, it can leave your data in a broken state (workflows unable to be transitioned, etc).
