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

I'm using the service desk API . How do I add values to the custom fields?

Chinmayi Shetty April 29, 2022

I'm have to create a Jira request for the custom fields? How do I get the custom field values in backend in getter and setter?

"fieldId":"customfield_10600", "fieldId":"customfield_11318",

Eg : customfield_10600 stores email value and 

customfield_11318 stores the phone number val

Thanks 

2 answers

2 votes
Matthias Gaiser _K15t_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 29, 2022

Hi @Chinmayi Shetty

welcome to the Atlassian Community.

I'm assuming you're using this REST API (POST /rest/servicedeskapi/request) to create a customer request, right?

In order to get the values to provide to the REST API, you can call GET /rest/servicedeskapi/servicedesk/{serviceDeskId}/requesttype/{requestTypeId}/field.

Let us know if that works,
Matthias.

0 votes
Chinmayi Shetty April 29, 2022

Hi @Matthias Gaiser _K15t_ ,

Thank you for the reply.

I want to set values to the custom fields and they  are part of 

requestFieldValues object and there are multiple custom fields. The values are being added to summary and description using do Post and there a being done on creation of the ticket.
Will the field be fieldID  in /rest/servicedeskapi/servicedesk/{serviceDeskId}/requesttype/{requestTypeId}/field.  ?
https://jira.hyundai-autoever.eu/rest/servicedeskapi/request")


image.png
Thanks,
Chinmayi
Matthias Gaiser _K15t_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 29, 2022

Yes, the fieldId is the ID which you'll have to pass as the REST API docs explain for requestFieldValues:

JSON map of Jira field IDs and their values representing the content of the request.

I hope that helps.

 

PS: If you reply directly to an answer, you get nice answer threads :)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events