---
title: "Create your first rule with JSU"
canonical: "https://support.appfire.com/space/JSU/12682464/Create%20your%20first%20rule%20with%20JSU"
format: markdown
---
> Macro (aura-html)

> ℹ️ This content is for JSU for Jira Server/Data Center. If you are using JSU on Jira Cloud, see our [JSU Cloud documentation](https://appfire.atlassian.net/wiki/spaces/JSUCLOUD/pages/12518241).

This sample scenario shows you how simple it is to add a JSU automation rule to a draft workflow. 

### Have you ever forgotten to close your subtasks before you close an issue?

Let’s see how we use JSU to automate the task of closing multiple subtasks under a parent issue.

Click the **Fullscreen** button to follow the interactive walkthrough below, or follow the steps in your test instance to see JSU in action.

> Macro (iframe)


### Step 1: Create a draft workflow and select a transition

Here, we select **Done (21)** in our Task Management workflow.

![Draft Jira workflow in Text view with the Done transition selected.](media://bf995fd2-2b64-413e-9f96-a3a493b07b83)

### Step 2: Add a post function

First, we select the** Post Functions **tab, then click **Add post function.**

![The Post Functions tab displayed for a draft Jira workflow.](media://93d92c20-9f27-477f-b27f-0471a4a78496)

### Step 4: Configure the post function

Configure the parameters:

- On the *Trigger transition on all issues related as* parameter, choose **Parent/Sub-task**.
- Select **All sub-tasks (issue in Transition must be parent)**.
- In the *Transition* drop-down menu, select **Done (21)** to ensure all subtasks would move to [done].
- Select your desired resolution status from the Resolution drop-down menu.
- Click **Add **at the bottom of the page.

![Example configuration for post function issue relation as described on this page.](media://3174d09b-9bb9-4c80-841e-3873310a13e9)

![The Transition option shown in the Linked Transition post function configuration page.](media://95b3d645-c57f-41d3-add4-55a0e5fe80c0)

### Step 5: Publish the workflow

Select **Publish** in the edit workflow banner at the top of the page.

![The draft workflow banner in Jira with the Publish button highlighted.](media://bf7bfa1b-22d3-46a7-a598-d82bb9f2908b)

### Step 6: Test the workflow

We have published our workflow, so now we need to set up an issue and create a few subtasks in our test project. 

Next, we move the parent issue to [done] and then see that JSU automatically moves all subtask statuses to [done].

## Try it out

Next, prepare your own test project and try it out for yourself. You can find more examples of JSU in action in our [use cases](https://appfire.atlassian.net/wiki/spaces/JSU/pages/12682671).