Hi,
I'm trying to use the method shown in the image below with the help of "Automation for Jira" to sum up the values of a numeric custom field (for example customfield_11035) in tasks and display the total in their respective epics (parent). the automation executes correctly, but it consistently returns 0 (zero) as the result within my epics.
Do you have any suggestions on how to fix this issue?
1.
2. Audit log
If you have a better method for doing this task, I would be happy if you could suggest it to me.
Thank you.
You are using Jira Data Center, and not Jira Cloud, correct?
If so, the Lookup Issues action for your automation version only contains a few issue fields, and it does not contain most custom fields. Here is the suggestion to improve that: https://jira.atlassian.com/browse/JIRAAUTOSERVER-877
When the Lookup Issues action was added for Jira Cloud, it also only supported about a dozen fields. About a year later all of the remaining ones were added, so perhaps the same will happen for Jira Server / Data Center also.
For some work-arounds, use:
For your scenario, you will need the second one as you need to branch to the epic to perform the edit. Please see this how-to article to learn about that technique:
Kind regards,
Bill
Hi Bill,
Thank you for your attention and guidance.
Regarding the limitation of the lookup issue in automation that you mentioned, I think it may not be the cause of the problem in my case. The lookup action appears to be executed correctly, as indicated in the second picture I uploaded. The audit log confirms its success in finding the relevant child issues.
However, the issue arises in the subsequent step when the field edit action should be performed. Unfortunately, it fails to calculate correctly, consistently resulting in 0. As a test, I manually set the field value in the Epic (parent) to 40 and after triggering the automation with a new value in the tasks under that Epic, the value reverts from 40 to 0 again.
This leads me to suspect that there might be a problem in the final stage of the automation process. I would greatly appreciate any suggestions or guidance you may have.
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When a smart value does not exist, a rule often does not fail. Instead a value of null is substituted in its place. Only in cases where a null value would lead to an error does the rule fail. (Aside: this is one good reason to confirm the correct smart values are used, as a typo will not necessarily cause a rule error in the audit log.)
You can confirm those fields are likely empty by writing this to the audit log after your lookup issues action:
Looked up issues: {{#lookupIssues}}{{key}}: {{customfield_10305}}; {{/}}
This will iterate over the lookup results, writing the key and your custom field. I expect none of the custom field values will be included.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Bill,
I understand your explanation. I've tried your method to confirm the field in the audit log, and it returns null. I'm uncertain why Jira doesn't support these fields for lookup actions, given their widespread use. Thank you for your guidance and your time. King Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank for that information as it confirms my earlier hypothesis: the fields are not yet supported by the lookup issues action for Jira Data Center.
Please see the work-arounds I suggested earlier for alternatives.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check In the JSON update the {{lookupIssues.customfield_10305.sum }} to {{lookupIssues.<name of the field>.sum}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi marc,
Thank you for your consideration.
I've tried the method you suggested' but unfortunately the resault on the epic is still zero.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Taha,
This is one I use that works. You should be able to simply edit the field - and use sum instead of average like in my example.
Also, I would change over to Parent instead of Epic Link since that has been deprecated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John,
Thank you for your consideration. I've tried the method you suggested' but unfortunately the resault on the epic is still zero.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, I know mine works, so there is something in yours not right. haha. I suggest logging out the values for the fields before you do the summation to see what the values of the fields are.
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.