I need to get the value of the personal property bossusername of the user test (as in the screenshot).
I found an api method to get personal properties of users:
but this method finds nothing.
Then, I decided to create another user-property using the API method:
JSON BODY: "newprop"
now i can get the value of this property via API, but it is not visible through the UI.
It turns out these are two different custom properties that do not see each other. Now I need to add a property through the API so that it can be seen in the GUI.
Hello @Dmitrii Strukov
That screenshot you've provided looks like the user properties screen for their Jira account. Those are not the same user properties that are used by Jira Server that you can access via the REST API.
When you use:
Does the API return 'bossusername' in the list of available properties for that user?
If not, then you are confusing the two types of 'user properties'. Although it's not stated on the older Jira Server v2 documentation, the Jira Cloud v3 REST API documentation explains this:
Get user property
Returns the value of a user's property. If no property key is provided Get user property keys is called.
Note: This operation does not access the user properties created and maintained in Jira.
And, if you go to the Update roles and properties for Jira users page, it also explains the same thing, in reverse:
These user properties are not the same as the user properties accessed via the REST API.
The only way to read or change those user properties like bossusername is via the GUI. If you did create a new property called newprop for that user test in Jira Server, then it will never show up on that screen you have provided.
Hello @Dmitrii Strukov
Please read my answer again. You cannot use the REST API to change those custom properties visible in the GUI.
Please read the Update roles and properties for Jira users page, where it also explains the same thing, that you must use the GUI. From that page:
To add data to user properties:
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