Set Custom User Picker Field in Jira Server 9.4.24 with v2 API

Steve Rosenberry August 4, 2024

I'm trying to update the value for a custom user picker field on an issue using the REST v2 API and Jira Server 9.4.24.  Googling only seems to return answers for Jira Cloud and a lot of discussion about having to use the account ID of the user. 

Trying to extrapolate (unsuccesfully), I query for the user information using:

https://domain_name.com/rest/api/2/user/search?username=<user name>

The response does NOT include an account ID, so I'm at a loss there.

But I'm also not seeing a REST v2 API to set the value on a custom field of any kind.  Closest I found was:

POST /rest/api/2/field

to create a new custom field, but nothing to set a value on a custom field

 

Apologies if I'm just missing it...

1 answer

0 votes
Hans Polder _Devoteam_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 4, 2024

@Steve Rosenberry ,

Welcome to the community!

I think you should use (https://developer.atlassian.com/server/jira/platform/rest/v10000/api-group-issue/#api-api-2-issue-issueidorkey-put) as way to update an issue.

There is no such thing as 'accountID' in Jira DC/Server, so you'll likely have to use the email address or login name to set the field correctly. 

Also, keep in mind that the APIs for DC/Server work significantly different from how the Cloud APIs are setup, so definitely read through the DC/Server documentation and not the Cloud documentation: https://developer.atlassian.com/server/jira/platform/rest/v10000/intro/#gettingstarted

Good luck!

Hans Polder _Devoteam_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 9, 2024

@Steve Rosenberry ,

Any luck figuring it out? If so, kindly accept my answer to help others find it! :)

 

Suggest an answer

Log in or Sign up to answer