Hello,
So I have an automation which sends an email with some information regarding a list of issues in shape of a table however when there is custom field, this value is the same for all issues. any suggestion?
Hi @Enache_ Bogdan _Allianz Services_
Welcome to community!
Information in doc https://support.atlassian.com/cloud-automation/docs/jira-smart-values-lists/ and https://support.atlassian.com/cloud-automation/docs/examples-of-using-smart-values-with-lists/ might be helpful for setting this up for a multi value custom field.
If it didnt help, can you share the details of the values you have in the automation?
yes, already checked, i can't figgure it out This is the code
<table><tr><th>Issue</th><th>Title</th><th>Status</th><th>Created</th><th>Created Δ</th><th>Updated</th><th>Updated Δ</th><th>Region</th></tr>{{#lookupIssues}}<tr><div style="text-align:center"><td><a><a href="{{url}}">{{key}}</a></a></td></div><td><a>{{summary}}</a></td><div style="text-align:center"><td><a>{{status.name}}</a></td></div><div style="text-align:center"><td><a>{{created.format("dd/MMM/yyyy")}}</a></td></div><div style="text-align:center"><td><a>{{created.diff(now).days}}</a></td></div><div style="text-align:center"><td><a>{{updated.format("dd/MMM/yyyy")}}</a></td></div><div style="text-align:center"><td><a>{{updated.diff(now).abs.days}}</a></td></div><div style="text-align:center"><td><a>{{fields.customfield_38901.value}}</a></td></div></tr>{{/}}</table>
Last column I get the same value for all items which should be different
Last column I get the same value for all items which should be different -> Is it that only the first choice of the multiselect is displayed?
try -> {{issue.customfield_38901.value}} intead?
already tried that, nothing is outputed.
from API:
"customfield_38901": [{"self": "https://jmp.allianz.net/rest/api/2/customFieldOption/521864","value": "APAC","id": "521864","disabled": false}]
And no "EU" is not the first option, the one that is displayed for all
As your table row is generating inside of the lookup issues iterator, this should work (depending upon the field type):
{{customfield_38901.value}}
However...what version of Jira are you using: Cloud, Server, or Data Center?
If you are using Server or Data Center, the lookup issues action does not support custom fields yet: https://jira.atlassian.com/browse/JIRAAUTOSERVER-877
In that case, the workarounds to access the custom fields are to use the bulk-issue option for branches / scheduled trigger, or to call the REST API issue search with JQL to access all the issue fields.
Kind regards,Bill
It looks like you're new here. Sign in or register to get started.