Hi everyone,
I want to write a event-based action. Let me give some detail.
A is linked to B through relates to. C is the sub-task of the B. When a x field changes in C, I want to sum all x fields in B's subtasks and write the result a y field of A.
A
B
C
Although tester gives me the right result, it does not reflect on A's y field. What am I missing?
Thanks,
Below the details of my event based action;
the biggest issue is with the Value Nunjucks template for the Set Issue Fields post function:
The right Nunjucks expression is:
{% set total = 0 %}
{% for linkedIssue in targetIssue | linkedIssues("relates to", ["subtasks"]) %}
{%set total = total + (linkedIssue | subtasks("customfield_10205") | field("fields.customfield_10205") | sum) %}
{% endfor %}
{{ total }}
You might also want to select your sub-task issue type(s) in the "Scope" section, for better performance.
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.