fix(tags): Resolve tag deletion bug in remove-task command
Refactored the core 'removeTask' function to be fully tag-aware, preventing data corruption. - The function now correctly reads the full tagged data structure by prioritizing '_rawTaggedData' instead of operating on a resolved single-tag view. - All subsequent operations (task removal, dependency cleanup, file writing) now correctly reference the full multi-tag data object, preserving the integrity of 'tasks.json'. - This resolves the critical bug where removing a task would delete all other tags.
This commit is contained in:
@@ -149,7 +149,7 @@ async function addDependency(tasksPath, taskId, dependencyId) {
|
||||
}
|
||||
|
||||
// Check for circular dependencies
|
||||
let dependencyChain = [formattedTaskId];
|
||||
const dependencyChain = [formattedTaskId];
|
||||
if (
|
||||
!isCircularDependency(data.tasks, formattedDependencyId, dependencyChain)
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user