Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

How to access User Properties through Smart Values

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

@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. 

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?

@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

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
Community showcase
Published in Confluence Cloud

🎨 Add some visual life to your templates

Hi Atlassian Community, My name is Avni Barman, and I am a Product Manager on the Confluence Cloud team. Based on feedback from you, we are giving admins more power to create templates that a...

224 views 4 9
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