Summary
With a custom Mon+Wed+Fri repeating task:
- Dragging the Wednesday occurrence to Thursday (scope = Only this) works correctly.
- Attempting to drag the Thursday occurrence back to Wednesday silently fails — the task stays on Thursday.
Root Cause (already analysed)
BackendConfigurationCalendarService.MoveTask scope = this always creates or updates a CalendarOccurrenceException keyed on OriginalDate = request.OriginalDate (the currently-displayed date).
When the task was first moved Wed Jun 10 → Thu Jun 11, exception E1 is created:
E1: OriginalDate=Jun10, NewDate=Jun11
The task now renders on Jun 11. When the user drags "Jun 11" back to Jun 10, the backend receives originalDate=Jun11, newDate=Jun10. It creates a new exception E2:
E2: OriginalDate=Jun11, NewDate=Jun10
But Jun 11 is not a natural occurrence of Mon/Wed/Fri — the occurrence calculator only matches exceptions against natural dates. E2 is therefore an orphan and has no effect. The task stays on Jun 11. E1 is never modified.
Fix required in MoveTask scope = this:
Before creating a new exception, check whether an existing exception has NewDate = request.OriginalDate (meaning a prior move placed the task at the current display date). If found:
- Update that exception's
NewDate = request.NewDate.
- Special case: if
request.NewDate == existingException.OriginalDate, delete the exception (task reverts to its natural date).
If no such exception exists, proceed with the current logic.
Files to fix:
BackendConfigurationCalendarService.cs — MoveTask method, scope = "this" branch (lines ~1739–1771).
Steps to reproduce
Use Playwright against http://localhost:4200. Login: <your-admin-email> / <your-local-admin-password>.
- Navigate to
/plugins/backend-configuration-pn/calendar.
- Create a new task. Set Gentag Tilpasset (Custom Repeat), select Mon + Wed + Fri. Save.
- Confirm three tiles appear: Monday, Wednesday, Friday.
- Drag the Wednesday tile to Thursday. In the scope dialog select "Only this". Confirm.
- Verify the Wednesday tile is gone and a Thursday tile has appeared.
- Now drag the Thursday tile back to Wednesday. In the scope dialog select "Only this". Confirm.
- Observe the result.
Expected: The task tile moves back to Wednesday.
Actual: The task remains on Thursday; the drag has no visible effect.
How to verify the fix
Playwright test (Angular e2e)
- Create a Mon+Wed+Fri task.
- Drag Wed → Thu (scope=this). Assert Thu tile visible, Wed tile gone.
- Drag Thu → Wed (scope=this). Assert Wed tile visible, Thu tile gone (back to original).
- Bonus: drag Wed → Thu again to confirm the round-trip can be repeated.
C# integration test
In BackendConfiguration.Test:
- Seed an ARP with
RepeatWeekdaysCsv = "1,3,5" (Mon/Wed/Fri), StartDate = 2026-06-08.
- Call
MoveTask with originalDate = "2026-06-10", newDate = "2026-06-11", scope = "this".
- Assert a
CalendarOccurrenceException exists with OriginalDate=Jun10, NewDate=Jun11.
- Call
MoveTask with originalDate = "2026-06-11", newDate = "2026-06-10", scope = "this".
- Assert the
CalendarOccurrenceException from step 3 is deleted (task reverted to natural).
- Assert NO orphan exception with
OriginalDate=Jun11 exists.
Summary
With a custom Mon+Wed+Fri repeating task:
Root Cause (already analysed)
BackendConfigurationCalendarService.MoveTaskscope =thisalways creates or updates aCalendarOccurrenceExceptionkeyed onOriginalDate = request.OriginalDate(the currently-displayed date).When the task was first moved Wed Jun 10 → Thu Jun 11, exception
E1is created:The task now renders on Jun 11. When the user drags "Jun 11" back to Jun 10, the backend receives
originalDate=Jun11, newDate=Jun10. It creates a new exceptionE2:But Jun 11 is not a natural occurrence of Mon/Wed/Fri — the occurrence calculator only matches exceptions against natural dates.
E2is therefore an orphan and has no effect. The task stays on Jun 11. E1 is never modified.Fix required in
MoveTaskscope =this:Before creating a new exception, check whether an existing exception has
NewDate = request.OriginalDate(meaning a prior move placed the task at the current display date). If found:NewDate = request.NewDate.request.NewDate == existingException.OriginalDate, delete the exception (task reverts to its natural date).If no such exception exists, proceed with the current logic.
Files to fix:
BackendConfigurationCalendarService.cs—MoveTaskmethod, scope ="this"branch (lines ~1739–1771).Steps to reproduce
Use Playwright against
http://localhost:4200. Login:<your-admin-email>/<your-local-admin-password>./plugins/backend-configuration-pn/calendar.Expected: The task tile moves back to Wednesday.
Actual: The task remains on Thursday; the drag has no visible effect.
How to verify the fix
Playwright test (Angular e2e)
C# integration test
In
BackendConfiguration.Test:RepeatWeekdaysCsv = "1,3,5"(Mon/Wed/Fri),StartDate = 2026-06-08.MoveTaskwithoriginalDate = "2026-06-10",newDate = "2026-06-11",scope = "this".CalendarOccurrenceExceptionexists withOriginalDate=Jun10, NewDate=Jun11.MoveTaskwithoriginalDate = "2026-06-11",newDate = "2026-06-10",scope = "this".CalendarOccurrenceExceptionfrom step 3 is deleted (task reverted to natural).OriginalDate=Jun11exists.