fixed issue with disk test, now with correct fix for redirection after creation

This commit is contained in:
Mark Gregory
2026-06-25 12:04:01 +01:00
parent 9564676ed3
commit 85e8d96655
7 changed files with 56 additions and 18 deletions
+11 -5
View File
@@ -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;