Skip to content

[Bug]: completed recurrent task instance does not show in calendar_default view #2029

Description

@amglez

Bug Description

Exactly as the title says: when I wark a recurrent task as complete and it generates the next task data, the old completed instance disappears from the calendar view.

But it show's allright on the agenda view, for example.

Steps to Reproduce

  1. Have a recurring task with showCompletedRecurringInstances: true in the .base view options.
  2. Open the tasknotesCalendar view in any time-grid mode (timeGridDay, timeGridCustom, or timeGridWeek).
  3. Confirm the task's current scheduled instance is visible on the calendar.
  4. Mark the recurring task as complete (the plugin advances scheduled to the next occurrence and records the completed date in complete_instances).
  5. The completed instance disappears from the calendar. It does not show as a completed event.

When exactly this happens:

The instance always disappears when completing in timeGridCustom / timeGridDay (1-day view), because the completed date is always the last day of the 1-day range.

In timeGridWeek, it only disappears when the task is completed on the last day of the visible week (e.g. Saturday if the week starts on Sunday, Sunday if it starts on Monday).

The listWeek (agenda) view is not affected: completed instances always appear there regardless of which day they fall on.

Confirmed reproduction matrix (CEST = UTC+2):

View Completed today (Mon 15 Jun) Completed Sat 14 Jun
timeGridCustom, 1 day ✗ never visible
timeGridWeek Sun–Sat, previous week ✗ not visible
timeGridWeek Sun–Sat, current week ✓ visible
listWeek (agenda) ✓ visible ✓ visible

TaskNotes Debug Info


Affected Task Frontmatter

Relevant Bases File Content

filters:
and:
- file.hasTag("task")
formulas:
priorityWeight: if(priority=="none",0,if(priority=="low",1,if(priority=="normal",2,if(priority=="high",3,999))))
daysUntilDue: if(due, ((number(date(due)) - number(today())) / 86400000).floor(), null)
daysUntilScheduled: if(scheduled, ((number(date(scheduled)) - number(today())) / 86400000).floor(), null)
daysSinceCreated: ((number(now()) - number(file.ctime)) / 86400000).floor()
daysSinceModified: ((number(now()) - number(file.mtime)) / 86400000).floor()
isOverdue: due && date(due) < today() && status != "done"
isDueToday: due && date(due).date() == today()
isDueThisWeek: due && date(due) >= today() && date(due) <= today() + "7d"
isScheduledToday: scheduled && date(scheduled).date() == today()
isRecurring: recurrence && !recurrence.isEmpty()
hasTimeEstimate: timeEstimate && timeEstimate > 0
timeRemaining: if(timeEstimate && timeEstimate > 0, timeEstimate - if(timeEntries, list(timeEntries).filter(value.endTime).map((number(date(value.endTime)) - number(date(value.startTime))) / 60000).reduce(acc + value, 0), 0), null)
efficiencyRatio: if(timeEstimate && timeEstimate > 0 && timeEntries, (list(timeEntries).filter(value.endTime).map((number(date(value.endTime)) - number(date(value.startTime))) / 60000).reduce(acc + value, 0) / timeEstimate * 100).round(), null)
timeTrackedThisWeek: if(timeEntries, list(timeEntries).filter(value.endTime && date(value.startTime) >= today() - "7d").map((number(date(value.endTime)) - number(date(value.startTime))) / 60000).reduce(acc + value, 0).round(), 0)
timeTrackedToday: if(timeEntries, list(timeEntries).filter(value.endTime && date(value.startTime).date() == today()).map((number(date(value.endTime)) - number(date(value.startTime))) / 60000).reduce(acc + value, 0).round(), 0)
dueMonth: if(due, date(due).format("YYYY-MM"), "No due date")
dueWeek: if(due, date(due).format("YYYY-[W]WW"), "No due date")
scheduledMonth: if(scheduled, date(scheduled).format("YYYY-MM"), "Not scheduled")
scheduledWeek: if(scheduled, date(scheduled).format("YYYY-[W]WW"), "Not scheduled")
dueDateCategory: if(!due, "No due date", if(date(due) < today(), "Overdue", if(date(due).date() == today(), "Today", if(date(due).date() == today() + "1d", "Tomorrow", if(date(due) <= today() + "7d", "This week", "Later")))))
timeEstimateCategory: if(!timeEstimate || timeEstimate == 0 || timeEstimate == null, "No estimate", if(timeEstimate < 30, "Quick (<30m)", if(timeEstimate <= 120, "Medium (30m-2h)", "Long (>2h)")))
ageCategory: if(((number(now()) - number(file.ctime)) / 86400000) < 1, "Today", if(((number(now()) - number(file.ctime)) / 86400000) < 7, "This week", if(((number(now()) - number(file.ctime)) / 86400000) < 30, "This month", "Older")))
createdMonth: file.ctime.format("YYYY-MM")
modifiedMonth: file.mtime.format("YYYY-MM")
priorityCategory: if(priority=="none","None",if(priority=="low","Low",if(priority=="normal","Normal",if(priority=="high","High","No priority"))))
projectCount: if(!projects || list(projects).length == 0, "No projects", if(list(projects).length == 1, "Single project", "Multiple projects"))
contextCount: if(!contexts || list(contexts).length == 0, "No contexts", if(list(contexts).length == 1, "Single context", "Multiple contexts"))
trackingStatus: if(!timeEstimate || timeEstimate == 0 || timeEstimate == null, "No estimate", if(!timeEntries || list(timeEntries).length == 0, "Not started", if(formula.efficiencyRatio < 100, "Under estimate", "Over estimate")))
nextDate: if(due && scheduled, if(date(due) < date(scheduled), due, scheduled), if(due, due, scheduled))
daysUntilNext: if(due && scheduled, min(formula.daysUntilDue, formula.daysUntilScheduled), if(due, formula.daysUntilDue, formula.daysUntilScheduled))
hasDate: due || scheduled
isToday: (due && date(due).date() == today()) || (scheduled && date(scheduled).date() == today())
isThisWeek: (due && date(due) >= today() && date(due) <= today() + "7d") || (scheduled && date(scheduled) >= today() && date(scheduled) <= today() + "7d")
nextDateCategory: if(!due && !scheduled, "No date", if((due && date(due) < today()) || (scheduled && date(scheduled) < today()), "Overdue/Past", if((due && date(due).date() == today()) || (scheduled && date(scheduled).date() == today()), "Today", if((due && date(due).date() == today() + "1d") || (scheduled && date(scheduled).date() == today() + "1d"), "Tomorrow", if((due && date(due) <= today() + "7d") || (scheduled && date(scheduled) <= today() + "7d"), "This week", "Later")))))
nextDateMonth: if(due && scheduled, if(date(due) < date(scheduled), date(due).format("YYYY-MM"), date(scheduled).format("YYYY-MM")), if(due, date(due).format("YYYY-MM"), if(scheduled, date(scheduled).format("YYYY-MM"), "No date")))
nextDateWeek: if(due && scheduled, if(date(due) < date(scheduled), date(due).format("YYYY-[W]WW"), date(scheduled).format("YYYY-[W]WW")), if(due, date(due).format("YYYY-[W]WW"), if(scheduled, date(scheduled).format("YYYY-[W]WW"), "No date")))
urgencyScore: if(!due && !scheduled, formula.priorityWeight, formula.priorityWeight + max(0, 10 - formula.daysUntilNext))
timeTrackedFormatted: if(timeEntries, if(list(timeEntries).filter(value.endTime).map((number(date(value.endTime)) - number(date(value.startTime))) / 60000).reduce(acc + value, 0) >= 60, (list(timeEntries).filter(value.endTime).map((number(date(value.endTime)) - number(date(value.startTime))) / 60000).reduce(acc + value, 0) / 60).floor() + "h " + (list(timeEntries).filter(value.endTime).map((number(date(value.endTime)) - number(date(value.startTime))) / 60000).reduce(acc + value, 0) % 60).round() + "m", list(timeEntries).filter(value.endTime).map((number(date(value.endTime)) - number(date(value.startTime))) / 60000).reduce(acc + value, 0).round() + "m"), "0m")
dueDateDisplay: if(!due, "", if(date(due).date() == today(), "Today", if(date(due).date() == today() + "1d", "Tomorrow", if(date(due).date() == today() - "1d", "Yesterday", if(date(due) < today(), formula.daysUntilDue * -1 + "d ago", if(date(due) <= today() + "7d", date(due).format("ddd"), date(due).format("MMM D")))))))
views:

  • type: tasknotesCalendar
    name: Calendar
    order:
    • status
    • priority
    • due
    • scheduled
    • projects
    • contexts
    • file.tags
    • blockedBy
    • file.name
    • recurrence
    • complete_instances
    • file.tasks
      options:
      showScheduled: true
      showDue: true
      showRecurring: true
      showTimeEntries: true
      showTimeblocks: true
      showPropertyBasedEvents: true
      calendarView: timeGridWeek
      customDayCount: 3
      firstDay: 0
      slotMinTime: 06:00:00
      slotMaxTime: 22:00:00
      slotDuration: 00:30:00
      calendarView: timeGridCustom
      slotMinTime: 08:30:00
      firstDay: "0"
      customDayCount: 1
      listDayCount: 1
      slotMaxTime: 24:00:00
      todayColumnWidthMultiplier: 1.5
      scrollTime: 09:30:00
      showCompletedRecurringInstances: true
      showScheduledToDueSpan: true

Relevant Settings or Customizations

  • Timezone: Europe/Madrid (CEST, UTC+2 in summer)
  • firstDay: 0 (week starts on Sunday)
  • calendarView: timeGridCustom with customDayCount: 1 (primary affected view)
  • showCompletedRecurringInstances: true

Console Errors or Logs


Screenshots or Screen Recording

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions