YouTrack InCloud 7.0 Help

Time Management

This workflow defines state transitions and notifications based on the amount of time an issue spends in a specific state.

File Namejetbrains-youtrack-timeManagement
Auto-attachedno
RulesTime Management (state-machine)

Use Case

This workflow was originally taken from a submitted request (JT-6331).

The user who submitted this issue wanted to track issues reported by customers, prospects and team members and make sure issues are resolved within a specific time frame.

When a customer reports an issue:

  • The support engineers have one hour to acknowledge the issue.
  • The support engineers then have four hours to reproduce the case or to engage in a discussion to reproduce it
    • If the issue is not reproduced within a day, then the support manager is involved and the sales department is notified.
    • After three days, the sales department organizes a customer visit to verify the issue on-site.
  • If the issue is classified as a bug, the issue is assigned to the R&D department.

Rules

This rule defines the state transitions for issue in the project and determines the amount of time an issue can spend in each state.

Time Management

  1. The initial state is Submitted.
  2. When the issue enters the Submitted state, the Subsystem field is set to Support. The support engineer is set as the Assignee.
  3. From the Submitted state, the issue can transition to one of the following states:
    • If the state is unchanged after one hour, the state is automatically set to Overdue.
    • On event (action) reproducing, the state is set to Open.
    • On event (action) incomplete, the state is set to Incomplete.
  4. When the state is set to Overdue, a notification is sent to the Assignee (if the issue is assigned), subsystem owner (if the owner of the Support subsystem is defined), or the Project Lead (if none of the previous conditions are true).
  5. From the Overdue state, the issue can transition to one of the following states:
    • On event (action) reproducing the state is set to Open.
    • On event (action) incomplete the state is set to Incomplete.
  6. From the Open state, the issue can transition to one of the following states:
    • If the state is unchanged after four hours, the state is automatically set to Wait for reproduce.
    • On event (action) approved the state is set to Approved.
    • On event (action) incomplete the state is set to Incomplete.
    • On event (action) can't reproduce the state is set to Can't Reproduce.
  7. From the Wait for reproduce state, the issue can transition to one of the following states:
    • If the state is unchanged after one day, notification is sent to the owner of the Support subsystem (if defined) or the Project Lead.
    • If the state is unchanged after three days, a separate notification is sent to the owner of the Support subsystem (if defined) or the Project Lead.
    • On event (action) approved the state is set to Approved.
    • On event (action) incomplete the state is set to Incomplete.
    • On event (action) can't reproduce the state is set to Can't Reproduce.
  8. When the state is set to Approved, the rule verifies that the Assignee is also set.
  9. From the Approved state, the issue can transition to one of the following states:
    • On event (action) fixed the state is set to Fixed state.
    • On event (action) obsolete the state is set set (should transit) to Obsolete state.
  10. From the Fixed state,the issue can transition to one of the following states:
    • On event (action) verify, the state is set to Verified state.
    • On event (action) reopen, the state is set to Open state.
  11. From Can't Reproduce, Incomplete, Obsolete and Verified states, the issue can transition to the Open state upon action reopen.
statemachine Time Management for field State { initial state Submitted { enter { Subsystem = {Support}; } exit { Assignee.required(l10n ( Responsible support engineer is required! )); } in 1 hour[always] do {<define statements>} transit to Overdue on reproducing[always] do {<define statements>} transit to Open on incomplete[always] do {<define statements>} transit to Incomplete } state Overdue { enter { var user; if (Assignee != null) { user = Assignee; } else if (Subsystem.owner != null) { user = Subsystem.owner; } else { user = project.leader; } user.notify(l10n ( Acknowledgment needed ), l10n ( Issue {getId()} is waiting for acknowledgment. )); } on incomplete[always] do {<define statements>} transit to Incomplete on reproducing[always] do {<define statements>} transit to Open } state Open { in 4 hours[always] do {<define statements>} transit to Wait for reproduce on approved[always] do {<define statements>} transit to Approved on incomplete[always] do {<define statements>} transit to Incomplete on can't reproduce[always] do {<define statements>} transit to Can't Reproduce } state Wait for reproduce { in 1 day[always] do { var user; if (Subsystem.owner != null) { user = Subsystem.owner; } else { user = project.leader; } user.notify(l10n ( Issue is not reproduced in 1 day ), l10n ( Issue {getId()} is still waiting for reproduction steps. )); // Notify sales? } in 3 days[always] do { var user; if (Subsystem.owner != null) { user = Subsystem.owner; } else { user = project.leader; } user.notify(l10n ( Issue is not reproduced in 4 days ), l10n ( Issue {getId()} is not reproduced, it's better to visit customer on his site. )); // Notify sales? } on approved[always] do {<define statements>} transit to Approved on can't reproduce[always] do {<define statements>} transit to Can't Reproduce on incomplete[always] do {<define statements>} transit to Incomplete } state Can't Reproduce { on reopen[always] do {<define statements>} transit to Open } state Incomplete { on reopen[always] do {<define statements>} transit to Open } state Approved { enter { Assignee.required(fail message); } on fixed[always] do {<define statements>} transit to Fixed on obsolete[always] do {<define statements>} transit to Obsolete } state Fixed { on verify[always] do {<define statements>} transit to Verified on reopen[always] do {<define statements>} transit to Open } state Obsolete { on reopen[always] do {<define statements>} transit to Open } state Verified { on reopen[always] do {<define statements>} transit to Open } }
Last modified: 29 September 2016