Dear Community,
I came across a small issue.
Basically, I need a rule to create two different issues with sub-tasks populated within each.
However, my rule duplicates subtasks in each created Story.
How to prevent this duplication, so the rule will create exact subtasks under the exact Story.
Here is the screen.
Dear Community,
Thank you for the prompt replies. I've found the solution to the issue. The problem with the "Most recently created work item" is that there are 2 Stories created at the same time, and this branch condition counts both of them, thus validating both for the subtask creation, which ends up with duplicates.
I came up with another solution, which is an additional IF condition.
During the creation of the Story, I populate the Description field with a unique value. Then I do the validation based on the content for this unique value.
This works best for this case.
Hi @Yahya Aliyev
Thanks for the question.
Your rule is creating duplicate subtasks because each branch is iterating over multiple issues. In your case, both “For: Current issue” and “For: Children” branches are causing the automation to re-run the “Create Sub-task” action for each created Story, which results in the same sub-tasks being added more than once.
For the solution, do this.
Trigger - Manual Trigger
Action - Create Story A
Branch - Most Recently Created Issue
Action: Create Sub-task 1
Action: Create Sub-task 2
And for the Parent field, use {{createdIssue.key}}.
And the same for the second block.
See the attached screenshot.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can simply go with the predefined "current work item" option in the "Parent work item field".
Of course, your suggestion is achieving the same result, but it's much more advanced for a person who is new to Jira Automation,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @Tudor Tofan
Yes, thanks, it is also working one.
I provide an advanced version, to become advanced :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Yahya Aliyev !
Your automation should look like this
If this solves your issue, please accept my answer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good day!
Can you clarify if that story is also created automatically when you trigger the automation rule manually?
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.