Skip to content

fix(dashboard): hide cancelled events in upcoming events widget - #9204

Open
1358 wants to merge 1 commit into
nextcloud:mainfrom
1358:fix/dashboard-hide-cancelled-events
Open

1358 wants to merge 1 commit into
nextcloud:mainfrom
1358:fix/dashboard-hide-cancelled-events

Conversation

@1358

@1358 1358 commented Nov 11, 2026 •

Copy link
Copy Markdown

Summary

#2819 hid cancelled events on the dashboard, but only in the JS widget. Since 4.6.0 the dashboard renders the widget from the API (CalendarWidget::getItems()), and the JS widget was removed later. The API widget does not check STATUS, so cancelled events show up again as if they took place (reported again in #3226 for 4.6.6).

This skips objects with STATUS:CANCELLED when looking for the next occurrence:

  • cancelled single events and cancelled series are hidden
  • if only the next occurrence of a series is cancelled, the widget shows the following one

Please backport to stable6.6

Testing

  • New unit test testGetItemsSkipsCancelledEventsAndOccurrences, fails without the change
  • Nextcloud 35.0.2 with Calendar 6.6.5: events created via CalDAV (single event cancelled, series cancelled, one occurrence of a series cancelled), checked with /ocs/v2.php/apps/dashboard/api/v2/widget-items

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (N/A)

The filter for cancelled events from nextcloud#2819 lived in the JS widget,
which is no longer used since the dashboard renders the widget from
the API (4.6.0) and was removed later. The API widget never checked
the status, so cancelled events showed up again (nextcloud#3226).

Skip objects with STATUS:CANCELLED when looking for the next
occurrence. Cancelled events and series are hidden, and if only the
next occurrence of a series is cancelled, the following one is shown.

Signed-off-by: Tom Mittelstädt <1583407+1358@users.noreply.github.com>
@codecov

codecov Bot commented Nov 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

This branch has not been deployed

No deployments
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.

1 participant