Good day!
I have an automation to run every month, that successfully looks up issues and emails them to me. The data I'm sending will eventually end up in a gsheet. I'm getting tripped up on the smartvalue syntax.
{{#lookupIssues}}
{{key}}, {{issue.customfield_13264.description}}
{{^last}}
{{/}}
{{/}}
Key/comma/linebreak are perfect. How do I get custom field values? None of the permutations I've tried works.
Thanks for your wisdom!
Glad it works!
You are looking up a list of issues. The fields you want to display are the key and the customfield. Since you already have an issue in context based on your query, you do not need to prefix the smartvalue with "issue.". That is why you have {{key}} instead of {{issue.key}}.
{{^last}}
{{/}} - effectively closes the lookup issue after all issues from the query have been identified.
Additionally, using ".value" instead of ".description" brings the custom field value into the results, as expected. Description would bring back the description provided in the custom field's configuration, if any, which does not give you what you are looking for. I hope this helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The first works! Is that the syntax for lookupIssues, leave off issue.?
I understand that {{/}} closes the #lookupIssues. Can you explain what this is saying?
{{^last}}
{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Fred
The {{^last}}something{{/}} structure allows you to conditionally do things inside of the list iterator. For example,
{{#lookupIssues}}{{key}}{{^last}}, {{/}}{{/}}
Will add a comma after each key value except for the last one; that is what the ^ last represents: not last.
Please refer here for more information on other operators for list management: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-lists/#Combined-function-examples
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.