Skip to content

Fix #1398: Delete specific task instance in RoutineBuilder by checking#1613

Open
shabnam311 wants to merge 1 commit into
aryandas2911:mainfrom
shabnam311:fix/routine-task-deletion-bug
Open

Fix #1398: Delete specific task instance in RoutineBuilder by checking#1613
shabnam311 wants to merge 1 commit into
aryandas2911:mainfrom
shabnam311:fix/routine-task-deletion-bug

Conversation

@shabnam311

Copy link
Copy Markdown
Contributor

Description

This PR resolves #1398, where clicking the delete button on a specific scheduled task instance in the Routine Builder was mistakenly deleting all instances of that task on the same day.

Changes Made

  • Modified WeeklyGrid.jsx to pass the task.startTime into the onDeleteTask event handler, rather than just the taskId and day.
  • Updated the removeScheduledTask function in RoutineBuilder.jsx to accept startTime and include it in the .filter() logic.
  • The removeScheduledTask function now successfully targets and deletes only the specific task occurring at the precise time slot clicked by the user.

Testing

  • Dragged a "Read" task to Monday 9:00 AM and Monday 10:00 AM.
  • Clicked delete on the 10:00 AM task.
  • Verified that only the 10:00 AM task was removed, while the 9:00 AM task correctly remained in the grid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Deleting a single scheduled task in Routine Builder unintentionally wipes out all duplicate tasks scheduled on the same day

1 participant