Subtasks
This workflow automatically sets the state of a parent task to Open when a subtask is set to an unresolved state.
File Name | jetbrains-youtrack-subtasks |
---|---|
Auto-attached | yes |
Rules | Open parent task on any subtask open (stateless) |
Use Case
This workflow helps you manage the state of a parent task with unresolved subtasks.
Rules
When the state of an issue is set to an unresolved state, this rule checks whether the issue is linked as a subtask of a parent task. If the parent task belongs to an active project and has a resolved state, the state of the parent task is changed to Open.
Open parent task on any subtask open
rule Open parent task on any subtask open
when State != null && !State.isResolved && (State.oldValue != null && State.oldValue.isResolved) && subtask of.isNotEmpty {
var parent = subtask of.first;
if (parent != null && !(parent.project.isArchived()) && parent.isResolved()) {
parent.State = {Open};
if (parent.Type != null) {
message(l10n ( Automatically reopen {parent.Type} {parent.getId()} ));
} else {
message(l10n ( Automatically reopen {parent.getId()} ));
}
}
}
Last modified: 2 February 2017