Add incident links to scheduled maintenance entries#4605
Add incident links to scheduled maintenance entries#4605Misrilal-Sah wants to merge 1 commit intocachethq:developfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds direct links from Scheduled Maintenance entries to their incident detail pages (/incident/{id}), aligning scheduled items with historical incidents and improving discoverability.
Changes:
- Wrap the scheduled maintenance “timeago” timestamp with an
<a>linking to the incident detail route.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @foreach($scheduled_maintenance as $schedule) | ||
| <div class="list-group-item"> | ||
| <strong>{{ $schedule->name }}</strong> <small class="date"><abbr class="timeago" data-toggle="tooltip" data-placement="right" title="{{ $schedule->scheduled_at_formatted }}" data-timeago="{{ $schedule->scheduled_at_iso }}"></abbr></small> | ||
| <strong>{{ $schedule->name }}</strong> <small class="date"><a href="{{ route('incident', ['id' => $schedule->id]) }}" class="links"><abbr class="timeago" data-toggle="tooltip" data-placement="right" title="{{ $schedule->scheduled_at_formatted }}" data-timeago="{{ $schedule->scheduled_at_iso }}"></abbr></a></small> |
There was a problem hiding this comment.
The incident route is defined as incident/{incident} (StatusPageRoutes), so passing ['id' => $schedule->id] will not bind the required {incident} parameter (it may generate a query string or throw a missing-parameter error depending on framework behavior). Use a positional parameter (route('incident', $schedule->id)), the correct key (['incident' => $schedule->id]), or $schedule->permalink (IncidentPresenter already provides this).
| <strong>{{ $schedule->name }}</strong> <small class="date"><a href="{{ route('incident', ['id' => $schedule->id]) }}" class="links"><abbr class="timeago" data-toggle="tooltip" data-placement="right" title="{{ $schedule->scheduled_at_formatted }}" data-timeago="{{ $schedule->scheduled_at_iso }}"></abbr></a></small> | |
| <strong>{{ $schedule->name }}</strong> <small class="date"><a href="{{ route('incident', ['incident' => $schedule->id]) }}" class="links"><abbr class="timeago" data-toggle="tooltip" data-placement="right" title="{{ $schedule->scheduled_at_formatted }}" data-timeago="{{ $schedule->scheduled_at_iso }}"></abbr></a></small> |
Issue link id: #4573
Description:
Planned maintenance entries now link to their incident detail page directly from the scheduled section.
This brings behavior in line with historical incidents and avoids forcing users to guess incident IDs for future maintenance events.