Hello Brothers and Sisters,
I found the solution for my task in below article
Generally this automation with lookup and variable works perfectly except the one case.
This is my configuration:
JQL
project=cabr and status="DEPARTMENT HEAD REVIEW."
{{#lookupIssues}}<tr><td><a href="{{url}}">{{key}}</a></td><td><a href="{{url}}">{{summary}}</a></td><td><em>{{issue.customfield_10206.displayName}}</em></td></tr>{{/}}
In my email i need to send a list depends on the ticket STATUS -> it works
Depends on the status i want to show columns with ASSIGNE but for some statuses instead of assignee i wanna display custom field (single user picker) . In my lookup i use below smartvalue
{{issue.customfield_10206.displayName}}
THE PROBLEM. At the end email is sent with correct structured lists of tickets BUT my custom field values are not displayed in the email body...I tired differente syntax i.e
customfield_10206
customField_10206
issue.customfield_10206
etc but it doesnt fix my problem
Without seeing the details of all your rule actions, I see at least two problems with the rule you show:
First, when using a long-format iterator such as {{#lookupIssues}} ... {{/}} inside of that, the issue prefix is not used as the scope is the lookup itself.
Next, for Jira Data Center / Server automation rules, the Lookup Issues action only supports a limited number of fields, and none of those are custom fields. Here is the open JAC backlog suggestion to add the other fields: https://jira.atlassian.com/browse/JIRAAUTOSERVER-877
The possible workarounds to access the other fields depends upon a rule's structure:
Kind regards,
Bill
Hi @Bill Sheboy
I learned something again.
But strange that this does work in a DC I'm currently working in, and not using an issue lookup action within automation.
Another quirck!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Would you please clarify what you observed working with DC:
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use {{issue.<name of the field>.displayName}}, add a log action to see if this provides the correct name
Example, so if your field is named User, use {{issue.User.displayName}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi thanks for quick reply
{{#lookupIssues}}<tr><td><a href="{{url}}">{{key}}</a></td><td><a href="{{url}}">{{summary}}</a></td><td><em>{{issue.Department Head.displayName}}</em></td></tr>{{/}}My custom field is named "Department Head". Two words....not sure if its issue.
I added log action. But looks like all good... But still in the email values are not retreived
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do the accounts in your DC have a dIsplayName set?
I have tested this on my instance and I have a field manager and on using {{issue.Manager.displayName}}
I get the name set in attribute Display Name, what do you get on using API call:
https://<base_url>/rest/api/2/user?username=YOUR-USER-NAME
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
let me share just the last line of the log cause of sensitive data
avatarId=11802"},"displayName":"Mateusz Janus","active":true,"deleted":false,"timeZone":"Asia/Riyadh","locale":"en_US","groups":{"size":50,"items":[]},"applicationRoles":{"size":1,"items":[]},"expand":"groups,applicationRoles"}Is it possible that the problem is because of "Department Head" field name is 2-words field name?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No this should no impact.
Create as simple rule with a manual trigger add a log action and see what is displays on a single issue
If this work then add a mail action, just mail to yourself and see when using the smart values in the mail description the name is visible.
But if you use lookup, using {{issue.Department Head.displayName}} should provide the information in the mail, if this value filled and is on the screen (edit or view)
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.