Versions Compared

Key

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

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

Goal

Place an issue on hold, and return it to its original status when ready

Scenario

You need to place issues in a holding status ('Blocked', for example) when work can not proceed. Additionally, when work is ready to restart you need to guarantee that the issue returns to its original status before being placed on hold.

Components

Set issue fields post function, Build-your-own (scripted) condition

Baseline

  • Your workflow must include a status specifically for holding issues outside the normal flow of work.

  • A custom field exists or is created to store the return transition for the issue (e.g. Return to In Progress).

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 (this use case)

  • Requesting more information before continuing work

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

Alternatively, you could use this setup to hide an issue from your Kanban board by setting up the “on hold” status value under a status that is not included in the board.

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 Blocked - the “on hold” status.

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

  • Outgoing transitions from Waiting for Clarification Blocked 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 labeled differently, or you may have additional statuses that need to be connected to the “on hold” status. Or you 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 holding status.

info

You are viewing the documentation for Jira Cloud.

On This Page

Table of Contents
minLevel1
maxLevel2
outlinefalse
typelist
printablefalse

Requirements

  • Jira Administrator login

  • Jira Misc Workflow Extensions for Jira Cloud

  • An updated workflow that includes an on-hold status such as Waiting for Clarification Blocked (Figure 1, right), or a workflow that can have this status added.

Info

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 use case 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 Blocked:

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

The return transition from Waiting for Clarification Blocked 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 Blocked → (Transition) Return to In Progress → In Progress

Workflow configuration

Consider the workflow shown in Figure 1, right.

Waiting for Clarification Blocked is a status available to at 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 the resolution of questions or problems.

Image RemovedsideTrack-Workflow.pngImage Added

1. Create a custom field for tracking

original

return status

Before updating your workflow, you need to add a custom field to your Jira instance; this custom field will store the name of the transition that should be used when removing the hold from an issue from a hold.

  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.

2. Open the workflow

Include Page
[Includes] Edit Workflow
[Includes] Edit Workflow

3. Add

Waiting for Clarification

Blocked status and transitions

In the following section you will add the Waiting for Clarification Blocked status, if it does not already exist. Additionally, you will add all necessary transitions to and from this status. If you need to create an new status, see this page: https://support.atlassian.com/jira-cloud-administration/docs/configure-statuses-resolutions-and-priorities/.

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 Blocked, 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 Blocked.

    3. Name - Enter “Request Clarification”“Blocked”.

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

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

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

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

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

Image RemovedsideTrack-AddTransition.pngImage Added

4. Add a Set issue fields post

-

function to the

“Request Clarification”

Blocked transition

In this section you will add a JMWE post-function to the Request Clarification transition. The Set issue fields post - function will update the issue being transitioned with the name of the transition that should be used when moving the issue out of the Waiting for Clarification Blocked status.

  1. In your workflow, add a post - function to the Request Clarification Blocked 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.Add field(s)

    2. Under Fields to update click Add (Point 2, Figure 4, right)- Select Return Transition.

    3. Options - Leave all options unchecked.

    4. .

    5. For Field, select Return Transition (Point 3, Figure 4, right).

    6. New Value (Point 34, Figure 4, right) - Enter the following script:
      {{ ["Return to ", transition.from_status] | join }}

    7. Click Add (Point 45, Figure 4, right).

    8. Send notifications - Configure as needed.

    9. Conditional execution - Configure as needed.

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

    11. Delayed execution - Configure as needed.

    12. Additional options - Leave blank.

  4. Click Add.

Image RemovedsideTrack-SetIssueFields.pngImage Added

5. Add a

Scripted

Build-your-own (scripted) Condition to each outgoing transition

The last step in this configuration is to add a condition to each of the outgoing transitions from Waiting for Clarification. These conditions will guarantee that only the transition back to the original status is available.

  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. Give your condition a description, if desired.

  4. Under Choose type select Jira Expression.

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

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

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

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

  9. Click Add.

  10. 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.

Panel
bgColor#E3FCEF

🎉 Congratulations!

You can now place issues in a holding status while awaiting resolution or information from outside your team. 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.

Image Removed

This can provide distinct visual cues to the issues that require attention!

sideTrack-ScriptedCondition.pngImage Added