Chapter 5. Workflow Customizations


This chapter covers how to create JIRA plugins for use with workflows. Conditions, validators and post-functions are each described in detail, with both nonconfigurable and configurable examples. All the source code for the examples in this chapter is available from The standard JIRA conditions, validators, and post-functions plugins are also useful examples and can be found in the file system-workflow-plugin.xml.


Conditions control whether a transition appears in a user’s list of available workflow actions. For instance, the default JIRA workflow only shows the Start Progress transition to the current assignee of an issue. Other users don’t see the transition as a choice in their view of the issue’s actions.

Conditions are configured with the Add link on the Conditions tab of a workflow transition, as described at You can also combine multiple conditions using AND and OR operations, but not negation.

Creating a custom condition is relatively straightforward, at least compared with custom fields and searchers. The first example is of a condition that has no configuration.

First we add a workflow-condition element to atlassian-plugin.xml as shown in Example 5-1.

Example 5-1. atlassian-plugin.xml for a condition with no configuration
<workflow-condition key="custom-noconfig-condition" name="A ...

Get Practical JIRA Plugins now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.