I trying to add a comment to a main issue with the number of SubTasks that I just processed in a SubTasks loop. I create a ProcessedSubTasks variable but can't seem to figure out how to increment the variable and display. Is it an EditIssue action? Something else?
@Tom Gross,
I did think that there was a way to increment a variable by creating one inside of the branching with the same name as a variable created outside of the branching, but I am having trouble getting that to work.
I'll look into it a little bit more.
Thanks,
Kian
I believe that is only possible for a branch on one-and-only-one-item (e.g., Current Issue, On Parent, etc.)
The reason is that all the other branches get run in parallel, and although the created variable from before the branch can be referenced / re-created, the value goes out of scope and starts over with each loop. Please look here for more information on that branching behavior: https://support.atlassian.com/cloud-automation/docs/jira-automation-branches/#Ordering-of-branch-executions
I have seen cases of using the counter to drive an advanced branch, and when the issues are then created inside of the branch the counter can be used...they are just not necessarily created in order. The technique does not work to update existing issues because nested branches are not possible.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Tom Gross -- Welcome to the Atlassian Community!
For a question like this, please consider posting images of your complete rule, the details of actions / conditions / branches, and of the audit log details showing the rule execution. Those will provide context for the community to offer suggestions. Thanks!
Without seeing those things...
Created Variables in rules can be created, not updated. There is an edge case where if you re-create a variable with the same name, you replace it.
However you seem to be describing using a branch over multiple things (e.g., issues, values, etc.) In that case, the branch will process asynchronously and in parallel. And the branch is not guaranteed to finish until the last point in the rule. What this means is that even if you update a variable, the value inside of the branch has no meaning after the branch (as it was repeatedly created/destroyed).
If you post images for your rule perhaps a work-around can be identified.
Kind regards,
Bill
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.