Skip to content

Commit ae2de76

Browse files
committed
Bug: Could not load a ticket by a soft deleted agent
1 parent 82b4cfc commit ae2de76

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Controllers/TicketsController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1840,8 +1840,8 @@ public function show($id)
18401840

18411841
if ($this->member->currentLevel() > 1 && $this->member->canManageTicket($ticket->id)) {
18421842
$all_c = clone $all_comments;
1843-
$a_reply = [(!is_null($ticket->owner) ? $ticket->owner->id : $ticket->user_id)];
1844-
$a_note = [$ticket->agent->id];
1843+
$a_reply = [$ticket->user_id];
1844+
$a_note = [$ticket->agent_id];
18451845
foreach ($all_c->get() as $comm) {
18461846
if ($comm->type == 'note') {
18471847
$a_note = array_merge($a_note, $comm->notifications->pluck('member_id')->toArray());

src/Views/tickets/show/body.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="card">
22
<div id="ticket-body" class="card-body">
33
<div class="d-lg-flex mb-2">
4-
<h2 class="mr-auto @if($ticket->agent->id == $u->id && $ticket->read_by_agent != "1") unread_ticket_text @endif">
4+
<h2 class="mr-auto @if($ticket->agent_id == $u->id && $ticket->read_by_agent != "1") unread_ticket_text @endif">
55
@if ($ticket->completed_at)
66
<span class="text-success"><span class="fa fa-check-circle" title="tiquet completat" style="cursor: help"></span> {{ $ticket->subject }}</span>
77
@else

0 commit comments

Comments
 (0)