Clone does not fire workflow
We have a workflow that when we create an issue of type User Story, that creates a number of sub-tasks.
We noticed recently that when we CLONE an issue of type User Story, the workflow does not fire as we expected it to. The sub-tasks do not get created as we expect.
What are we missing? Do we need to modify the workflow “@jetbrains/youtrack-workflow-clone-issue” to perform the same functions?
Or is there some other method that we should pursue?
Thanks in advance!
Please sign in to leave a comment.
Test
Hi!
Cloning doesn't “create” a new issue, so it may not trigger the workflow's execution if “issue creation” serves as the condition there. As a simple workaround, you can modify the default cloning workflow like so:
This will attach the “cloned” tag to the cloned issue. As this will actually produce a change, you can use that tag to trigger another workflow. As a visual example:
This will immediately remove that tag and update the issue description. If you have your workflow in JS, you can use the hasTag method for the same purpose. You can provide the logic for creating new issues in the action section. Let me know if this doesn't seem clear.
Thank you, Stanislav. I'll give that shot.