Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,370,158
Community Members
 
Community Events
168
Community Groups

Display Insight object custom field as smart values

Edited

I am using Automation to send emails which include specific fields from customer Requests. When attempting to add the Insight custom field, the only value returned is the Insight Key. I would like it to display the Insight name instead.

I have found other users with similar questions here and here, however their issue was that both the Key and the Name were displaying and they wished to correct that to only the Name.

My smart value code looks like this:

*Manager:* {{issue.customfield_10186}}

And the email comes across like this:

   Manager: IT-19666

I have attempted to add the .summary, however that returns only a blank field.

Any ideas on how I may get the Insight name to appear?

3 answers

3 votes
Mikael Sandberg Community Leader Dec 09, 2021

Have you tried using the lookup object to get the attributes for the object? I am using it to get a list of approvers when someone submits an access request for some of our tools. The automation I am using looks like this:

Screen Shot 2021-12-09 at 2.49.09 PM.png

Hi Mikael,

Thanks for the idea. Unfortunately that option doesn't work for my instance. Below you can see what my automation is accomplishing. I am using the smart values to add the details of the HR project request to the Description field of a new task in the IT project.

 

hrAutomation.png

 

And here is the new Task as it appears. Note that only the Insight object key is being shown, and not the Name:

 

issueCreated.png

Based on the Jira documentation, I should be able to display both the Key and the Name:

insightSmart.png

Update: please see my suggested answer. I misplaced it as a thread response rather than an independent answer.

Hey, @Greg 

If you change the following excerpt from the Description field, you should get the result you expect.

*Manager*: {{issue.customfield_10186.Name}}

I assume you have an attribute "Name" for the object type "Manager" in Insight. If you have two attributes, say "Name" and "Surname", then you should modify the smart values in Description as follows:

*Manager*: {{issue.customfield_10186.Name}} {{issue.customfield_10186.Surname}}

Please let us know how you handled your case. Your original post is from late 2021.

Regards,
Kalin

Hi @Kalin U ,

Thanks for the follow up.

I was able to get the field to display by formatting it as follows:

*Manager:* {{"Employee Manager".Name}

 ("Employee Manager" is the Insight Custom Field name in my instance)

I'm not sure anymore how I landed on this solution, but it has been working.

Thanks again,
Greg

Kalin U Rising Star Apr 15, 2022

Thanks for sharing your solution. The customfield_xxx format would work if it was referenced through {{lookupObjects}}. Your suggestion is perfect.

Regards,
Kalin

Suggest an answer

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

Atlassian Community Events