When you use Jira automation you can get a specific user properties using smart values, for example:
{{assignee.properties.property}}
Details are in this article https://support.atlassian.com/jira-software-cloud/docs/smart-values-users/.
But how to get properties of a specific user not predefined type of user using smart values? For example, I set property chatId for all users using API calls to https://our_domain/rest/api/3/user/properties/chatId and now I need to get chatId property for a particular user. How to achieve this?
For example, I can do this for assignee using this smart value:
{{assignee.properties.chatId}}
But I can't understand how to 'call' a specific user.
Hi @Alex F
Would you please clarify what you are trying to do? That will help the community consider this and provide input.
Your question indicated you wanted to access a user property with smart values, which you seem to have accomplished for chatId.
Then you note wanting to "call" a specific user. What do you mean by "call"?
Thanks, and best regards,
Bill
Hi @Bill Sheboy
Every user in Jira may have entity (custom) properties as described here https://support.atlassian.com/jira-software-cloud/docs/smart-values-users under 'Entity Properties' title.
You can set any property for a specific user through Jira API using this endpoint https://your_domain/rest/api/3/user/properties/your_property. For example, you need to add Skype ID for each user, then you can create a skypeId property and set a value for it for each specific user.
Then you can retrieve values of custom properties for each predefined user type, such as assignee, author, creator, initiator, reporter. For example, to retrieve the Skype ID value for the reporter of an issue you simply use the following expression:
{{reporter.properties.skypeId}}
My question is how to retrieve a value of a custom property for a specific user, such as John Doe, and not for a predefined type of user that was set through Jira API using a smart value. For example, how to get a value of the skypeId property using a smart value for John Doe? Such an expression doesn't work:
{{creator.john_doe.skypeId}}
I hope my question is clearer now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, Alex. That clarifies what you are trying to do, and I do not think you can do that for a user who is not already a specific actor for an issue/trigger, such as initiator, reporter, etc.
Since Atlassian implemented their GDPR changes, access to some of the user information is further restricted. Please see here for more details on this change: https://www.atlassian.com/trust/privacy/gdpr
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy,
I don't think that the lack of such a possibility is due to changes in the GDPR. Also you said that you don't think it's possible to do that for a user who is not already a specific actor for an issue, but a user may be a specific actor and there is still no a way to retrieve a value of a custom property for that particular user by their name using a smart value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, @Alex F for clarifying your request.
According to the work Code Barrel did on the item below, this should work. The only difference is for legacy and non-legacy property access. I checked and didn't see any open defects for cloud or automation on this issue.
https://codebarrel.atlassian.net/browse/AUT-83
I suggest submitting a support request to Atlassian as the way you are trying to access the property should work. Please post the solution back on this thread once they explain what is happening.
Thanks!
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.