It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Getting error while create issue with environment field.

Hi Team,

I am trying to create issue using servicedesk API with following parameter:

URL: https://spherewms.atlassian.net//rest/servicedeskapi/request

Project Key - SS


POST Payload:

{
    "serviceDeskId":"1",
    "requestFieldValues":{
    "summary":"Test",
    "description":"Testing",
    "customfield_11802":{
              "value": "10905"

      }
},
    "requestTypeId":"59"

}

 

Here custom field(customfield_11802) represent the Environment in request type.

I am not able to create ticket in and getting this error,

{
   "errorMessage": "Unable to create request because of theses errors : Field with id    'customfield_11802' named 'Environment' has these errors : Option value '10905' is not    valid",
  "i18nErrorMessage": {
  "i18nKey": "sd.request.create.error.failed.msg",
  "parameters": [
   "Field with id 'customfield_11802' named 'Environment' has these errors : Option value     '10905' is not valid"
 ]
 }
}

Any help would be really great for me.

Regards

Arihant Jain

 

2 answers

0 votes

Have a look at the options for the environment field in the list of custom fields, I suspect you will find that you don't have a value with key 10905 on it.

0 votes

If 10905 is the option id then your json should be like this

 

{
    "serviceDeskId":"1",
    "requestFieldValues":{
    "summary":"Test",
    "description":"Testing",
    "customfield_11802":{
              "id": "10905"

      }
},
    "requestTypeId":"59"

}

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira Service Desk

Tell us how you've implemented Change Management

Hello Community 👋, I'm a product manager at Atlassian, looking at improving change management capabilities across our products. In particular, we're looking at bridging the gap between Dev & ...

326 views 0 6
Join discussion

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