How to access User Properties through Smart Values

Maciek Palicki January 18, 2021

Hi,

I'm trying to access a user property that I created as described here , but with no success.

I've found a way to access a user property added through REST API, but as the article above says - those are different properties (and also those are stored as JSON, and I just need a plain text).

Can You point me to how to use User Properties (added via GUI, not REST API) in i.e Automation scripts using Smart Values?

I've tried something like this, but with no success:

{{reporter.properties.someCustomProperty}}

Best Regards,

Maciek 

2 answers

1 accepted

0 votes
Answer accepted
Kian Stack Mumo Systems
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 18, 2021

@Maciek Palicki, there isn't a way to access these values through the automation smart values.  There is a  disconnect between the values stored in the API and the values defined in the UI. 

Maciek Palicki January 18, 2021

Thanks for fast reply.

This seems weird, because those values are basically useless then.

So I'll ask a slightly different question - is there a way to put just a string, not a json as a user property using REST API?

i.e I'd like to store discordID, and in automation just access {{reporter.properties.discordID}} which will return discordID, not a json?

Kian Stack Mumo Systems
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 19, 2021

@Maciek Palicki, sorry about the late response. 

Yes, it is possible to do that.

You'll need to use this rest API to set the property. My URL looked like this:

https://yourdomain.atlassian.net/rest/api/3/user/properties/<propertyName>?accountId=<accountID of account>.

You can find accountID's by performing a user search like follows:

https://yourdomain.atlassian.net/rest/api/3/user/search?query=<email address of user>

 

In the body, I just put "123".

 

The property name you define in the URL is how you will access the property in your automation rule. 

Screen Shot 2021-01-19 at 9.08.14 AM.png

This is what my comment looked like.

Screen Shot 2021-01-19 at 9.08.51 AM.png

Like Maciek Palicki likes this
4 votes
kevin May 4, 2021

For posterity's sake, for non-Cloud (i.e. Datacenter or Server) users... there is a way to access those UI properties through automation smart values. Specifically:

{{issue.reporter.legacyProperties."jira.meta.someCustomProperty"}}

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events