getsno / freshservice-api

API client for freshservice.com
MIT License
1 stars 1 forks source link

Does not support custom statuses #5

Closed clarg18 closed 1 year ago

clarg18 commented 2 years ago

->getTicketByEmail()

returns

Gets\Freshservice\Exceptions\FreshserviceException with message 'Unsupported status'

if the status is not one of the defaults provided.

clarg18 commented 2 years ago

Looks like these are hard-coded in the Ticket class.

    public const STATUS_OPEN = 2;
    public const STATUS_PENDING = 3;
    public const STATUS_RESOLVED = 4;
    public const STATUS_CLOSED = 5;
asamofal commented 1 year ago

Hi! Sorry for so long reply.

Regarding Freshservice API documentation only these statuses are available for the tickets. I didn't find the ability to create a custom status, is it possible?

image

UPD: oh, I found it: Admin > Field ManagerForm > Fields

asamofal commented 1 year ago

Supporting non-default values (for statuses or any other ticket fields) requires making an extra API call /api/v2/ticket_form_fields. I can say that the current implementation doesn't ready for that, it requires too many changes. This package was created to fit the requirements of my project, so there are only the entities/endpoints that my project is needed - this is a very little part of what is available on freshservice API. Unfortunately, I have no time to create and maintain a package with full API support. But you are free to fork this repo...