You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
In this example I am trying to pull the Users in the Manager Attribute which is of Type User. My thought is I should be able to pull the User ID into a variable and then send an e-mail using the variable. I have tried several ways of pulling the Account ID and so far have not been able to get any info from the Type User.
Although I am able to acquire what i need from the Member Attribute Type Object . Due to Label Value I am not able to search or display the value I would like. Changing the Label Value is not an option.
Any assistance with the ability to gather the User in the Manager Attribute would be greatly appreciated.
Thank you
So the issue of not being able to return values from Type User was due to a lack of permissions. To provide a bit of context, a user value returning unknown user means that the user that is running the rule does not have the Browse Users and Groups global permission.
Our automations are using the "Automation for Jira" Account and it did not have Browse Users and Groups permissions. The user Automation for Jira only belongs to the group "atlassian-addons-admin", as such our automations account lacked the ability to find user data from the account id/display name that is stored in the user attribute in assets.
That is interesting and useful information; thanks!
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 show what is appearing in the log details after you try those writes? Knowing that may help the community come up with suggestions. Thanks!
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The best I get is this [] an empty value
I have tried several options only to return nothing. This has been the most promising article I have found. It's also the article Atlassian support sent my way. Although every iteration attempted has returned and empty value
https://confluence.atlassian.com/jirakb/auto-populate-approvers-from-insight-objects-1072474097.html
{{lookupObjects.Manager.flatten.asJsonObjectArray("id")}}
{{lookupObjects.Manager.Jira user.accountId}}
{{lookupObjects.Manager.Jira user.accountId.get(0)}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Lookup Objects returns a list of things, and so first try accessing one item:
{{lookObjects.first.Manager.Jira user.accountId}}
Or the list of values like this
{{#lookObjects}}{{Manager.Jira user.accountId}}{{^last}}, {{/}}{{/}}
If that does not work, you may not have the correct smart values. Those are name, spacing, and case-sensitive, so perhaps try this how-to article to confirm the smart values: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Appreciate the help Bill, I still am not able to pull anything in to the logs for User Attribute Manager. But when using Object Attribute Member I am able to pull everything needed in.
Hope this explains it a little better, I am clearly missing something. I suspect its with how User reads a variable vs an Object
1: Eport from the IT Tools Team Object, Manager exports as First Name Last Name|| I was expecting an ID
2: Showing the team with multiple users in each attribute
3: Showing the Team Attributes
4: Automation being ran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is what was received by Atlassian support.
Anchal Chopra commented:
Hi Chad,
Thanks for the update!
After further troubleshooting, I am afraid, I found that we can't fetch the email address from a user-type attribute in Assets via Automation using smart values in order to use it in the "Send email" action due to the below bug:
At the moment, only accountId and displayName are returning results on Assets user attribute smart values.
We encourage you to add yourself as a watcher to be kept informed as to the state of the bug moving forward. That way, if the ticket is updated by our development team, you'll be notified via email. We have also added an internal note on the bug ticket referencing your case. You can also add a comment to the bug ticket to explain your specific use case to the product managers and the development team.
There are a number of factors that determine how Atlassian prioritizes bug fixes. You can learn more about this by reading our Atlassian Cloud Bug Fixing Policy.
As a workaround, as mentioned in the bug, you can create a separate text attribute in Insight to store the email address of the user and use that attribute to get the value. Sorry for the inconvenience.
On a side note, the shared smart value "lookupObjects.Manager.flatten.asJsonObjectArray("id")" would return the ids of the attributes that are used to update the Approver fields. In your case, adding a "Re-fetch Issue data" action after "lookup objects" would help fetch the refreshed value of the field. However, this won't help to send the email to the required Managers in the Assets objects.
Let me know if you have any queries I can help with. I'll be here to help.
Regards,
Anchal
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.