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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

How can I access a custom User Properties via Automation for JIRA?

Edited

Hello fellow Codebarrel users,

I have an issue trying to access the custom user key / value that i've added to User Properties in JIRA.

I have a key called <slackId> and the value (@someSlackName), but unable to access this value from the Automation for JIRA tool.

I have researched all the possible solutions mentioned here:

https://codebarrel.atlassian.net/browse/AUT-83

and here:

https://community.atlassian.com/t5/JIRA-Core-questions/How-do-I-access-a-User-entity-s-properties-set-via-API/qaq-p/92490

But could not get it to work.

https://<My JIRA Cloud>.atlassian.net/rest/api/2/user/properties/slackId?username=adminUserName -> would give me a 404 message

      The way you set the properties:

  1. Go to JIRA user management, choose the user you want.
  2. On the reset password button, have a drop down list with 2 options, View JIRA project roles and Edit JIRA properties.
  3. Select the second option and add the values and keys you want.

 

I have also seen the following post:
 
 

The user properties that can be set via the user profile page and the user properties exposed in the JIRA REST API are actually two completely different storage mechanisms, which explains why user properties set from EditUserProperties.jspa are not returned when you call the REST API.

 

Any help will be greatly appreciated.

 

 

 

1 answer

1 vote
Nick Menere
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Aug 06, 2017

Aleks is spot on. The properties set through the UI are considered a legacy feature.

In Server these can be accessed via:

{{issue.reporter.legacyPropeties.slackId}}

 

Unfortunately Jira deosn't expose these via REST so we can't access them in Cloud.

 

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/slackId?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.slackId}}

 

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.

 

Cheers,

Nick

Thank you Nick, your answer really helped me to find the solution.

Much appreciated.

Greg.

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 23, 2021

As of today, the Entity Property Tool mentioned above does not work for accessing User Entity data in Jira Cloud.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events