Hold an Issue, Seek Clarification, Then Proceed

In this recipe, you will learn how to sidetrack an issue from the overall workflow in order to put it on hold; this can represent a blocked status where an external problem must be resolved before proceeding, or a scenario where clarification is needed before work can continue. Because Jira does not natively support Blocked issues, the addition of an “on hold” status can be a powerful tool, especially when combined with dedicated columns or swimlanes in your Kanban board. This can provide distinct visual cues to the issues that require attention!

Alternately, you could use this setup to hide an issue from your Kanban board by setting up the “on hold” status under a status that is not included in the board (for example, a status under the To Do category).

This setup can be used for a variety of scenarios. For example:

  • Requesting more information before continuing work (this Recipe)

  • Blocking an issue that cannot proceed, for any reason

  • Pausing work on an issue that needs to be delayed, reassigned, or moved to a future sprint

In this example, the workflow is configured so that:

  • Only statuses that are in the In Progress category (blue status nodes in Figure 1, below) have transitions to a status labeled Waiting for Clarification - the “on hold” status.

  • All ingoing transitions to Waiting for Clarification use the same transition - a transition named Request Clarification).

  • Outgoing transitions from Waiting for Clarification use the formula “Return To” and the name of the original status (e.g. “Return to In Progress”)

In your Jira instance, the status values may be labelled differently, or you may have additional statuses that need to be connected to the “on hold” status. Or you may have multiple “on hold” status values (such as both Blocked and Waiting for Clarification). If you have different values, just substitute your status values in the steps below. If you need more than one “on hold” status, just repeat the steps below for each status.


Requirements

Note: The configuration requires a custom field that will store the name of the transition that should be used when the issue leaves the “on hold” status. This recipe uses a standard short text custom field and a post-function that creates a concatenated field value that enables transition names to be more clear. For example, you will create a standard transition from the In Progress status to the hold status Waiting for Clarification:

  • In Progress → (Transition) Request Clarification → Waiting for Clarification

The return transition from Waiting for Clarification to In Progress uses the original status value of “In Progress” to store a transition name that will return the issue to its original status:

  • Waiting for Clarification → (Transition) Return to In Progress → In Progress

Workflow configuration

Consider the workflow shown in Figure 1, right.

Waiting for Clarification is a status available to several points in the workflow - specifically to any status under the In Progress category (blue status nodes in the workflow). This configuration was chosen because at any point in the development process it may be necessary to sidetrack an issue while waiting for clarification on questions or problems.

Figure 1 - Workflow Configuration

 

1. Create custom field for tracking original status

  1. Log into your Jira Server instance as an Administrator.

  2. Click on the Settings icon in the upper right corner.

  3. Select Issues.

  4. In the left-hand panel, click Custom fields and click Create custom field in the upper right corner.

  5. From the list of Standard fields, select Short text (plain text only). Click Next.

  6. For the name, enter “Return Transition” (Figure 2, right). Enter a description if desired.

  7. Click Create.

  8. Associate the custom field with any screens that are used in the workflow being updated.

  9. Click Update.

Figure 2 - Add Custom Field

2. Open the workflow

 

 

3. Add Waiting for Clarification status and transitions

Open your workflow using the steps above, then follow these steps:

  1. In the upper-left hand corner of the workflow editor, click Add Status.

  2. Select Waiting for Clarification, and click Add.

  3. In the upper-left hand corner of the workflow editor, click Add Transition

  4. On the New Transition tab (Point 1, Figure 3, right), set the following options (Point 2, Figure 3, right):

    1. From status - Select In Progress.

    2. To status - Select Waiting for Clarification.

    3. Name - Enter “Request Clarification”.

  5. Add the Request Clarification transition from Code Review to Waiting for Clarification. In the Add Transition window, select the Reuse a Transition tab and select Request Clarification.

  6. Add the Request Clarification transition from Testing to Waiting for Clarification. In the Add Transition window, select the Reuse a Transition tab and select Request Clarification.

  7. Repeat Step 4, above, to add a transition from Waiting for Clarification to In Progress. Name the transition “Return to In Progress”.

  8. Repeat Step 4, above, to add a transition from Waiting for Clarification to Code Review. Name the transition “Return to Code Review”.

  9. Repeat Step 4, above, to add a transition from Waiting for Clarification to Testing. Name the transition “Return to Testing”.

 

4. Add a Set issue fields post-function to the “Request Clarification” transition

  1. In your workflow, add a post-function to the Request Clarification transition:

    1. When viewing the Workflow in Diagram view, select the Transition and click the Post Functions link. Click Add post function at the top of the list of existing post functions.

    2. When viewing the Workflow in Text view, click the name of the Transition then select the Post Functions tab. Click Add post function at the top of the list of existing post functions.

  2. Select Set issue fields (JMWE app) from the list and click Add.

  3. Configure the post-function as follows:

    1. Target issue(s) (Point 1, Figure 4, right) - Set to Current issue.

    2. Add field(s) (Point 2, Figure 4, right)- Select Return Transition.

    3. Options - Leave all options unchecked.

    4. Value (Point 3, Figure 4, right) - Enter {{ ["Return to ", transition.from_status] | join }}

    5. Click Add (Point 4, Figure 4, right).

    6. Send notifications - Configure as needed.

    7. Conditional execution - Configure as needed.

    8. Run as - It is recommended to leave this set to Addon user.

    9. Delayed execution - Configure as needed.

  4. Click Add.

 

5. Add a Scripted Condition to each outgoing transition

  1. In your workflow, add a condition to the Return to In Progress transition:

    1. When viewing the Workflow in Diagram view, select the Transition and click the Conditions link. Click Add condition at the top of the list of existing conditions.

    2. When viewing the Workflow in Text view, click the name of the Transition then select the Conditions tab. Click Add condition at the top of the list of existing post functions.

  2. Select Build-your-own (scripted) Condition (JMWE app) from the list and click Add.

  3. In the Jira Expression editor (Figure 5, right), click the Issue Fields tab of the Help section (Point 1, Figure 5, right).

  4. From the Select a field pulldown menu (Point 2, Figure 5, right), select Return Transition.

  5. Click the first box under Testing the field’s value (Point 3, Figure 5, right) to insert the code into the editor.

  6. Replace "A string" with "Return to In Progress".

  7. Click Add.

  8. Repeat steps 1 through 7 for the Return to Code Review and Return to Testing transitions, replacing “A string"in the code editor with the name of the transition.