Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,297,675
Community Members
 
Community Events
165
Community Groups

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

Edited

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

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.

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

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
Community showcase
Published in Jira Service Management

Coming Soon: Insight Changing to Assets

The 2020 acquisition of Mindville added powerful asset and configuration management capabilities to Jira Service Management in the form of Insight. Following the completion of that integration, custo...

178 views 1 7
Read article

Community Events

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

Events near you