---
title: "JMWE Cloud: How to synchronize transitions between related issues"
canonical: "https://support.appfire.com/space/SUPPORT/3388375042/JMWE%20Cloud%3A%20How%20to%20synchronize%20transitions%20between%20related%20issues"
format: markdown
---
# JMWE Cloud: How to synchronize transitions between related issues

## Summary

This article explains how to use Jira Misc Workflow Extensions (JMWE) for Jira Cloud to synchronize transitions between related issues. It provides a generic approach for configuring an event-based action so that when one issue transitions, selected related issues can be transitioned to the same destination status when a valid matching transition is available.

## Use case: synchronizing transitions between related issues

In many Jira Cloud workflows, teams need related issues to remain aligned as work progresses. For example, when a source issue transitions to a new status, one or more related issues should transition to the same destination status. This guidance is intentionally generic: choose the relationship type, target issue scope, and workflow conditions that match your Jira configuration.

### Problem

Using the source issue transition ID directly doesn't always work because related issues may use different workflows or different transition IDs, even when the destination status has the same name. A more reliable configuration identifies the destination status from the source transition and then finds an available transition on each target issue that leads to that status.

### Solution

To reliably transition each target issue to the same destination status as the source issue, configure the event-based action to:

1. Identify the destination status of the transition that occurred on the source issue.
2. Fetch the available transitions for each target issue.
3. Find the transition on the target issue that leads to the same destination status.

#### Configuration steps

1. Go to **Jira settings** > **Apps** > **JMWE** > **Event-based actions**.
2. Create a new event-based action or edit an existing one.
3. Set the **Event type** to `Issue Transitioned`.
4. Add a **Transition issue(s)** post-function.
5. Configure the **Target Issue(s)** to select the related issues you want to synchronize, such as issues connected by a specific link type, JQL query, parent-child relationship, or another supported target selection method.
6. In the **Transition** section, select **Script**.
7. Use the following Nunjucks script to dynamically find the correct transition ID:

```jinja
{% set desiredStatus = transition.to_status %}
{% set availableTransitions = "/rest/api/3/issue/:key/transitions" | callJira(params={"key": targetIssue.key}) | field("transitions") %}
{% set matchingTransition = availableTransitions | find("to.name", desiredStatus) %}

{% if matchingTransition %}
{{ matchingTransition.id }}
{% else %}
{{ transition.transitionName }}
{% endif %}
```

### How the script works

- `{% set desiredStatus = transition.to_status %}`: captures the name of the status the source issue transitioned to.
- `callJira(...)`: makes a REST API call to Jira to get all valid transitions for the **target** issue.
- `| find("to.name", desiredStatus)`: searches the list of available transitions for one where the destination status name matches the `desiredStatus`.
- The script then returns the specific `id` of that transition for the target issue. If no match is found, it falls back to the transition name.

## Related articles

- [https://support.appfire.com/space/JMWEC/465473524/Event-based+actions](https://support.appfire.com/space/JMWEC/465473524/Event-based+actions)
- [https://support.appfire.com/space/JMWEC/465242612/Transition+issue(s)](https://support.appfire.com/space/JMWEC/465242612/Transition+issue(s))