How to use a custom user property as a smart value?

Rhuan Barreto August 21, 2020

I made all steps to add a custom property to my user in order to use it in automation:

https://confluence.atlassian.com/cloud/update-roles-and-properties-for-jira-users-744721647.html

I tried using the {{assignee.property.blabla}} smart value but it didn't work.

I also found some reference about legacy properties called {{assignee.legacyProperty."jira.meta.blabla"}} but it didn't work.

Is there any way to solve this without using the REST API to set the property?

1 answer

0 votes
Yvan Martin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 27, 2020

Hi @Rhuan Barreto ,

Developer from Automation here.

User values in the Jira UI are actually those legacy properties you mentioned with {{issue.reporter.legacyPropeties.customValueHere}}, but we currently don't support those in cloud due to a lack of APIs. The new way of setting and using those values is using the user entity property API.

The new way to do this is to set the User entity property. The best docs to follow are:

https://developer.atlassian.com/jiradev/jira-platform/building-jira-add-ons/jira-entity-properties-overview

This is the curl command you would use:

curl -X PUT -H "Content-type: application/json" https://<My JIRA Cloud>.atlassian.net/rest/api/2/user/properties/customValueHere?username=adminUserName -d '"<the slack id"'

 

(You will need to ensure that you authenticate the request)

You can also store JSON objects if you need more rich information stored.

 

You can the access it via:

{{issue.reporter.properties.customValueHere}}

There is also an add-on provided by Atlassian labs that allows you edit the entity properties in the UI - https://marketplace.atlassian.com/plugins/com.atlassian.connect.entity-property-tool.prod/cloud/overview

 

Hope this helps.



Mykenna Cepek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 22, 2021

The add-on mentioned above is currently worthless for managing user entity data.

Like Rhuan Barreto likes this
Rhuan Barreto June 25, 2021

Have tried but it doesn't work. Could have something useful in Jira to do this.

Like Michael Bauer likes this

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