Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Trying to use smart values to pull email attribute from Insight

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

2 answers

1 accepted

For this question, I will assume you have a "User" object type with these attributes:

  1. Name: default Text type attribute
  2. Email: Email type attribute
  3. Manager: User type attribute
  4. Atlassian User Account: User type attribute

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:

  1. When Value changes for Reporter:
  2. Edit issue:
    • Reporter Object: User = {{issue.reporter}}

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:

  1. Insight object rules: these are the new "When object changes" rules. Use {{object.Email}}
  2. Issue rules: for these, you must use Insight custom fields. So you'd use {{issue.Reporter Object.Email}}

Right now, you cannot access the emailAddress property on User type attributes. So this works:

  • {{issue.reporter.emailAddress}}
  • {{issue.Reporter Object.Email}} because this is accessing the Email attribute on the User object type.

These are blank:

  • {{object.Atlassian User Account.emailAddress}}
  • {{object.Manager.emailAddress}}
  • {{issue.Reporter Object.Manager.emailAddress}}

For issue rules, this can be worked around by:

  1. Create a "Line Manager" customfield of type User (single).
  2. Adding to the Reporter Object rule above:
    1. Re-fetch issue data
    2. Edit issue:
      • Line Manager: {{issue.Reporter Object.Manager}}

Now you can use {{issue.Line Manager.emailAddress}}

This workaround for Insight Object rules is extreme:

  1. When object changes
  2. If objectType = User
  3. Create an issue with:
    • Summary: Insight User Email Address workaround
    • Reporter: {{object.Atlassian User Account}}
  4. "For Most Recently Created Issue" branch:
    • Do what you need to do, eg. save the email address elsewhere or send an email, with {{issue.reporter.emailAddress}}. Attributes in the original updated object are still available
    • Then Permanently delete this issue

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

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.

Like Scot Michael Hirschman likes this

Hi @Scot Michael Hirschman 

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

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

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

Introducing External Collaboration for Confluence

We’re excited to introduce external collaboration for Confluence, now available in early access. It is available to preview for Confluence Cloud Premium and Enterprise customers. (If you're not on ...

199 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you