Fix assigned_to=me filter not working from command palette
The command palette 'My Open Tickets' action navigates to ?assigned_to=me, but DashboardController only handled numeric IDs and 'unassigned', silently ignoring 'me'. Resolve 'me' to the current user's ID. Also update the active filter chip to display 'Me' instead of 'User #me'. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -142,10 +142,12 @@ class DashboardController {
|
||||
$createdBy = $this->validateUserId($_GET['created_by'] ?? null);
|
||||
if ($createdBy !== null) $filters['created_by'] = $createdBy;
|
||||
|
||||
// assigned_to accepts a numeric user ID or the special string 'unassigned'
|
||||
// assigned_to accepts a numeric user ID, 'unassigned', or the special string 'me'
|
||||
$assignedToRaw = $_GET['assigned_to'] ?? null;
|
||||
if ($assignedToRaw === 'unassigned') {
|
||||
$filters['assigned_to'] = 'unassigned';
|
||||
} elseif ($assignedToRaw === 'me' && $userId) {
|
||||
$filters['assigned_to'] = (int)$userId;
|
||||
} else {
|
||||
$assignedTo = $this->validateUserId($assignedToRaw);
|
||||
if ($assignedTo !== null) $filters['assigned_to'] = $assignedTo;
|
||||
|
||||
Reference in New Issue
Block a user