Good morning,
What Smart value would I use to pull the email attribute I have created for each object?
I have tried both {{object.email}}, {{attribute.email}} {{object(attribute.email)}} but to no avail. Does some have the right format for this?
Thanks
For this question, I will assume you have a "User" object type with these attributes:
Let's assume you also have a "Reporter Object" custom field of type Insight Object/s. This should have an IQL scope along the lines of "objectType = User"
Tip: Until Atlassian returns the Assign IQL custom field feature, you can use an automation to assign the Reporter Object automatically:
This is required for the Manager automation below. Ensure the "Allow this rule to be triggered by other rules" checkbox is ticked.
Let's discuss how to access the Email type attribute. There are now two types of rules in Insight for Jira cloud:
Right now, you cannot access the emailAddress property on User type attributes. So this works:
These are blank:
For issue rules, this can be worked around by:
Now you can use {{issue.Line Manager.emailAddress}}
This workaround for Insight Object rules is extreme:
In my tests, Automation complained about creating the issue took too long, so the Add Comment to Issue didn't take effect, so this mightn't work after all.
Not being able to access the emailAddress property of User attributes is probably just an oversight on Atlassian's part, as you can access accountId, ie. {{object.Manager.accountId}} works. I've raised a support request to address this but Atlassian works on their schedule, not ours.
Thanks @Alex van Vucht (GLiNTECH)
I appreciate the detailed response. This definitely helps me and I am now able to use the user email through a smart value!
Thanks!
Scot
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
FYI, Support raised [JSDCLOUD-10088] Object smart value for "User" doesn't return User email address. regarding being unable to access the emailAddress property of User type attributes of objects in Insight Cloud.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As a disclaimer, I am not using Insight, so my advice is about checking if the smart values are supported...
There are several open suggestions to add more Insight field support (link to Code Barrel backlog). Until more are added, you could use an example issue with your fields and call the REST API to see if the smart values are present. Here is the how-to article for that method:
https://support.atlassian.com/jira-software-cloud/docs/find-the-smart-value-for-a-field/
Best regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Bill Sheboy
This definitely let me test a few smart values which is really nice to see what works and what doesn't.
Thanks!
Scot
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.