zendesk / zendesk_api_client_php

Official Zendesk API v2 client library for PHP
336 stars 259 forks source link

Priority cannot be set in a new ticket (request) #459

Closed ktecho closed 12 months ago

ktecho commented 3 years ago

Hi,

I'm using last version of this library, and it works very well. I'm listing the issues, getting a ticket details and creating new tickets using Requests.

For this last operation (creating a new request), the ticket is created with the subject and description that I send, but the priority is not set in the ticket. I'm doing this:

        $zendeskClient = new ZendeskAPI('my_subdomain');
        $zendeskClient->setAuth('basic', [
            'username' => 'email@domain.com,
            'token' => 'myToken'
        ]);

        $newTicketData = [
            'subject'   => $subject,
            'comment'   => [
                'body'  => $description
            ],
            'priority'  => $priority,
        ];

        $newTicket = zendeskClient->requests()->create($newTicketData);

If you see the new ticket in Zendesk portal or check the $newTicket variable with the created ticket, the priority field is empty. I've checked the ticket events and there is nothing there that has emptied the priority field.

Is there a way to see the URL and parameters that are sent to the Zendesk API so I can see if everything is ok?

Did any of you had this issue before?

Thanks!