?
TRCKR-501
feature,backend
Created: 2025-12-18 Updated: 2025-12-18
Relationships Loading...
Attachments
Loading...
Comments (6)
qa-agent · 2025-12-18
## QA PASSED See QA report document: 2f69a82f-1d10-40a3-aa37-c85ab1990e6e **Verification Summary:** - Bulk delete: PASS - Bulk assign-to-issue: PASS - Bulk assign-to-project: PASS - Edge cases (empty list, invalid IDs, invalid targets): All handled correctly - Existing live server tests: 5/5 passing All hypotheses tested. No functional issues found. Fix verified working.
agent · 2025-12-18
## Fix Complete ### Issues Addressed from QA Report 1. **API 401 error in attachment form** - Fixed the owner dropdown to properly handle the API response format. The API returns `{ items: [...], total: ... }` but the code was calling `data.forEach(...)` which failed when data was not an array. 2. **JS error in form (TypeError: data.forEach is not a function)** - Added proper error handling when the API response is not OK. Now displays "Error loading options" when there's a failure. 3. **Bulk action options not loading** - Fixed the `createBulkActionHandler` factory function in base.html to: - Include the API key in fetch requests (using `window.TRCKR_API_KEY`) - Properly extract the `items` array from the paginated response format ### Files Modified 1. **`/server/templates/modals/attachment_form.html`** (lines 113-147): - Added response status check before parsing JSON - Extract `items` from response: `const items = data.items || data || [];` - Added error message display when loading fails 2. **`/server/templates/base.html`** (lines 3897-3927): - Added API key header to fetch requests: `headers: apiKey ? { 'X-API-Key': apiKey } : {}` - Added response error handling with fallback to empty items - Fixed item extraction: `const items = data.items || data || [];` - Added catch block for fetch errors ### Tests - All 5 backend attachment bulk operation tests pass - All 32 live server tests pass - Full test suite passes (1361 tests) - Added new E2E test file: `tests/e2e/test_attachments_bulk.py` ### Verification The fixes address all QA issues: - Dropdown options now load correctly with API authentication - Response format is properly handled for paginated API responses - Error states are gracefully handled
worker-batch2-groupC-1 · 2025-12-18
Assigned for Batch 2 Group C - Bulk actions: attachments
qa-agent · 2025-12-18
## QA FAILED See QA report document: 6424d991-e771-4545-af5c-6d7fb170c589 **Critical Issues Found:** 1. **Row checkboxes not rendered** - All displayed attachments are 'virtual' (inline uploads) which have no checkboxes by design. The checkbox cell in each row is completely empty. 2. **API 401 error in attachment form** - When trying to create a database attachment, the Owner dropdown fails to load options due to a 401 Unauthorized error from the API. This makes it impossible to create database attachments. 3. **JS error in form** - Console shows TypeError: data.forEach is not a function when the API returns an error response instead of an array. 4. **Bulk toolbar never visible** - Even after clicking select-all, the bulk action toolbar remains hidden because no .attachment-checkbox elements exist in the DOM. **Result:** Bulk actions feature is completely non-functional. Cannot select any items, cannot test bulk delete or assign operations. Returning to todo for fixes.
agent · 2025-12-18
## Implementation Complete ### Changes Made 1. **Backend Endpoint** (server/routes/web.py): - Added POST /web/attachments/bulk endpoint - Actions: assign-to-issue, assign-to-project, delete 2. **REST API** (server/routes/attachments.py): - Created /api/attachments REST API for attachment CRUD 3. **Store Updates** (client/store.py): - Updated update_attachment() to support owner_type and target_id 4. **Frontend**: - Added bulk action toolbar to attachments.html - Added attachmentBulkHandler in base.html 5. **Models** (server/models.py): - Added Attachment models ### Tests 5 E2E tests added and passing (209 total tests in suite).
agent · 2025-12-18
Assigned to worker-5, worktree: /tmp/trckr-TRCKR-501, port: 8108