---
title: "Use cases for conditions"
canonical: "https://support.appfire.com/space/JMWE/461963628/Use%20cases%20for%20conditions"
format: markdown
---
> Macro (aura-html)

This section has use cases that help you understand the usage of the Conditions provided by JMWE.

### Current Status Condition

This condition can be used to <span style="color: #333333">hide/show a particular transition from the list of available workflow actions, based on the current status of the issue. </span>

**Sample use cases:**

#### :light_bulb_on: <span style="color: #172b4d">Disable a global transition from certain statuses</span>

<details>
<summary>Steps</summary>

|  |
| --- |
| - Add the `Current status condition` to the transition.
- Select the statuses from which the Global transition should be disabled from the `Current Status` field. |
</details>

#### :light_bulb_on: **Block issue transition from current status to itself**

<details>
<summary>Steps</summary>

|  |
| --- |
| - Add the Current status condition to all the transitions of the workflow, the issue follows.
- On each condition select the status in context
- Select the "Reverse Condition" option |
</details>

#### :light_bulb_on: **Allow users to transition the issue to Approve status only when the issue is in Verified status**

<details>
<summary>Steps</summary>

|  |
| --- |
| - Add the Current status condition to the transition "Approve".
- Select "Verified" status from the "Current status" field |
</details>

#### :light_bulb_on: <span style="color: #172b4d">**Block transition to 'On Hold' status when the issue is in 'Closed' status**</span>

<details>
<summary>Steps</summary>

|  |
| --- |
| - Add the Current status condition to the transition "On Hold".
- Select all the status(es) applicable to the current issue, except the 'On Hold' status. |
</details>

### Previous Status Condition

This condition can be used to hide/show a particular transition from the list of available workflow actions, based on the previous status of the issue.

**Sample use cases:**

#### :light_bulb_on:<span style="color: #172b4d"> Every task should be self-reviewed before passing it to the Project lead for a Peer-Review.</span>

<details>
<summary>Steps</summary>

|  |
| --- |
| - Add the `Previous status condition` to the transition leading to **Peer-Review** status.
- Select **Self-Reviewed** from the `Previous Status` field.
- Check the `Most recent status only` and `Include current status` options. |
</details>

#### :light_bulb_on:<span style="color: #172b4d"> I have statuses "Open" and "In Progress" that can transition to "Information Requested" status. I want to offer an identically named transition back to the originating status</span>

<details>
<summary>Steps</summary>

|  |
| --- |
| - Create "Provide Information" transition from *Information Requested* status to *Open *status*.*
- Create "Provide Information " transition from *Information Requested* status to *In Progress *status*. *Add a space at the end of this transition so that JIRA doesn't complain about duplicate transition names.
- On the *Provide Information* transition from *Information Requested* to *Open* status add *Previous Status Condition* to make the transition available only if the previous status was *Open*
  - Select `Open` as the `Previous status`
  - Select `Most recent status only`
- On the *Provide Information* transition from *Information Requested* to *In Progress* status add *Previous Status Condition *to make the transition available only if the previous status was *In Progress*
  - Select `In Progress` as the `Previous status`
  - Select `Most recent status only` |
</details>

### Separation of Duties condition

This condition can be used to enforce separation of duties (for SAS-70 compliance), i.e. to make sure that the same user cannot trigger two incompatible transitions on the same issue.

**Sample use cases:**

#### :light_bulb_on:* *<span style="color: #172b4d">Prevent a user who has triggered the "Resolve Issue" transition on an issue to trigger the "Close issue" transition.</span>

<details>
<summary>Steps</summary>

- Add the `Separation of duties condition` to the **Close issue** transition.
- Select the from_status of the **Resolve issue** transition from the `From Status` drop-down.
- Select the to_status of the **Resolve issue** transition from the `To Status` drop-down.
</details>

### Hide transition

This condition can be used to hide a transition from the user, so that it can only be triggered by a Transition Issue or Transition Linked Issues post-function.

**Sample use cases:**

#### :light_bulb_on:<span style="color: #172b4d"> Post-functions which transition an issue have a known limitation that the transition should not be associated with any transition screen. How to overcome this?</span>

<details>
<summary>Steps</summary>

- Create a duplicate of the original transition without the transition screen.
- Add the `Hide transition `condition to this new transition.
- When you want to trigger the original transition using a post-function, use this new transition instead.
</details>

#### :light_bulb_on:* *<span style="color: #172b4d">I want to hide a transition "Escalate" that gets auto-triggered when a code fix has been rejected.</span>

<details>
<summary>Steps</summary>

- Add the `Hide transition `condition to the **Escalate** transition.
</details>

### Scripted (Groovy) Condition

This condition can be used to hide/show a transition based on a [Groovy expression](https://appfire.atlassian.net/wiki/display/IN/How+to+write+a+groovy+expression). 

**Sample use cases:**

#### :light_bulb_on:<span style="color: #172b4d"> Only the Reporter of the issue should be able to close the issue. </span>

<details>
<summary>Steps</summary>

- Add the `Scripted (Groovy) condition `to the **Close issue** transition.
- Write this content in the `Groovy script.`
</details>

#### :light_bulb_on:<span style="color: #172b4d"> </span>Hide the transition from the current user if he does not belong to the Approvers

<details>
<summary>Steps</summary>

- Add the `Scripted (Groovy) condition `to the transition you wish to hide
- Write this content in the `Groovy script.`
</details>

#### :light_bulb_on: Block the transition when the Time to resolution is breached.

<details>
<summary>Steps</summary>

- Add the `Scripted (Groovy) condition `to the transition you wish to hide
- Write this script in the `Groovy script.`
</details>

#### :light_bulb_on:** Enable the "Start Progress" only on issues in the current sprint**

<details>
<summary>Expand</summary>

- Add the `Scripted (Groovy) condition` to the **Start Progress **transition.
- Write this script in the `Groovy script.`
</details>

#### :light_bulb_on:** Ensure at least one pdf file is attached before the issue can be transitioned**

<details>
<summary>Expand</summary>

- Add the `Scripted (Groovy) condition` to the **Start Progress **transition.
- Write this script in the `Groovy script.`
</details>

:light_bulb_on:**Show transition “Reject” for users of the “Management” project role and “jira-administrators” group only**

<details>
<summary>Expand</summary>

- Add the `Scripted (Groovy) condition` to the **Reject **transition.
- Write the following script in Jira expression field
</details>

###   
Related Issues Status Condition

This condition can be used to hide/show a particular transition from the list of available transitions, based on the status of the issue's related issues. 

**Sample use cases:**

#### :light_bulb_on:<span style="color: #172b4d"> Hide the "Close" transition of the Epic until all its Stories are closed.</span>

<details>
<summary>Steps</summary>

- Add the `Related Issues Status condition `to the `Close` transition.
- Select `Epic of the current issue `in `Which Issue(s)`
- Select the statuses the linked issues must be in from `Statuses`
</details>

### Related Issues Condition

This condition can be used to hide/show a particular transition from the list of available transitions, based on the issue's related issues. 

**Sample use cases:**

#### :light_bulb_on:<span style="color: #172b4d"> Hide the transition "In Progress" on an issue until it has at least 1 subtask under it</span>

<details>
<summary>Steps</summary>

- Add the `Related Issue condition `to the Create transition.
- Select `Sub-tasks of the current issue` option under `Which issue(s)`
- Add the condition
</details>