Creating a new workflow

A workflow is like a flowchart, in which issues can go from one state to another by following the direction paths between the states. In JIRA's workflow terminology, the states are called statuses, and the paths are called transitions; we will use these two major components when creating a workflow.

In this recipe, we will create a new, simple workflow from scratch. We will look at how to use existing statuses, create new statuses, and link them together using transitions.

How to do it…

The first step is to create a new skeleton workflow in JIRA:

  1. Log in to JIRA as a JIRA administrator.
  2. Navigate to Administration | Issues | Workflows.
  3. Click on the Add Workflow button and name the workflow Simple Workflow.
  4. Click on the Diagram button to use the workflow designer, or diagram mode.

The following screenshot explains some of the key elements of the workflow designer:

How to do it…

As of now, we have created a new, inactive workflow. The next step is to add various statuses for the issues to go through. JIRA comes with a number of existing statuses such as In Progress and Resolved for us to use:

  1. Click on the Add existing status button.
  2. Select the In Progress status from the list and click on Add.
  3. Repeat the steps to add the Closed status:
    How to do it…

Once you have added the statuses to the workflow, you can drag them around to reposition them on the canvas. We can also create new statuses as follows:

  1. Click on the Create new status button.
  2. Name the new status Backlog and click on Create.

Now that we have added the statuses, we need to link them using transitions:

  1. Select the originating status, which in this example is Open.
  2. Click on the small circle around the Open status and drag your cursor onto the In Progress status. This will prompt you to provide details for the new transition as shown in the following screenshot:
    How to do it…
  3. Name the new transition Start Progress and select the None option for the Transition screen.
  4. Repeat the steps to create a transition called Close between the In Progress and Closed statuses.

You should finish with a workflow that looks like the following screenshot:

How to do it…

At this point, the workflow is inactive, which means it is not being used by a project and you can edit it without any restrictions. Workflows are applied on a project and issue type basis. Perform the following steps to apply the new workflow to a project:

  1. Select the project to apply the workflow to.
  2. Click on the Administration tab to go to the project administration page.
  3. Select Workflows from the left-hand side of the page.
  4. Click on Add Existing from the Add Workflow menu.
  5. Select the new Simple Workflow from the dialog and click on Next.
  6. Choose the issue types to apply the workflow to and click on Finish.

After we have applied the workflow to a project, the workflow is placed in the active state. So, if we now create a new issue in the target project of the selected issue type, our new Simple Workflow will be used.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset