Skip to content

fix(caldav): Expand recurring events for principal calendar search#60766

Open
kesselb wants to merge 3 commits into
masterfrom
bug/noid/expand-unified-search
Open

fix(caldav): Expand recurring events for principal calendar search#60766
kesselb wants to merge 3 commits into
masterfrom
bug/noid/expand-unified-search

Conversation

@kesselb

@kesselb kesselb commented May 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Expand recurring events when searching for events through unified search.

STR:

  • Create a new event yesterday two years ago (2024-05-26)
  • Add a yearly recurrence
  • Open unified search, add filter for events and last 30 days
  • Search for the event by title

Main: Event 2024-05-26 is shown
Here: Event 2026-05-26 is shown

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@kesselb kesselb added this to the Nextcloud 35 milestone May 27, 2026
@kesselb
kesselb requested a review from Copilot May 27, 2026 10:25
@kesselb kesselb self-assigned this May 27, 2026
@kesselb kesselb added the bug label May 27, 2026
@kesselb kesselb added the 2. developing Work in progress label May 27, 2026
@kesselb
kesselb requested a review from a team as a code owner May 27, 2026 10:26
@kesselb
kesselb requested review from CarlSchwan, artonge, leftybournes and salmart-dev and removed request for a team May 27, 2026 10:26
@kesselb

kesselb commented May 27, 2026

Copy link
Copy Markdown
Contributor Author

/backport to stable34

@kesselb

kesselb commented May 27, 2026

Copy link
Copy Markdown
Contributor Author

/backport to stable33

@kesselb

kesselb commented May 27, 2026

Copy link
Copy Markdown
Contributor Author

/backport to stable32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Comment thread apps/dav/lib/CalDAV/CalDavBackend.php Outdated
@SebastianKrupinski

Copy link
Copy Markdown
Contributor

I approved by mistake! It was meant to be a comment!

@kesselb
kesselb force-pushed the bug/noid/expand-unified-search branch from 5c8045f to cf432ac Compare June 9, 2026 22:29
@ChristophWurst

Copy link
Copy Markdown
Member

FYI found a potentially matching ticket for this fix: #52979

@kesselb
kesselb force-pushed the bug/noid/expand-unified-search branch 3 times, most recently from 4198ce9 to 3512232 Compare June 16, 2026 15:47
@kesselb
kesselb force-pushed the bug/noid/expand-unified-search branch from 3512232 to d66fe27 Compare June 21, 2026 21:15
@kesselb

kesselb commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

@SebastianKrupinski @ChristophWurst ready for review ;)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

apps/dav/lib/Search/TasksSearchProvider.php:130

  • The result loop can now skip rows (non-calendar data / missing component). Using count($formattedResults) to advance the cursor can stall pagination (e.g. repeatedly re-fetching the same invalid rows). Advance the cursor independently of how many entries you returned (typically by the requested limit).
		return SearchResult::paginated(
			$this->getName(),
			$formattedResults,
			$query->getCursor() + count($formattedResults)
		);

Comment thread apps/dav/lib/Search/EventsSearchProvider.php
Comment thread apps/dav/lib/Search/TasksSearchProvider.php Outdated
Comment thread apps/dav/lib/Search/EventsSearchProvider.php
@kesselb
kesselb force-pushed the bug/noid/expand-unified-search branch from d66fe27 to 3cbe078 Compare July 1, 2026 10:00
@kesselb
kesselb requested a review from DerDreschner July 3, 2026 15:53
@kesselb kesselb added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jul 3, 2026
Assisted-by: Claude:claude-sonnet-4-6
Assisted-by: Claude:claude-sonnet-5
Assisted-by: OpenCode:github-copilot/gpt-5.4

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
@kesselb
kesselb force-pushed the bug/noid/expand-unified-search branch from 3cbe078 to c45ba8d Compare July 21, 2026 15:37
@kesselb
kesselb requested a review from Copilot July 21, 2026 15:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Comment on lines 139 to 143
if ($personDisplayName !== null) {
$attendeeSearchResults = $this->backend->searchPrincipalUri(
array_push($searchResults, ...$this->backend->searchPrincipalUri(
$principalUri,
$personDisplayName,
[self::COMPONENT_TYPE],
Comment on lines +110 to +112
if ($since !== null && $until === null) {
$until = new DateTimeImmutable('now', new \DateTimeZone('Z'));
}

@DerDreschner DerDreschner left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested successfully

@ChristophWurst ChristophWurst added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Jul 22, 2026
@CarlSchwan
CarlSchwan removed their request for review July 22, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish AI assisted backport-request bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants