You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"title": "Fix filterType parameter not working in workspace devlogs API",
5
+
"type": "bugfix",
6
+
"description": "The filterType=open query parameter in the /api/workspaces/default/devlogs API endpoint is not being parsed or applied, causing the filter to be ignored. Users cannot filter devlogs by 'open', 'closed', or other FilterType values.",
7
+
"status": "done",
8
+
"priority": "high",
9
+
"createdAt": "2025-07-24T12:48:37.552Z",
10
+
"updatedAt": "2025-07-24T12:51:10.830Z",
11
+
"notes": [
12
+
{
13
+
"id": "ff9c006a-9eae-4eef-955d-24461dcdc6db",
14
+
"timestamp": "2025-07-24T12:49:27.720Z",
15
+
"category": "solution",
16
+
"content": "✅ **ROOT CAUSE IDENTIFIED**: The API route was not parsing the `filterType` query parameter.\n\n**SOLUTION IMPLEMENTED**: \n1. Added import for `filterTypeToStatusFilter` and `FilterType` from `@devlog/core`\n2. Added parsing logic for `filterType` parameter that converts it to appropriate status array using the utility function\n3. Logic properly handles precedence: `filterType` sets initial status array, but individual `status` parameter can override it\n\n**KEY CHANGES**:\n- `filterType=open` → converts to `status: ['new', 'in-progress', 'blocked', 'in-review', 'testing']`\n- `filterType=closed` → converts to `status: ['done', 'cancelled']` \n- `filterType=total` → no status filtering applied\n- Individual status values like `filterType=new` → converts to `status: ['new']`\n\nThe fix maintains backward compatibility and follows the existing filtering architecture.",
"content": "✅ **COMPREHENSIVE TESTING COMPLETED** - All acceptance criteria validated!\n\n**Test Results:**\n\n1. **✅ filterType=open works correctly**:\n - Returns devlogs with statuses: `new`, `in-progress`, `blocked`, `in-review`, `testing`\n - Test confirmed returned entries had `\"status\":\"in-progress\"` and `\"status\":\"new\"`\n\n2. **✅ filterType=closed works correctly**:\n - Returns devlogs with statuses: `done`, `cancelled`\n - Test confirmed all returned entries had `\"status\":\"done\"`\n\n3. **✅ filterType=total works correctly**:\n - Returns all devlogs regardless of status\n - Test confirmed mixed statuses: `\"status\":\"done\"` and `\"status\":\"in-progress\"`\n\n4. **✅ Individual status filterType works**:\n - `filterType=new` correctly returned only `\"status\":\"new\"` entries\n\n5. **✅ Backward compatibility maintained**:\n - Original `status=done` parameter still works correctly\n\n6. **✅ Precedence rules work correctly**:\n - `filterType=open&status=done` correctly prioritized `status` parameter\n - Returned `\"status\":\"done\"` entries (not open statuses)\n\n7. **✅ Combined filtering works**:\n - `filterType=open&type=bugfix` correctly filtered by both criteria\n - Returned entries with open status AND bugfix type\n\n**API Endpoint Verified**: `http://localhost:3200/api/workspaces/default/devlogs?filterType=open`"
26
+
},
27
+
{
28
+
"id": "9c6e6248-788a-4162-b3c7-4bda49f72517",
29
+
"timestamp": "2025-07-24T12:51:10.829Z",
30
+
"category": "progress",
31
+
"content": "Completed: ✅ **SUCCESSFULLY FIXED** filterType parameter not working in workspace devlogs API.\n\n**Problem**: The `/api/workspaces/default/devlogs` endpoint was ignoring the `filterType=open` query parameter because the API route wasn't parsing it.\n\n**Solution**: \n- Added import for `filterTypeToStatusFilter` and `FilterType` from `@devlog/core`\n- Added parsing logic that converts `filterType` to appropriate status array\n- Implemented proper precedence: filterType sets initial filter, individual status parameter can override\n\n**Validation**: All acceptance criteria tested and confirmed working:\n- ✅ filterType=open returns only open statuses\n- ✅ filterType=closed returns only closed statuses \n- ✅ filterType=total returns all devlogs\n- ✅ Individual status values work correctly\n- ✅ Backward compatibility maintained\n- ✅ Precedence rules work correctly\n- ✅ Combined with other filters works\n\nThe fix follows existing filtering architecture patterns and maintains full backward compatibility."
32
+
}
33
+
],
34
+
"files": [],
35
+
"relatedDevlogs": [],
36
+
"context": {
37
+
"businessContext": "Users need to be able to filter devlog lists by categories like 'open' (showing active work) and 'closed' (showing completed work) for better task management and visibility into work status.",
38
+
"technicalContext": "The DevlogFilter interface includes a filterType property that accepts FilterType values ('open', 'closed', 'total', or individual statuses), but the API route is not parsing the filterType query parameter from the request and adding it to the filter object passed to listDevlogsFromWorkspace.",
0 commit comments