Workflow for setting subsystem when a issue is created

I want to create a workflow when a new issue is created. But I'm a bit lost.

I think it would be along the lines of:

when isReported() && subtask of.isNotEmpty {
    issue.SubSystem = subtask of.first.SubSystem;
}

But no go, anybody knows?
0
2 comments
Avatar
Permanently deleted user
Hello, Fredric!

For me the workflow works good: when I create new issue with "subtask of," WF successfully updated Subsystem from the parent issue.
Did you attach WF to the project? What YouTrack version do you use?
Could you send us YT logs (email: youtrack-feedback@jetbrains.com)

best regards,
Mikhail
0
If you want the workflow to only go on issue creating, but not go on existing issues try becomesReported() condition:
rule subtask subsystem 

when becomesReported() && subtask of.isNotEmpty {
  issue.SubSystem = subtask of.first.SubSystem;
}

You may also desire set Subsystem on subtask adding for draft, in such case try this:
rule subtask subsystem 
 
when !isReported() && subtask of.added.isNotEmpty { 
  if (Subsystem != null) { 
    Subsystem = subtask of.added.first.Subsystem; 
  } 
}


Please clarify the behavior that you expect.
0

Please sign in to leave a comment.