Workflow

Summary

This feature allows workflow transitions to automatically trigger on issue creation and/or issue comment (eg to Reopen an Issue on Comment).  The chosen transition(s) can also be restricted to events originating from assignees or non-assignees.  The configuration is held inside a workflow rule.  Each project mapping can have multiple rules.

For further information and examples see: Use Workflow Rules to transition issues on a per-project basis

Creating a New Workflow Rule

  1. Press New Workflow Rule. You will then see a new Workflow Rule be created using some default values.

  2. Press Edit (pen icon) to open the Workflow editor. This will then open the Workflow Rule editor.

  3. Here you will need to enter the relevant values. Once complete you will need to press Submit to save the configuration.

Configuration options

Description

A description of the workflow rule.  This may be useful for others who see this configuration.

Workflow Name

Name of the workflow the rule is to be applied against.

During

Defines what event will trigger the transition. The current options are:

  1. Create - the transition will only be triggered by an issue creation event.

  2. Comment - the transition will only be triggered by an issue commented event.

  3. createAndComment - the transition can be triggered by either issue creation or an issue commenting.

Run Condition

Controls which user will drive the workflow transition. There are two options:

  1. forNonAssignee - the transition is driven by a user who is not the assignee.  For example, the reporter replying could mean that the assignee needs to do something.

  2. forAssignee -  the transition is driven by the assignee.  For example, a reply could mean that the issue is in progress, or it requires action from the reporter.

Issue Types

Define which issue types the issue has to be in for the rule to be triggered. Only valid Issue Types for the workflow defined in the Workflow Name will appear. If none are selected then this restriction will be ignored.

Statuses

Define which statuses the issue has to be in for the rule to be triggered.

Transitions

Define what transition sequence to perform, i.e. Pending External > Action Needed. You can also carry out multiple transitions: Pending External > Action Needed > Resolved.

Properties

Optional.  Apply workflow properties to the transition to meet special transition conditions.

To set the resolution in a transition you need to use the numeric ID that can be seen by hovering over EDIT in the Jira > Issues > Issue Attributes > Resolutions  list:

http://localhost:8080/secure/admin/EditResolution!default.jspa?id=10000

therefore to set that resolution you would use:

resolution=10000

Run As Condition

What user to run the transition as.  This enables JEMH to carry out transitions that require different identities (i.e. Assignee). There are three options:

  1. emailSenderUserOnly - The issue reporter will be used to run the workflow transition, if the reporter is a JIRA user they will be used or if the issue was created by a non-Jira user the default reporter will be used.

  2. nominatedUserOnly - You can specify a default user that will be used to run the workflow transition.

  3. issueAssigneeOnly - The issue assignee will be used to run the workflow transition.