Smart Values not working as expected {{creator.displayName}} and {{assignee.displayName}}

Nils Herhaus
Contributor
April 23, 2024

Hi I want so send an personalized Email within a rule and address it to the ticket assginee. Neither of the following Jira Smart values is working. Did someone experienced this before?

  • Screenshot 2024-04-23 at 13.37.55.png
  • {{assignee.displayName}}

See the workflow attached

Best

Nils 

4 answers

1 accepted

2 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 23, 2024

Hi @Nils Herhaus 

Based on the rule you are showing, I hypothesize your trigger does not have JQL as you want to send one email with a list of issues for each assignee.

If that is correct, your email body is referencing the {{issue}} smart value, but that is not available.  For your case, I believe you should use the expression:

{{lookupIssues.first.assignee.displayName}}

 

Also please note: your branch variable appears to be named distinct.  It is a bad idea to use variables with the same names as existing smart values and rule functions, such as distinct.  The reason is they could collide with other values, leading to unexpected and undefined behaviors.

I recommend adding a prefix to all variable names to prevent this problem, such as:

varDistinct

 

Kind regards,
Bill

Nils Herhaus
Contributor
April 25, 2024

@Bill Sheboy thanks again. It worked. From where do you have this knowledge? I quite often experience things like this. I read the docu try to implement something according to it just to get stuck, because if you do things little different jira has a whole different behavior.

 

tbh I find this quite annoying...

 

But thx so much!

 

Bets Nils

Like Bill Sheboy likes this
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 25, 2024

Awesome; I am glad to learn that helped!

On automation knowledge, I agree the documentation has gaps and continues to improve over time.  My ways of learning about this product are:

  • Experiment...a lot :^)
    • I recommend creating a test project (and possibly a free account site) to try new things, with less risk of harming production data
    • When doing this, mostly try writing to the audit log rather than making issue changes.  This will help manage usage limits and allow faster rule development.
  • Search, watch, and read community posts
    • There is a product group for automation, which is great for articles on new topics
    • But most questions / solutions are in the other Jira areas
    • Add watches for anything with keywords like automation
    • Bookmark things you find which are useful
  • Periodically review the documentation pages
    • New features sometimes appear early on the documentation pages
    • Unfortunately, they do not show the last updated date / time, so re-reading is needed
  • Weekly - review the changes blog: https://confluence.atlassian.com/cloud/blog
  • Daily - review the status pages

Happy rule writing!

Like John Funk likes this
Nils Herhaus
Contributor
April 29, 2024

Hey, thank you so much for the detailed answer. I will have a look into these pages before I address my issues here :D.

 

But I am sure you will hear from me soon haha.

 

Best

Nils

Like John Funk likes this
1 vote
Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 23, 2024

Hi Nils,

Those smart values should work according to the documentation.

What's the result? I think you forgot to include that in your question.

Nils Herhaus
Contributor
April 25, 2024

The result is just an empty field. So it displays nothing

Like Amy Chamberlain likes this
Amy Chamberlain
Contributor
June 18, 2024

This is also happening to me @Charlie Misonne 

0 votes
Raj_ Rohit September 20, 2024

Same issue with me, {assignee.displayName}} not giving any output in slack and email messages

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 20, 2024

Hi @Raj_ Rohit -- Welcome to the Atlassian Community!

Context is important for automation rule questions.

I recommend creating a new question, linking back to this thread, and in your question include the following:

  • what problem are you trying to solve with the rule; that is, "why do this"
  • an image of your complete rule
  • images of any relevant actions
  • an image of the audit log details showing the rule execution
  • explain what is not working as you expect, and how you know that

Kind regards,
Bill

Raj_ Rohit September 20, 2024

Bill, 

I am creating automation rule and in my rule I am detection action of task created and once task created I am sending automate email using following smart value

*New Vendor request has been created*
1. Name: {{ issue.summary }}
2. Reported by: {{issue.reporter.displayName}}
3. URL: {{issue.url}}
4. Assigned To: {{assignee.displayName}}

In email output, all aforementioned 3 fields are populating however 4th one is reflecting black value in outcome.

 

However if I use action, task transition or task change then all fours values are populating in email body. this is totally a bug in Jira.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 20, 2024

Please post an image of the audit log details showing the rule execution.

Does the issue have any assignee at the time rule executes?

 

Finally, your rule appears to use the Issue Created trigger.  That trigger may fire so quickly that some data issue data may not yet be available to the rule.  The solution for that symptom is to always add the Re-fetch Issue action immediately after the Issue Created trigger.  This will slow down the rule a bit and reload the data before the rule proceeds.

0 votes
Amy Chamberlain
Contributor
June 18, 2024

Ditto - I have a field called "Vendor Name" and am using the smart value {{issue.Vendor Name.displayName}} in a number of comment automations, but it's spitting blanks.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 18, 2024

Hi @Amy Chamberlain 

Smart values are name, spacing, and case-sensitive...and, they often do not exactly match the display name of the field on the Jira pages.  When an incorrect smart value is used, that collapses to null, and often does not work as expected.

To learn the correct smart value (or custom field id) for your field, please use this how-to article: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

 

If that does not help solve the problem, please create a new question with "Ask the community" at the top of this page, including images of your complete rule, the relevant actions / conditions, and the audit log details showing the rule execution.  Those will create context for the community to offer suggestions.

 

Kind regards,
Bill

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 19, 2024

@Amy Chamberlain - It is better to create a new question so that more people will see it and answers can be tailored to your specific issue. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events