Subtask inherit Project, Sprints
Hello,
I don't if what I want is possible, but I would like to create a workflow for when I create a subtask, this one inherits Project and Sprint from its parent. I would like to do it with the new online workflow javascript editor.
Any suggestion ?
Thanks in advance
Please sign in to leave a comment.
Hello Antoine, you can certainly do that using our JS workflows, please go ahead and let us know if you face any issues.
Here you can find a quick start guide: https://www.jetbrains.com/help/youtrack/incloud/2017.2/Quick-Start-Guide-Workflows-JS.html
Hello Liubov,
I already had a look at the quick start guide but I didn't find a way of doing what I want. What is the event handler for issue creation, because I need to attach my workflow on that event. And How do you know if it's a subtask or not ?
Thanks a lot
Hi, Antoine!
1) Use the Issue properties: https://www.jetbrains.com/help/youtrack/incloud/2017.2/v1-Issue.html#d186518e111 If you'd like your workflow to be triggered while you're creating an issue, use `!isReported`. If you'd like to trigger it right after creation, use `becomesReported`.
2) Check the issue `links` property to know whether it's a subtask or not.
Hello,
Thanks a lot I almost came to what I want. I am know able to inherit State and Sprints from parent task, but I still can't manage to inherit project, can you give me a hint on that ?
Thanks in advance
Could you probably share your code with me?
Thanks.
Yeah of course,
Hello Antoine, I'm sorry for the delay.
1) Please note that `.project` property name starts with a lower-case letter: `issue.project = parent.project;`
2) You need to fill the `requirements section` and write there required fields and values: https://www.jetbrains.com/help/youtrack/incloud/2017.3/requirements.html