Hi everyone,
I’m trying to create a Jira Automation rule to update a custom field called BlockedTasks in an issue. The goal is to count all issues linked via “is blocked by” and increment BlockedTasks when the linked issue’s status is Done. Specifically:
BlockedTasks by 100The rule should:
BlockedTasks to 0 at the startBlockedTasks by 100 if the linked issue is DoneThe trigger for my rule is a status change.
I’ve tried referencing the field using {{issue.BlockedTasks}} and {{triggerIssue.BlockedTasks}}, but I keep getting the error:
Failed to get value for triggerIssue.BlockedTasks|0.plus(100)
I’m attaching a screenshot of my current rule for reference.
Any guidance on how to properly reference and update this field in the automation would be greatly appreciated!
Hello @Avi Morali
the reason this is not working is basically two things.
First, inside a Linked work items branch, {{issue}} is the linked issue, not the original one. Atlassian’s automation docs are clear on that. The original issue is only available there as {{triggerIssue}}.
Second, branches over multiple related issues run in parallel, so they are not a safe place to keep incrementing the same field on the parent issue. Atlassian explicitly says you cannot rely on changes between parallel branch executions. In practice that means multiple branch runs can read the same starting value and then overwrite each other.
One more small point for numeric calculations, Atlassian documents the {{#=}} ... {{/}} math-expression format. Your current value is not using that pattern.
Safer will be probably first run look up on linked issues in done and then set Field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.