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 customizing 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.
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 the diagram mode.
The
following screenshot explains some of the key elements of the workflow designer:
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 status button.
2.
Select the In Progress status from the list and, click on Add.
You
can type the status name into the field, and JIRA will automatically find
the status for you.
3.Repeat
the steps to add the Closed status, as shown in the following screenshot:
3.
Repeat the steps to add the Closed status, as shown in the following screenshot:
Once
you have added the statuses to the workflow, you can drag them around to re
position
them
on the canvas. We can also create new statuses as follows:
1.
Click on the Add status button.
2.
Name the new status Frozen, and click on Add.
JIRA
will let you know if the status you are entering is new by showing the
text (new status) next to the status name.
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
3.
Name the new transition Start Progress, and select the None option for the
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:
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 (for example, Bug) 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.
No comments:
Post a Comment