Side-track an issue, seek clarification and proceed

In this recipe, you will learn how to sidetrack your issue from the workflow, seek clarification, get information, and proceed further.

Consider a case wherein an issue workflow you want to request clarification from any status and transition back to the originating status

Jira does not allow you to create the same transition, back to both the statuses, and you need to make sure that the issue is transitioned back to the originating status. JMWE can handle these using its workflow conditions and post-functions.

What do you need?

Configure

Consider the partial workflow shown in Figure 1. “Request Clarification” is the transition from “Open” and “In Progress” status to “Waiting for Clarification”.

Figure 1

1st Method - Create transitions to the originating statuses

Step 1: Create transitions to the originating statuses

As shown in Figure 2:

  1. Create a transition “Provide Info” from WAITING FOR CLARIFICATION status to OPEN status

  2. Create a transition “Provide Info ” from WAITING FOR CLARIFICATION status to IN PROGRESS status (note the space after the transition name)

Step 2: Show transitions just to the originating statuses

This step will ensure that after reaching the WAITING FOR CLARIFICATION status the right “Provide Info” transition is shown.

  1. Add the “Previous Status Condition” (of Atlassian in Cloud and of JMWE in Server) to the “Provide Info” transition

    1. Select OPEN status under “Previous Status” field

    2. Select “Most recent status only” option

    3. Click on “Add”

  2. Add the “Previous Status Condition” (of Atlassian in Cloud and of JMWE in Server) to the “Provide Info “ transition

    1. Select IN PROGRESS status under “Previous Status”

    2. Select “Most recent status only” option

    3. Click on “Add”

  3. Publish the workflow

Figure 2

 

 

2nd Method - Create an auto transition on the WAITING FOR CLARIFICATION status

As shown in Figure 3:

  1. Create a transition “Provide Info” from WAITING FOR CLARIFICATION status to itself

  2. Add the “Set field value” post-function to the “Provide Info” transition

    1. Select the “Field” as “Status”

    2. Select the “Value type” as “Groovy expression”

    3. Input the following script under “Value”:

      issue.getFieldHistory("status")?.last()?.fromString

       

    4. Click on “Add”

    5. Place the post-function after the "Set issue status to the linked status of the destination workflow step" built-in post-function.

    6. Publish the workflow

Changing the Status of an issue is normally done only through an issue transition. Changing the Status field value directly will not validate potentially required fields (such as the Resolution field). This should be used only in specific cases.

Figure 3

 

Related articles