When creating new workflows, it is easy to forget to set up issue resolution when a task is transitioned to status Done or Closed. Setting up task resolutions is important because reporting gadgets and add-ons require the Resolution field to be set. From this article you will learn about two ways of configuring issue resolutions in a workflow: using a workflow post-function and with a transition screen.
Configuration mistake - not setting up the Resolution field
Let’s begin with what happens when the field Resolution is not configured to be set in a workflow. To illustrate this, I will create a task which will be linked with an Epic.
If a workflow for this Task issue is not properly configured, when I transition the Task to status Done, the Resolution field will not change its value. You will see on the screen that the Resolution field value will be still ‘Unresolved’. Although on the issue screen Jira displays value ‘Unresolved’, it is not a real value but a way to inform a user that the task is not yet complete. Technically, the field is empty because it does not have any value.
Setting up Jira Resolution field automatically
The first way you are going to learn here is setting up Jira Resolution field automatically using a workflow post-function.
Click on the ‘View Workflow’ option to check the name of the workflow you are going to modify.
In our exercise the name is EXP: Task Workflow and this workflow I am going to select in the Jira administration panel. Go to Jira Administration / Issues / Workflow
In the edit mode, you need to select the transition which you want to be the resolving transition. This is normally the transition to the statues named Done or Resolved. Of course there can be also other custom Statuses.
After you select the transition, press on the workflow Post Functions.
In Post Functions select the option ‘Add post function’ and then select the Post Function called Update Issue Field. There you will select one of the resolutions to be assigned to the transition automatically.
Select one resolution which you will find suitable for your Jira workflow context.
In my example I selected a more universal resolution type which I called ‘Resolved’. In some simple workflow contexts it is not important to register resolution types such as Done, Cancelled, Won’t do etc. Sometimes all I want to know is that the issue (task, services request) is simply ‘resolved’ in whatever way. If I do not want to report on resolution types, I do not want to collect that information thus making the work of users easier - they do not have to select resolution types.
If you want to add more resolution types, go to Jira Administration / Issues / Resolutions and add the required resolution type there. On the screen below you can see the added resolution type ‘Resolved’
Having done the resolution field setting update, now when you transition the issue to the last status, the Resolution field will not be empty (i.e. Unresolved) but filled in with the configured resolution type automatically.
It is important to clear the Resolution field when a user transitions the issue back from the Done/Closed status to a previous available status. In this way we will inform Jira that the issue is not yet resolved so the reporting will properly calculate the issue data. In my case this will be the ‘In Progress’ transition.
To achieve that you follow the same procedure with a post-function. The difference is that you do not select a Resolution type by the first option ‘None'. In this way the resolution field will be cleared automatically again. Clearing the Resolution field on one of the returning transitions needs to be configured also when you set the resolution field manually as described below.
Setting up Jira Resolution field manually
When you want to give a user a choice to select one of many resolution types available, then the configuration will need to be made differently.
A user will be able to select one of available resolution on a special type of screen called the ‘transition screen’. It is a good practice to give this screen a name following your Jira instance naming convention.
This screen will only have one field inserted - Resolution.
Now you can go back to your workflow and edit this again. Now on the transition which you selected to be your resolving transition, press the button Edit to select the transition screen. Of course you need to remove the automatic post-function resolution field setting if there is one configured already.
In the field Screen, select the transition screen you created in one of the previous steps. Please notice how easy it is to find the screen if you follow a screen naming convention.
When you finish this step, publish the workflow and create another task to test the new configuration. Now when you transition the screen to the Done status, you will see a screen with the Resolution field on it. A user will not be able to continue the work unless one of the resolution types is selected. The list of resolutions can be limited and I am showing how to do it in another article.
Whichever resolution is selected on the screen, it will be now visible on the issue screen in section Details, field Resolution.
Before you go…
Configuring workflows is one of the most important configuration elements in Jira and setting up resolutions is a must-know for any Jira Administrator.