settings updates, fixed
This commit is contained in:
@@ -69,7 +69,7 @@ final class WorkflowNotificationService
|
||||
*/
|
||||
private function hydrateTicketUsers(Ticket $ticket): void
|
||||
{
|
||||
if ($ticket->relationLoaded('owner') && $ticket->relationLoaded('agent')) {
|
||||
if ($ticket->relationLoaded('user') && $ticket->relationLoaded('agent')) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -81,7 +81,6 @@ final class WorkflowNotificationService
|
||||
|
||||
if ($userIds->isEmpty()) {
|
||||
$ticket->setRelation('user', null);
|
||||
$ticket->setRelation('owner', null);
|
||||
$ticket->setRelation('agent', null);
|
||||
|
||||
return;
|
||||
@@ -96,7 +95,6 @@ final class WorkflowNotificationService
|
||||
$agent = $ticket->agent_id === null ? null : $users->get((int) $ticket->agent_id);
|
||||
|
||||
$ticket->setRelation('user', $owner);
|
||||
$ticket->setRelation('owner', $owner);
|
||||
$ticket->setRelation('agent', $agent);
|
||||
}
|
||||
|
||||
@@ -105,7 +103,7 @@ final class WorkflowNotificationService
|
||||
return match ($role) {
|
||||
'agent' => $ticket->agent,
|
||||
'actor' => $actor,
|
||||
default => $ticket->owner,
|
||||
default => $ticket->user,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -119,7 +117,7 @@ final class WorkflowNotificationService
|
||||
'{{ ticket.category }}' => (string) ($ticket->category?->name ?? ''),
|
||||
'{{ ticket.project }}' => (string) ($ticket->project?->title ?? ''),
|
||||
'{{ ticket.team }}' => (string) ($ticket->team?->name ?? ''),
|
||||
'{{ requester.name }}' => (string) ($ticket->owner?->name ?? ''),
|
||||
'{{ requester.name }}' => (string) ($ticket->user?->name ?? ''),
|
||||
'{{ agent.name }}' => (string) ($ticket->agent?->name ?? ''),
|
||||
'{{ actor.name }}' => (string) ($actor?->name ?? ''),
|
||||
'{{ ticket.url }}' => route('helpdesk.tickets.show', ['ticket' => $ticket->getKey()]),
|
||||
|
||||
Reference in New Issue
Block a user