Data Loss in Board import, export, and duplication
Environment
- FluentBoards Version 1.80.1
- WordPress Version 6.8.2
- PHP Version 8.1.29
- Test Date: September 1, 2025
Issue Summary
Both board duplication and JSON import/export fail to preserve task assignments and other data.
Bugs Found
Bug 1: JSON Import Strips Task Assignments
Expected: Task assignments preserved after import
Actual: 80-90% of assignments lost
Root Cause: Import generates new task IDs but doesn't updateΒ pivot.object_idΒ references in assignee data
Bug 2: Board Duplication Strips All Assignments
Expected: Duplicate preserves all task assignments
Actual: All assignments removed from duplicated board
Bug 3: Board Duplication Strips Board Description
Expected: Duplicate preserves board description
Actual: Board description removed from duplicated board
Data Loss Matrix
Method Preserves Assignments Preserves Description JSON Import β β Board Duplicate β βTechnical Analysis
JSON Import Assignment Bug
Import process:
- Generates new task IDs (e.g., 1-29 becomes 189-217)
- Fails to updateΒ
pivot.object_idΒ in assignee relationships - Assignment lookup fails becauseΒ
object_idΒ still references old task ID
Example:
// Before import
{"id": 8, "assignees": [{"pivot": {"object_id": "8"}}]}
// After import (broken)
{"id": 196, "assignees": [{"pivot": {"object_id": "8"}}]}
Task 196 cannot find assignees withΒ object_id: "8"
Reproduction Steps
For JSON Import Bug:
- Create board with 10+ tasks
- Assign a user to all tasks
- Export as JSON
- Import JSON to create new board
- Check assignments - most will be missing
For Board Duplication Bugs:
- Create board with tasks, assignments, and description
- Use "Duplicate Board" feature
- Check duplicate - assignments and description will be missing
Test Results
- Original template: 24 tasks with assignments
- After JSON import: 4 tasks kept assignments (16.7% success rate)
- After board duplication: 0 tasks kept assignments (0% success rate)
Impact
- Board templating completely broken
- No reliable backup/restore method
- Manual reassignment required after every copy operation
Suggested Fix
During import, updateΒ pivot.object_idΒ to match new task IDs:
foreach ($task['assignees'] as &$assignee) {
$assignee['pivot']['object_id'] = (string)$new_task_id;
}
Additional Notes
- Only 4/24 assignments survived import due to coincidental ID matches
- Manual assignment after import works correctly (proves assignment system works)
- No current workaround - both copy methods are broken
