Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

A JIRA workflow is the set of steps and transitions an issue goes through during its lifecycle. Workflows typically represent business processes.

JIRA ships with a default workflow. The default workflow cannot be edited, but you can customise the issue lifecycle by creating additional workflows. Each workflow can be associated with particular projects and (optionally) particular issue type(s).

Anchor
customising
customising

On this page:

Table of Contents
maxLevel4
minLevel1

See also:

Children Display

Creating a workflow

  1. Log in as a user with the 'JIRA Administrators' global permission.
  2. Bring up the administration page by clicking either the 'Administration' link on the top bar or the title of the Administration box on the dashboard.
  3. In the left-hand navigation panel, under 'Global Settings', click the 'Workflows' link.
  4. The 'View Workflows' page will be displayed, listing all the workflows that are currently defined in your JIRA system:
  5. To create a new workflow in JIRA, either:
    • Create a 'blank workflow by using the 'Add New Workflow' form at the bottom of the page:
      1. In the 'Name' field, type a name (usually 2-3 words) to identify your new workflow.
      2. (Optional) In the 'Description' field, type a detailed description of your new workflow.
      3. Click the 'Add' button.Your new workflow will contain one step, called 'Open', which has an incoming transition called 'Create'.
    • Copy an existing workflow (this is useful if you already have a workflow that is similar to what you need) by clicking the 'Copy' link next to an existing workflow:
      1. In the 'Name' field, type a name (usually 2-3 words) to identify your new workflow.
      2. (Optional) In the 'Description' field, type a detailed description of your new workflow.
      3. Click the 'Copy' button.Your new workflow will contain the same steps and transitions as the workflow you copied.
        Info

        If you are copying the default JIRA workflow and wish to rename the transitions, you will need to delete the 'jira.i18n.title' and 'jira.i18n.description' properties from all of the transitions. Otherwise, the default names will persist. Read more about transition properties.

  6. Once you have created your new workflow you may want to customise it by adding or editing steps and transitions (see below) — especially if you have created a blank workflow.
  7. When you have finished customising your new workflow, see Activating Workflow for how to use it.
    Anchor
    editing
    editing

Editing a workflow

Editing a workflow means that you are modifying the steps and transitions that make up a workflow. Read more about modifying steps and transitions on this page.

The process for editing a workflow differs depending on whether you are editing an inactive workflow or an active workflow. Restrictions are placed on the modifications you can make to an active workflow, due to the impact the changes will have on projects and/or issue types that the workflow is applied to.

Anchor
edit_inactive_workflow
edit_inactive_workflow

Editing an inactive workflow

An inactive workflow is a workflow that is not currently being used by any projects . Because there are no issues currently transitioning through an inactive workflow, you can simply edit the workflow's steps and transitions as described below.

Anchor
edit_active_workflow
edit_active_workflow

Editing an active workflow

To edit an active workflow, you will need to create a 'draft'. You will be able to make quick edits to your live draft with the benefit of real-time validations. Once you publish your changes, you also have the option of saving your old workflow as an inactive backup.

To edit an active workflow:

  1. Log in as a user with the 'JIRA Administrators' global permission.
  2. Bring up the administration page by clicking either the 'Administration' link on the top bar or the title of the Administration box on the dashboard.
  3. In the left-hand navigation panel, under 'Global Settings', click the 'Workflows' link.
  4. The 'View Workflows' page will be displayed as shown under 'Creating a workflow' above. Click the 'Steps' link next to the workflow that you wish to edit.
  5. The 'Workflow Steps' page will be displayed. Click the 'Create a draft workflow' link in the information message displayed at the top of the screen.
  6. The 'Workflow Steps' page will be reloaded, as shown below. You will now be able to edit a draft of the workflow as described in the sections above. Any changes that you make to this draft will not affect the active workflow until you publish your draft.
  7. When you have completed your changes, click the 'publish this draft' link in the information message displayed at the top of the screen.
  8. A confirmation screen will display, as shown below:

    Select whether you wish to save the original workflow as an inactive copy. If you choose to retain the original workflow, enter a name for the inactive copy. Click 'Publish' to publish your draft (i.e. commit your changes to the active workflow).

Limitations

Please note that the following limitations apply when editing an active workflow:

  • Existing workflow steps cannot be deleted.
  • The associated Status for an existing step cannot be edited.
  • If an existing step has no outgoing transitions, it can't have any new outgoing transitions added.
  • Step IDs for existing steps cannot be changed.

If you wish to make any of the modifications listed above, then you will need to copy the workflow (see 'Creating a Workflow' above), modify the copy and then activate it. Please note, this method will be significantly slower than editing an active workflow, particularly for large instances of JIRA.

Anchor
steps_and_transitions
steps_and_transitions

About steps and transitions

A workflow consists of steps and transitions:

  • A step represents a stage in a workflow for an issue. An issue can exist in only one step at any point in time. Each workflow step corresponds to (and is usually named after) a 'linked' status. When an issue is moved into a particular step, its 'Status' field is updated to the value of the step's 'linked' status.
    When defining a step, you can optionally specify properties — these allow you to make an issue uneditable while it is in this step.
  • A transition is a link between two steps. A transition allows an issue to move from one step to another step. For an issue to be able to progress from one particular step to another, a transition must exist that links those two steps. Note that a transition is a one-way link, so if an issue needs to move back and forth between two steps, two transitions need to be created.The available workflow transitions for an issue are listed on the issue's 'View Issue' page. A user can execute a transition (i.e. move the issue through workflow) by clicking one of the available links, e.g.:

    When defining a transition, you can optionally specify:
    • A screen to be displayed to the user — this is useful if you need the user to provide input before completing the transition.
    • Conditions — these control who can perform a transition (i.e. who can see the transition link on the 'View Issue' page).
    • Validators — these check that any user-supplied input is valid before performing the transition.
    • Post Functions — these perform particular actions after the transition is complete, e.g.:
      • Assign the issue to a particular user.
      • Send an email notification.
      • Update a field in the issue.
        In the diagram of the default workflow, the five boxes represent steps/statuses ('OPEN', 'IN PROGRESS', 'CLOSED', etc) and the arrows represent transitions.
        Anchor
        workflow_resolutions
        workflow_resolutions

A note about 'open' and 'closed' issues

Within JIRA (e.g. in the *'Assigned To Me'*portlet and other portlets ), an issue is determined to be 'open' or 'closed' based on the value of its 'Resolution' field — not its 'Status' field.

  • An issue is determined to be 'open' if its 'Resolution' field has not been set.
  • An issue is determined to be 'closed' if its 'Resolution' field has a value (e.g. 'FIXED', 'CANNOT REPRODUCE').
    This is true regardless of the current value of the issue's 'Status' field ('OPEN', 'IN PROGRESS', etc).

So if you need your workflow to force an issue to be 'open' or 'closed', you will need to set the issue's 'Resolution' field during a transition. There are two ways to do this:

  • Set the 'Resolution' field automatically via a post function.
  • Prompt the user to choose a 'Resolution' via a screen.
    Anchor
    workflow_steps
    workflow_steps

Adding a step

To add a new step to a workflow:

  1. Log in as a user with the 'JIRA Administrators' global permission.
  2. Bring up the administration page by clicking either the 'Administration' link on the top bar or the title of the Administration box on the dashboard.
  3. In the left-hand navigation panel, under 'Global Settings', click the 'Workflows' link.
  4. The 'View Workflows' page will be displayed as shown under 'Creating a workflow' above. Click the 'Steps' link next to the workflow to which you wish to add a step.
  5. The 'Workflow Steps' page will be displayed, showing the steps that make up the workflow, and each step's Linked Status and Outgoing Transitions. The 'Add New Step' form appears below the list of steps. (Note: this form will only be shown if the workflow is inactive or you are editing an active workflow.)
  6. In the 'Step Name' field, type a short name for the step. (Note: it is often useful to use the name of the corresponding status.)
  7. In the 'Linked Status' field, select the status that corresponds to this step. Note that each status can only correspond to one step in each workflow, so if all the statuses are already linked to steps in this workflow, you may need to define a new status.
  8. Click the 'Add' button. The 'Workflow Steps' page will now show your new step in the list.
  9. If you wish to view the details of your new step, click the step name. The 'View Workflow Step' page will be displayed, showing the step's:
    • Linked Status ('Open' in the screenshot below).
    • Incoming Transitions — that is, transitions whose Destination Step is this step.
      • To allow issues to move into this step, there must be at least one incoming transition.
    • Outgoing Transitions — that is, transitions whose Originating Step is this step.
      • To allow issues to move out of this step, there must be at least one outgoing transition.
  10. From this page you can:
    • Edit the step's Name or Linked Status, by clicking the 'Edit' link.
    • View and edit the step's Properties (see 'Using step properties' below).
    • View and edit any of the step's Incoming Transitions or Outgoing Transitions, by clicking the name of a transition. See 'Adding a condition', 'Adding a validator' and 'Adding a post function' (below).
    • Add an Outgoing Transition to the step (see 'Adding a transition' below).
    • Delete an Outgoing Transition.
      Anchor
      uneditable_steps
      uneditable_steps

Using step properties

You can use step properties to prevent issues from being edited when they are in a particular workflow step(s). For example, in the default JIRA workflow, issues in the 'Closed' step/status cannot be edited, even by users who have the *'Edit Issue'*permission. Note that issues which cannot be edited cannot be updated using Bulk Edit either.

To stop issues from being editable in a particular step, set the 'jira.issue.editable' property of the step to 'false' as follows:

  1. Log in as a user with the 'JIRA Administrators' global permission.
  2. Bring up the administration page by clicking either the 'Administration' link on the top bar or the title of the Administration box on the dashboard.
  3. In the left-hand navigation panel, under 'Global Settings', click the 'Workflows' link.
  4. The 'View Workflows' page will be displayed as shown in 'Creating a workflow' above. Click the 'Steps' link next to the workflow whose step you wish to make uneditable.
  5. The 'Workflow Steps' page will be displayed, showing the steps that make up the workflow.
  6. Click the 'View Properties' link that corresponds to the relevant step.
  7. The 'View Workflow Step Properties' page will be displayed, showing the step's existing properties (if any). The 'Add New Property' form appears below the list of steps. (Note: this form will only be shown if the workflow is inactive or you are editing an active workflow. )
  8. In the 'Property Key' field, type: jira.issue.editable .
  9. In the 'Property Value' field, type: false .
  10. Click the 'Add' button.
    Anchor
    delete_step
    delete_step

Deleting a step

Note: a step can only be deleted if it has no incoming transitions.

To delete a step from a workflow:

  1. Log in as a user with the 'JIRA Administrators' global permission.
  2. Bring up the administration page by clicking either the 'Administration' link on the top bar or the title of the Administration box on the dashboard.
  3. In the left-hand navigation panel, under 'Global Settings', click the 'Workflows' link.
  4. The 'View Workflows' page will be displayed as shown under 'Creating a workflow' above. Click the 'Steps' link next to the workflow from which you wish to delete a step.
  5. The 'Workflow Steps' page will be displayed.
  6. Click the 'Delete' link that corresponds to the relevant step. (Note: this link will only be shown if the step has no incoming transitions. A workflow step cannot be deleted if it is the destination of a transition.)
    Anchor
    workflow_transitions
    workflow_transitions

Adding a transition

To add a new transition to a workflow:

  1. Log in as a user with the 'JIRA Administrators' global permission.
  2. Bring up the administration page by clicking either the 'Administration' link on the top bar or the title of the Administration box on the dashboard.
  3. In the left-hand navigation panel, under 'Global Settings', click the 'Workflows' link.
  4. The 'View Workflows' page will be displayed as shown under 'Creating a workflow' above. Click the 'Steps' link next to the workflow to which you wish to add a transition.
  5. The 'Workflow Steps' page will be displayed, showing the steps that make up the workflow, and each step's Linked Status and Outgoing Transitions:
  6. Identify the step from which your new transition will originate, and click the 'Add Transition' link next to the step. The 'Add Workflow Transition' page will be displayed:
  7. In the 'Transition Name' field, type a short name for the transition. (Note: this name will be shown to users as the transition link in the list of 'Available Workflow Actions' on the ' View Issue ' page.)
  8. (Optional) In the 'Description' field, type a short description of the purpose of the transition.
  9. In the 'Destination Step' field, choose the step to which issues will move when this transition is executed.
  10. In the 'Transition View' field, choose either:
    • 'No view for transition' — choose this if you don't need to prompt the user for input before the transition is executed (i.e. the transition will occur instantly when the user clicks the transition link).
    • The name of a screen that will be shown to users, asking for input before the transition is executed. You can choose one of JIRA's default screens (note: many of these are used in the default workflow and are named after its transitions, e.g. 'Start Progress' and 'Resolve Issue'), or any other screen you have created. If no existing screen is suitable, you may want to create a new screen.
      Anchor
      transitionview
      transitionview

Using a screen

You can use a screen to gather input from a user before a particular transition is executed.

Example: using a screen to set the 'Resolution' field

For a particular step in a workflow, you might need to create a transition that will move the issue to a 'closed' status (e.g. 'CLOSED', 'RESOLVED', etc) - see 'open' and 'closed' issues. As part of this transition, you might need the user to set the 'Resolution' field. To do this:

  1. Create a screen, e.g. named ' Resolve Issue Screen ', that contains the 'Resolution' field (and any other fields you want to display).
  2. Create/edit your transition, and choose ' Resolve Issue Screen ' in the 'Transition View' field:
    Anchor
    conditions
    conditions

Adding a condition

Conditions control who can perform a transition, and under what circumstances. If a condition fails, the user won't see the transition link on the View Issue page.

JIRA ships with the following built-in conditions, which are available for you to add to transitions:

Condition

Explanation

Only Assignee Condition

Only allow the issue's current assignee to execute the transition.

Only Reporter Condition

Only allow the issue's reporter to execute the transition.

Permission Condition

Only allow users with a given permission to execute the transition.

Sub-Task Blocking Condition

Block the parent issue transition depending on sub-task status.

User Is In Group

Only allow users in a given group to execute the transition.

User Is In Group Custom Field

Only allow users in a given custom field (of type "Group") to execute a transition.

User Is In Project Role

Only allow users in a given project role to execute a transition.

(You can also create your own conditions via the plugin system. See the Workflow Plugin Guide for details.)

To add a condition to a transition:

  1. Log in as a user with the 'JIRA Administrators' global permission.
  2. Bring up the administration page by clicking either the 'Administration' link on the top bar or the title of the Administration box on the dashboard.
  3. In the left-hand navigation panel, under 'Global Settings', click the 'Workflows' link.
  4. The 'View Workflows' page will be displayed as shown under 'Creating a workflow' above. Click the 'Steps' link next to the workflow to which you wish to add a condition.
  5. The 'Workflow Steps' page will be displayed, showing the steps that make up the workflow, and each step's Linked Status and Outgoing Transitions.
  6. Click the name of the transition to which you wish to add a condition. The 'View Workflow Transition' page will be displayed:
  7. Click the 'Conditions' tab. A list of the transition's existing conditions will be displayed.
  8. Click the 'Add' link. A list of all available conditions will be displayed.
  9. Select a condition from the list and click the 'Add' button.
  10. If the condition requires one or more configuration parameters (e.g. the name of a group or project role), the 'Add Parameters To Condition' page will be presented. Enter your criteria and click the 'Add' button.
  11. The 'Conditions' tab will be displayed, showing your new condition at the bottom of the list of conditions.Note: from here you can:
    • Click the 'Edit' link next to the condition's name to edit its configuration parameters (if there are any).
    • Click the 'Delete' link next to the condition's name to remove the condition
    • Combine your conditions into 'AND'/'OR' groups (see below).
      Anchor
      conditiongroups
      conditiongroups

Combining conditions into groups

You can construct complex conditions by combining individual conditions together to form 'condition groups', using a boolean AND or OR. For example, the following condition group could be constructed:

  • Only the assignee of this issue can execute this transition
  • AND
  • Only users in group jira-users can execute this transition
    The condition will pass if the user is the assignee of the issue AND the user is in the group jira-users.

Multiple condition groups can be combined to construct even more complex conditions. Each pair of condition groups can be combined using a boolean AND or OR. Depending on the structure of the overall condition and its groups, the condition will pass once one or all condition groups have been satisified, e.g:

Anchor
validators
validators

Adding a validator

Validators check that any user-supplied input is valid before performing the transition. For example, a validator can be used to ensure that the comment entered by a user on the transition's screen meets a certain criteria. If a validator 'fails', the Post Functions of the transition will not be executed and the issue will not progress to the destination step of the transition.

JIRA ships with a number of default validators, which are available for you to add to your transitions. You can also create your own validators via the plugin system.

Info

What is the difference between conditions and validators? Conditions are used to determine whether a transition is 'allowed' to be executed. Conditions cannot validate input parameters that are provided by the user on the transition's screen, since if the condition fails the user is not allowed to start executing the transition and so will not see the transition's screen. Validators have access to the input that has been gathered from the user via the transition's screen, and thus can validate that input.

To add a validator to a transition:

  1. Log in as a user with the 'JIRA Administrators' global permission.
  2. Bring up the administration page by clicking either the 'Administration' link on the top bar or the title of the Administration box on the dashboard.
  3. In the left-hand navigation panel, under 'Global Settings', click the 'Workflows' link.
  4. The 'View Workflows' page will be displayed as shown under 'Creating a workflow' above. Click the 'Steps' link next to the workflow to which you wish to add a condition.
  5. The 'Workflow Steps' page will be displayed, showing the steps that make up the workflow, and each step's Linked Status and Outgoing Transitions.
  6. Click the name of the transition to which you wish to add a validator. The 'View Workflow Transition' page will be displayed.
  7. Click the 'Validators' tab.
  8. Click the 'Add' link. A list of all available validators will be displayed.
  9. Select a validator from the list and click the 'Add' button.
  10. If the validator requires one or more configuration parameters (e.g. the name of a group or project role), the 'Add Parameters To Validator' page will be presented. Enter your criteria and click the 'Add' button.
  11. The 'Validators' tab will be displayed, showing your new validator at the bottom of the list of validators.Note: from here you can:
    • Click the 'Edit' link next to the validator's name to edit its configuration parameters (if there are any).
    • Click the 'Delete' link next to the validator's name to remove the validator.
      Anchor
      postfunctions
      postfunctions

Adding a post function

Post functions carry out some processing immediately after a transition is executed (hence the name post function), such as updating an issue's fields, generating change history for an issue, adding a comment to an issue, generating an event (e.g. an email notification).

The JIRA default workflow includes a number of default transitions. Additionally, JIRA ships with the following 'essential' post functions, which are automatically added to every newly-created transition:

Essential post function

Set issue status to the linked status of the destination workflow step.

Add a comment to an issue if one is entered during a transition.

Update change history for an issue and store the issue in the database.

Re-index an issue to keep indexes in sync with the database.

Fire an event that can be processed by the listeners.

The 'essential' post functions cannot be deleted, or reordered relative to each other, as this could compromise other functionality. However, you can insert other post functions between them.

JIRA ships with four built-in post functions which you can optionally add to your transitions:

Optional post function

Explanation

Assign to Current User

Assigns the issue to the user who is executing the transition. (Note: This post function will be ignored unless the user has the *'Assignable User'*permission. You may want to use a condition to ensure that the logged-in user has this permission before executing the transition.)

Assign to Lead Developer

Assigns the issue to the component lead (if one exists) or project lead.

Assign to Reporter

Assigns the issue to the user who created the issue.

Update Issue Field

Updates one of the issue's fields to a given value. Updateable fields are:

  • 'Assignee'
  • 'Description'
  • 'Environment'
  • 'Priority'
  • 'Resolution'
  • 'Summary'
  • 'Original Estimate'
  • 'Remaining Estimate'

    Note that this post function cannot update custom fields.

(You can also create your own post functions via the plugin system. See the Workflow Plugin Guide for details.)

Note that the four optional post functions must be positioned before the 'Update change history for an issue and store the issue in the database' post function, except when used in the 'Create' transition.

Info

A note regarding the 'Create' transition:
Sometimes it is useful to perform particular processing (e.g. set a particular field) when an issue is first created. You can do this by adding post functions to the workflow's 'initial transition', which is executed whenever a user creates an issue, and puts the newly-created issue into the workflow's 'initial step'. The 'initial step' is simply the first step in a workflow; every workflow has one, and only one, initial step (called 'Open' by default, i.e. if you created a blank workflow or copied the default workflow ). The 'initial transition' (called 'Create' by default) is the first incoming transition of the 'initial step'.
When adding one of the optional post functions to the workflow's 'Create' transition (e.g. you might use the 'Update Issue Field' transition to set the 'Assignee' field to a particular user when an issue is created), note that you need to put it before the 'Create' transition's default 'Creates the issue originally' post function.
Special case:
If you need to set the 'Resolution' field when creating an issue, put the 'Update Issue Field' post function after the default 'Creates the issue originally' post function, and use the 'Issue Store' post function after that. Note that use of the 'Issue Store post function (which is available only for the 'Create' transition) should be kept to a minimum, as it does not generate change history and is incapable of persisting fields that have a one-to-many relationship with the issue (e.g. 'Version' or 'Component'). However, for setting the 'Resolution' field during issue creation, this post function is useful.

To add a post function to a transition:

  1. Log in as a user with the 'JIRA Administrators' global permission.
  2. Bring up the administration page by clicking either the 'Administration' link on the top bar or the title of the Administration box on the dashboard.
  3. In the left-hand navigation panel, under 'Global Settings', click the 'Workflows' link.
  4. The 'View Workflows' page will be displayed as shown under 'Creating a workflow' above. Click the 'Steps' link next to the workflow to which you wish to add a condition.
  5. The 'Workflow Steps' page will be displayed, showing the steps that make up the workflow, and each step's Linked Status and Outgoing Transitions.
  6. Click the name of the transition to which you wish to add a post function. The 'View Workflow Transition' page will be displayed.
  7. Click the 'Post Functions' tab. A list of the transition's existing post functions (if any) will be displayed. For example, the default workflow has the following built-in post functions for the 'Start Progress' transition:
  8. Click the 'Add' link. A list of all available post functions will be displayed.
  9. Select a post function from the list and click the 'Add' button.
  10. If the post function requires one or more configuration parameters (e.g. the name of an event), the 'Add Parameters To Post Function' page will be presented. Enter the appropriate information and click the 'Add' button.
  11. The 'Post Functions' tab will be displayed, showing your new post function at the bottom of the list of post functions.Note: from here you can:
    • Click the 'Edit' link next to the post function's name to edit its configuration parameters (if there are any).
    • Click the 'Delete' link next to the post function's name to remove the post function.
    • Click the 'Move Up' link to move the post function higher up in the list (i.e. it will be executed earlier).
    • Click the 'Move Down' link to move the post function lower down in the list (i.e. it will be executed later).
      Anchor

Using a post function to set a field

You can use a post function of type 'Update Issue Field' to set the value of an issue's field(s) after a particular transition is executed.

Example: using a post function to set the 'Resolution' field

For a particular step in a workflow, you might need to create a transition that will move the issue to a 'closed' status (e.g. 'CLOSED', 'RESOLVED', etc) - see 'open' and 'closed' issues. As part of this transition, you might want to automatically set the 'Resolution' field. To do this:

  1. Create/edit your transition. In the 'Transition View' field, either select 'No View For Transition' or choose a screen that does not contain the 'Resolution' field (e.g. the 'Add Comment And Assign' screen).
  2. Add a new post function of type 'Update Issue Field'. Select 'Resolution' from the 'Issue Field' select list and select a suitable resolution from the 'Field Value' select list.
  3. Once completed, the transition's list of post functions will appear as follows:

To create a transition that unsets the 'Resolution' field, follow the same steps but select 'None' from the 'Field Value' select list when adding the post function. The list of post functions for this transition will include the following statement:

  • The Resolution of the issue will be cleared.

Each time one of these transitions is executed, the 'Resolution' of the issue is automatically set or unset as specified in these post functions.

Anchor
notifications
notifications

Using a post function to send a notification

You can use a post function of type 'Fire an event that can be processed by the listeners' to fire the 'Generic Event'. The 'Generic Event' is a built-in JIRA event whose purpose is to allow you to to send email notifications after a particular transition is executed.

Alternatively, you could fire a custom event that you have created specifically for this transition.

When a transition is performed, JIRA will:

  • Look up the notification scheme associated with the issue's project, and identify the users associated with the fired event;
  • Send an email notification to each user.
    (Note that the fired event is also propagated to all registered listeners. )
Example: using a post function to fire the 'Generic Event'

You can use the 'Generic Event' to send email notifications. To do this:

  1. Create/edit your transition.
  2. Go to the transition's 'Post Functions tab and edit the 'Fire an event that can be processed by the listeners' post function.
  3. On the 'Add Parameters To Post Function' page, select 'Generic Event' from the list of events.
    Anchor
    transitionproperties
    transitionproperties

Working with transition properties

Properties are key-value pairs that are can be used to further customise transitions. For example, transition properties help to extend the default workflow to allow language translations.

To view the properties of a transition:

  1. Log in as a user with the 'JIRA Administrators' global permission.
  2. Bring up the administration page by clicking either the 'Administration' link on the top bar or the title of the Administration box on the dashboard.
  3. In the left-hand navigation panel, under 'Global Settings', click the 'Workflows' link.
  4. The 'View Workflows' page will be displayed as shown under 'Creating a workflow' above. Click the 'Steps' link next to the workflow to which you wish to add a condition.
  5. The 'Workflow Steps' page will be displayed, showing the steps that make up the workflow, and each step's Linked Status and Outgoing Transitions.
  6. Click the name of the transition for which you wish to view the properties. The 'View Workflow Transition' page will be displayed.
  7. Click the 'View properties of this transition' link. The 'View Workflow Transition Properties' page will display listing the properties currently set up for the transition. You can also add and delete properties for this transition on this page.
    Anchor
    common_transitions
    common_transitions

Using 'common transitions'

A 'common transition' is a transition that is defined only once in the workflow, but can be used more than once. That is, a common transition can have more than one originating step. The advantage of common transitions is that if a transition needs to be updated, the update only has to be done in one place.

You can edit common transitions in JIRA, but they cannot be created by the method described in 'Adding a transition' (above). Instead, to create common transitions, you can either:

  • Copy the default workflow — the default workflow contains common transitions. Although you cannot edit the default workflow, you can copy it and then edit its steps and transitions to suit your requirements.
  • Create your workflow in XML — see 'Using XML to create a workflow' (below).
    Anchor
    technical_information
    technical_information

Anchor
xml
xml

Using XML to create a workflow

JIRA uses OSWorkflow, a flexible and customisable workflow engine. JIRA's workflow editor generates OSWorkflow XML definition files that are stored in JIRA's database. If you need to take advantage of some OSWorkflow feature that is not available in JIRA's workflow editor (such as 'common' transitions - see above), you can define the workflow in XML and then import it into JIRA as described below.

Once the XML workflow has been imported, JIRA's workflow editor should be able to display most OSWorkflow definitions even if it does not support creating or editing them. For example, conditional results of workflow transitions are displayed in the 'Other' tab on the 'View Workflow Transition' page. The 'Other' tab is only visible if a transition has elements that the editor does not directly support.

To import an XML workflow into JIRA:

  1. Log in as a user with the 'JIRA System Administrators' global permission.
  2. Bring up the administration page by clicking either the 'Administration' link on the top bar or the title of the Administration box on the dashboard.
  3. In the left-hand navigation panel, under 'Global Settings', click the 'Workflows' link.
  4. The 'View Workflows' page will be displayed as shown in 'Creating a Workflow' (above). Locate the 'Add New Workflow' form at the bottom of the page.
  5. Click the 'Import a workflow from XML' link. The 'Import Workflow' page will be displayed.
  6. In the 'Name' field, type a name (usually 2-3 words) to identify your new workflow.
  7. (Optional) In the 'Description' field, type a detailed description of your new workflow.
  8. Either:
    • In the 'Workflow Definition (XML)' field, paste the contents of the workflow XML file; or
    • In the 'File' field, type the full path to the file (note that the path must be local, i.e. you will need to first copy the file to your JIRA server).
  9. Click the 'Import' button.
    Anchor
    copying_workflows
    copying_workflows

Copying a workflow between systems

Sometimes it is useful to create a workflow in a test system and then copy it into a production system. To do this:

  1. In the test system, export the workflow to XML by clicking the 'XML' link next to the workflow in the list shown on the ' View Workflows ' page, and save the output into a file.
  2. In the production system, import the file by clicking the 'Import a workflow from XML' link as described in ' Using XML to create a workflow ' (above).
    Warning
    titleWarning

    When importing an XML workflow into JIRA:
    JIRA's XML workflow definitions contain references to JIRA meta attributes. For example, the id of the linked JIRA status of each workflow step is stored as a 'jira.status.id' meta attribute in the step's definition. Therefore, when manually creating workflows in XML, please ensure that all referenced external entities exist before you import the workflow into JIRA.

Warning
titleWarning

When copying a workflow between systems:
Please note that conditions, validators and post functions can have parameters that might be valid in one system and not in another. For example, different systems might contain different sets of values for the 'Resolution' field (since it is possible to define your own values ). This would be a problem if the 'Update Issue Field' post function is used to set the 'Resolution' field to a value that exists in one system but not the other.