fixed issue with disk test, now with correct fix for redirection after creation
This commit is contained in:
@@ -6,6 +6,7 @@ namespace Modules\Helpdesk\Services;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Modules\Helpdesk\Models\Comment;
|
||||
use Modules\Helpdesk\Models\SlaPolicy;
|
||||
use Modules\Helpdesk\Models\Ticket;
|
||||
@@ -72,14 +73,19 @@ final class SlaService
|
||||
return;
|
||||
}
|
||||
|
||||
/** @var Comment|null $firstPublicComment */
|
||||
$firstPublicComment = Comment::query()
|
||||
/** @var \Illuminate\Database\Eloquent\Builder<Comment> $query */
|
||||
$query = Comment::query()
|
||||
->where('ticket_id', $ticket->id)
|
||||
->where('is_internal', false)
|
||||
->whereNull('tombstoned_at')
|
||||
->with('user')
|
||||
->oldest('created_at')
|
||||
->first();
|
||||
->oldest('created_at');
|
||||
|
||||
if (Schema::hasColumn('helpdesk_comments', 'tombstoned_at')) {
|
||||
$query->whereNull('tombstoned_at');
|
||||
}
|
||||
|
||||
/** @var Comment|null $firstPublicComment */
|
||||
$firstPublicComment = $query->first();
|
||||
|
||||
if ($firstPublicComment === null) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user