Attempt to fix N+1 issues still there and more now
This commit is contained in:
@@ -11,7 +11,8 @@ final class CannedResponseRenderer
|
||||
{
|
||||
public function render(string $template, Ticket $ticket, ?User $actor = null): string
|
||||
{
|
||||
$ticket->loadMissing(['owner', 'agent', 'status', 'priority', 'category', 'project', 'team']);
|
||||
$ticket->loadMissing(['user.company', 'owner.company', 'agent.company', 'status', 'priority', 'category', 'project', 'team']);
|
||||
$actor?->loadMissing('company');
|
||||
|
||||
return strtr($template, [
|
||||
'{{ ticket.reference }}' => $ticket->reference,
|
||||
|
||||
Reference in New Issue
Block a user