# Notify Reporter to Approve Fix

> **Note: Availability**
> This workflow uses functionality that is only available using the JavaScript Editor. This means that it is unavailable for editing in the Workflow Constructor.
>
>
>
> To learn more about this workflow, refer to the corresponding page in our [Developer Portal](https://www.jetbrains.com/help/youtrack/devportal/Workflow-Notify-Reporter-to-Approve-Fix.html).

This workflow sends notification to the user who reported an issue when the issue is resolved.

| Name | @jetbrains/youtrack-workflow-notify-reporter-to-approve-fix |
| Auto-attached | no |
| Rules |      * Notify reporter to approve fix (on-change)    * Define transitions for "State" field for fixes that are approved by reporters (state-machine)    |

## Use Case

This workflow supports a process where reporters confirm whether delivered fixes resolve the issues they submitted.

The workflow uses the following sequence:

1. A reporter submits an issue.

2. A developer fixes the issue and applies the Fix action. The workflow sets the issue state to Fixed and requires the developer to specify a value for the Fixed in build field.

3. When the fix is ready to test, a user applies the Send for verification action. The workflow sets the issue state to Pending for Verification, assigns the issue to the reporter, and notifies them.

4.

The reporter tests the fix and chooses one of the following actions:

* Approve sets the issue state to Verified.

* Re-open returns the issue to the Open state.

## Rules

This workflow includes two rules. The first rule sends notifications and the second contains a state-machine rule that manages the lifecycle of an issue.

| Title | Description |
| --- | --- |
| Notify reporter to approve fix | This rule notifies the user who reported the issue and sets the reporter as the assignee.     When an issue is updated, this rule checks whether the state was changed to Pending verification. If true, then:        * The reporter is notified.    * The reporter is set as the Assignee of the issue.    |
| Define transitions for "State" field for fixes that are approved by reporters | This rule defines the lifecycle for issues to support this use case.     This rule defines the following transitions for issue states:       1. An issue starts with the state Submitted.     2.    From the initial state, an issue can only transition to the following state:       * On event (action) Open, the state is set to Open.       3.    From the Open state, an issue can only transition to the following state:        * On event (action) Fix, the state is set to Fixed.       4. When the state is set to Fixed, the user is forced to set the Fixed in build  field.     5.    From the Fixed state, an issue can only transition to the following state:        * On event (action) Send for verification, the state is set to Pending for verification.       6. When the state is set to Pending for Verification, the reporter is set as the Assignee. The reporter is notified and asked to approve the fix.     7.    From the Pending for Verification state, an issue can only transition to the following states:        * On event (action) Approve, the state is set to Verified.    * On event (action) Re-open, the state is set to Open.       8. From the Open state, the issue can only transition to Fixed.     9. From the Verified state, no further state transitions are allowed.    |

