I am facing an issue while adding a custom field value Using Jira service desk APIs
getting the error message: "Unable to create request because of theses errors : The field 'customfield_10080' is not valid for this"
please check below code. I am using PHP for a scripting language GuzzleHttp for CURL request.
$client = new Client();
// parameters example
$requestArray['summary'] = 'Request created via Rest APIs';
$requestArray['description'] = 'I need a new *mouse* for my Mac';
$requestArray['labels'] = 'Computer';
$requestArray['customfield_10080'] = "32";
$result = $client->request('POST'
, 'https://dummy.atlassian.net/rest/servicedeskapi/request/'
, ['auth' => ['dummy@dummy.com', 'XXXXXX']
, 'json' => ['serviceDeskId' => 1, 'requestTypeId' => 15, 'requestFieldValues' => $requestArray]]);
$finalStory = \GuzzleHttp\json_decode($result->getBody()->getContents(), true);
print_r($finalStory);
exit;
@Pramod Kushwaha Is that custom filed in the scheme for the project and issue type associated with the request type?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.