Notify reporter to verify an issue
Implemented default workflow: 'jetbrains-youtrack-notifyReporterToApproveFix'. Not auto-attached by default. This workflow contains two rules, which both show how the use case can be implemented via Workflow:
- 'Send specific notification to reporter to approve fix' stateless rule, which partially covers the use case. This rule allows to send specific notification to the reporter and set him as an Assignee for the issue to be verified.
- 'State lifecycle with verification by reporter' statemachine rule, which implements a rough possible lifecycle of the State field for this use case, and reuses the mentioned stateless rule on one of transition steps.
Use case:
Originally, the use case is taken from the submitted request JT-7821.
It would be great if an issue reported by a user could be approved by the reporter.
- User A creates an issue.
- The issue is fixed, and status is set to fixed (and is built and deployed by TeamCity)
- When the ticket is deployed (in a test/stage or production environment) the status is set to "Pending verification in Test/production" (either manually by the developer or automatically based on some status information from TeamCity perhaps) and a notification is sent to User A.
- User A then test the issue in the suitable environment and determines that
- it is fixed and approves the issue and it is closed (or has a state of approved or something like it)
- it is still not working, and is returned to the developer as "not approved" (or project lead or something).
Send specific notification to reporter to approve fix
Implemented stateless rule:
When issue's updated, check if state just became 'Pending verification'. If true, then:
- Send notification to reporter
- Set reporter as Assignee for the issue.
State lifecycle with verification by reporter
Implemented statemachine rule:
This sample state-machine rule defines the following transitions for the issue's 'State' field:
- Initial state is Submitted
- From initial state issue can be transmitted to the following states only:
- On event (action) Open the state's value should be set (should transit) to 'Open' state.
- From the 'Open' state only the following transitions are allowed:
- On event (action) Fix the state's value should be set (should transit) to 'Fixed' state.
- When entering the 'Fixed' state, a YouTrack should force user to set 'Fixed in build' field.
- From the 'Fixed' state only the following transitions are allowed:
- On event (action) Send for verification the state's value should be set (should transit) to 'Pending for verification' state.
- When entering the 'Pending for Verification' state, set issue reporter as Assignee for the issue, and send him specific notification to approve the fix.
- From the 'Pending for Verification' state, only the following transitions are allowed:
- On event (action) Approve the state's value should be set (should transit) to 'Verified' state.
- On event (action) Don't approve, the issue should be assigned to the project's leader, and the state's value should be set (should transit) to 'Not approved' state.
- From 'Not approved' state the issue can be only transited to the 'Fixed' state upon action 'Fix'.
- From the 'Verified' state, no further state transitions allowed.