Add ticket create notification event support
This commit is contained in:
@@ -22,8 +22,8 @@ final readonly class TicketStatusChangedPayload implements Arrayable
|
||||
public string $ticketUrl,
|
||||
public ?int $actorId,
|
||||
public ?string $actorName,
|
||||
public int $fromStatusId,
|
||||
public string $fromStatusLabel,
|
||||
public ?int $fromStatusId,
|
||||
public ?string $fromStatusLabel,
|
||||
public int $toStatusId,
|
||||
public string $toStatusLabel,
|
||||
public CarbonImmutable $occurredAt,
|
||||
@@ -35,7 +35,7 @@ final readonly class TicketStatusChangedPayload implements Arrayable
|
||||
* project: array{id: int, key: string, name: string},
|
||||
* ticket: array{id: int, key: string, title: string},
|
||||
* actor: array{id: int, name: string}|null,
|
||||
* from: array{id: int, label: string},
|
||||
* from: array{id: int, label: string}|null,
|
||||
* to: array{id: int, label: string},
|
||||
* ticket_url: string,
|
||||
* occurred_at: string
|
||||
@@ -61,10 +61,12 @@ final readonly class TicketStatusChangedPayload implements Arrayable
|
||||
'id' => $this->actorId,
|
||||
'name' => $this->actorName,
|
||||
],
|
||||
'from' => [
|
||||
'id' => $this->fromStatusId,
|
||||
'label' => $this->fromStatusLabel,
|
||||
],
|
||||
'from' => $this->fromStatusId === null || $this->fromStatusLabel === null
|
||||
? null
|
||||
: [
|
||||
'id' => $this->fromStatusId,
|
||||
'label' => $this->fromStatusLabel,
|
||||
],
|
||||
'to' => [
|
||||
'id' => $this->toStatusId,
|
||||
'label' => $this->toStatusLabel,
|
||||
|
||||
Reference in New Issue
Block a user