---
title: "Use Cases for Conditions (Legacy)"
canonical: "https://support.appfire.com/space/JMWEC/465504168/Use%20Cases%20for%20Conditions%20(Legacy)"
format: markdown
---
> Macro (aura-html)

> 📝 **Note**: the Use Cases detailed on this page are still mostly valid! However, they are in the process of being updated, both in format and in specific Condition configurations that have been changed in recent JMWE updates.

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

### Build-your-own (scripted) Condition

This condition can be used to hide/show a transition based on a [Jira expression](https://appfire.atlassian.net/wiki/spaces/JMWEC/pages/465241623). 

**Sample use cases:**

#### :light_bulb_on:**Only the Reporter of the issue should be able to close the service ticket. **

<details>
<summary>Expand</summary>

- Add the `Build-your-own (scripted) condition `to the **Close issue** transition.
- Write this content in the `Jira expression`
</details>

#### :light_bulb_on: **Hide the transition from the current user if he is not in the Approvers field**

<details>
<summary>Expand</summary>

- Add the `Build-your-own (scripted) condition `to the transition you wish to hide
- Write this content in the `Jira expression.`
  Replace the custom field id with the id of the Approvers field in your instance
</details>

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

<details>
<summary>Expand</summary>

- Add the `Build-your-own (scripted) condition `to the transition you wish to hide
- Write this content in the `Jira expression.`
  where `customfield_10101 `is the id of the Time to resolution field.
</details>

#### :light_bulb_on:** Prevent the users from "Return/Exchange" on the purchase order after 15 days from the item delivery date**

<details>
<summary>Expand</summary>

- Add the `Build-your-own (scripted) condition `to the transition "Return/Exchange"
- Write this content in the `Jira expression.`
</details>

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

<details>
<summary>Expand</summary>

- Add the `Build-your-own (scripted) validator `to the **Start Progress **transition.
- Name the validator as “Check Sprint”
- Write the following script in Jira expression field
</details>

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

<details>
<summary>Expand</summary>

- Add the `Build-your-own (scripted) validator `to the **Start Progress **transition.
- Name the validator as “Check attachments”
- Write the following script in Jira expression field
</details>

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

<details>
<summary>Expand</summary>

- Add the `Build-your-own (scripted) validator `to the **Reject **transition.
- Name the validator as “Current user Project Role and Group”
- Write the following script in Jira expression field
</details>

### 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:** Disable a global transition from certain statuses**

<details>
<summary>Expand</summary>

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

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

<details>
<summary>Expand</summary>

- Add the `Current status condition` to all the transitions of the workflow, the issue follows.
- On each condition select all the status(es) from the `Current Status` field except the destination status of the current transition
</details>

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

<details>
<summary>Expand</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>

### Linked Issues Condition

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

**Sample use cases:**

#### :light_bulb_on:<span style="color: #707070">** **</span>**Hide the transition "Triage" until at least one assigned subtask is available for the issue**

<details>
<summary>Expand</summary>

- Add the `Linked Issue condition `to the "Triage" transition.
- Select the issue link type `is Parent Of` from the `Issue Link Type` field.
- Select the issue type as `Sub-task`
- Select the option "At least one linked issue must satisfy the condition below"
- Input the Jira expression:
</details>

#### :light_bulb_on:<span style="color: #707070">** **</span>**Hide the "Start Progress" transition on a ticket when there is an issue linked to it through the “is blocked by” link type**

<details>
<summary>Expand</summary>

- Add the `Linked Issue condition `to the "Start Progress" transition.
- Select the issue link type `is blocked by` from the `Issue Link Type` field.
- Select the option "Every linked issue must satisfy the condition below"
- Input the Jira expression:
</details>

#### :light_bulb_on:** For a parent of issue type “Story” hide the In Progress transition until all its subtasks are in “In Progress”**

<details>
<summary>Expand</summary>

- Add the `Linked Issue condition `to the "Start Progress" transition of the workflow.
- Select the issue link type `is Parent Of` from the `Issue Link Type` field.
- Select the option "Every linked issue must satisfy the condition below"
- Input the Jira expression:
</details>

### Linked 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 linked issues. 

**Sample use cases:**

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

<details>
<summary>Expand</summary>

- Add the `Linked Issue Status condition `to the `Close` transition.
- Select `is Epic of` as the `Issue Link`
- Select the "Closed" status from `Statuses`
</details>

#### :light_bulb_on:** Prevent the user from resolving the ticket, if there are any unresolved bugs associated to it.**

<details>
<summary>Expand</summary>

- Add the `Linked Issue Status condition `to the `Resolve `transition.
- Select `is blocked by` as the `Issue Link Type`
- Select `Bug` as the `Issue Type`
- Select the "Resolved" status from `Statuses`
</details>