Hello. I want to display the child value only from a cascading custom field in the email content of an automation rule that sends out emails. I tried adding "{{issue.customfield_1234.child.value}}" to email content but when the rule is triggered and email is sent out, that piece is empty. I also looked in the below to see if there was a smart value I could use but saw no mention of custom cascading fields. Any help would be greatly appreciated
Automation smart values - issues | Cloud automation Cloud | Atlassian Support
For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected. Those will provide context for the community to offer ideas. Thanks!
Until we see those...
If the field value and its child value are not empty, I would expect these two to work:
parent: {{issue.customfield_10105.value}}
child : {{issue.customfield_10105.child.value}}
Have you confirmed both are set?
Have you confirmed the custom field id is correct?
Kind regards,
Bill
Hi @Bill Sheboy
Adding a bit more details this Automation rule only has three parts. The trigger set every 7 days, a jql lookup, and the send email piece posted below. The Audit Log displays as success when I hit run rule button. Email is also successfully received with everything displaying in cells in table except the output from my custom field 30732 which appears empty. Tried setting both and can confirm issues have something listed in that cascading field
Hello,
See below for a list of requirements in 'Submitted', 'Section Review', or 'Branch Review' Status for over 2 weeks <a href=https://maestro.dhs.gov/jira/issues/?filter=131819> or click here to access filter to see Issues</a>
<table style="border-collapse: collapse" table-layout="fixed" width="80%">
<tr>
<th style="border: 1px solid #000000; background-color : #CDCACA" valign="middle" halign="center">Key</th>
<th style="border: 1px solid #000000; background-color: #CDCACA" valign="middle" halign="center">Summary</th>
<th style="border: 1px solid #000000; background-color: #CDCACA" valign="middle" halign="center">Status</th>
<th style="border: 1px solid #000000; background-color: #CDCACA" valign="middle" halign="center">Assignee</th>
<th style="border: 1px solid #000000; background-color: #CDCACA" valign="middle" halign="center">Section</th>
</tr>
{{#lookupIssues}}
<tr>
<td style="border: 1px solid #000000" valign="middle" align="center"><a href="{{url}}">{{key}}</a></td>
<td style="border: 1px solid #000000" valign="middle" align="center">{{summary}}</td>
<td style="border: 1px solid #000000" valign="middle" align="center"> {{status.name}}</td>
<td style="border: 1px solid #000000" valign="middle" align="center"> {{assignee.displayName}}</td>
<td style="border: 1px solid #000000" valign="middle" align="center"> {{issue.customfield_30732.value}}</td>
<td style="border: 1px solid #000000" valign="middle" align="center"> {{issue.customfield_30732.child.value}}</td>
</tr>
{{/}}
</table>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First thing: when inside of an iterator such as {{#lookupIssues}}...{{/}} do not add the {{issue. prefix to the fields. The scope is now the lookup and not the "current issue". Please try removing that and re-test:
<td style="border: 1px solid #000000" valign="middle" align="center"> {{customfield_30732.value}}</td>
<td style="border: 1px solid #000000" valign="middle" align="center"> {{customfield_30732.child.value}}</td>
If that does not help...
Are you using Jira Cloud or Jira Data Center? That is relevant because the Lookup Issues action for Jira Data Center does not yet support many fields, including custom fields.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just attempted retested with {{issue. prefix removed like in your script and no luck. And I'm using Data Center
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As noted, those fields are not available yet for Jira Data Center's version of Lookup Issues. Here is the suggestion to add them: https://jira.atlassian.com/browse/JIRAAUTOSERVER-877
There are two possible workarounds for this:
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.
Do you know if you indeed need lookupIssues for your rule.
Depending on the rule requirements, I have been able to do Branch->JQL to get access to data related to issue which is part of the trigger.
Something to consider. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I took a look at the workaround again and was able to build out successfully using first workaround (seen below) along with this posts to visualize Solved: Automation rule - send by mail a recap table with ... (atlassian.com)
when you need the data to send an email or message (like your case)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy also by chance have you heard of a smart value that can be used for Time in Status or Total Time in status to send out through automation rule email as added column? Did a quick search and didn't see anything. My guess is it might not be available as it's a field from vendor but figured just double check with you out of curiosity
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Adrian Avalos -- No, there is nothing built-in for time in status smart values.
For out-of-the-box features, process time measures for things like the built-in control chart are likely computed just-in-time from the issue history data. I do not believe they are in any fields or smart values that customers can access.
It is possible to add custom fields and compute the values with rules, although the solutions tend to be brittle when issues move forwards / backwards in flow. Simple solutions, such as Age of WIP are not too difficult to implement with rules: https://community.atlassian.com/t5/Automation-discussions/What-is-your-most-useful-automation-Here-is-mine/m-p/1561072#M34
I do not know how any of the marketplace addons compute the values, or if they are exposed as smart values (through custom fields) to automation rules.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Adrian Avalos
{{issue.customfield_1234.child.value}} is the correct syntax to reference child value.
Have you tried to confirm you have the correct customfield number?
Maybe reference the field directly..
{{issue.Your Field Name.value}}
{{issue.Your Field Name.child.value}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Kalyan Sattaluri I tried all the syntaxes you shared and no luck. Will not display in email being returned and can also confirm custom field number is correct
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.