Skip to content

fix: recurrence rule truncation on nth occurrence save - #8910

Merged
SebastianKrupinski merged 1 commit into
mainfrom
fix/recurrence-rule-truncation-on-nth-occurrence-save
Sep 9, 2026
Merged

SebastianKrupinski merged 1 commit into
mainfrom
fix/recurrence-rule-truncation-on-nth-occurrence-save

Conversation

@SebastianKrupinski

@SebastianKrupinski SebastianKrupinski commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • added logic to prevent series truncation when editing a nth occurrence and saving to series

Issue

@nextcloud/calendar-js's forkItem() (used whenever you load any occurrence for editing) mutates the forked occurrence's own copy of RRULE, it recalculates COUNT down to "occurrences remaining from this point forward." That's correct for the "this and future" truncate flow, but the same forked object is used in series-scope save, this incorrectly truncates the series

Testing

  • Without this PR
  • Create a recurring daily event with a count of 5
  • Edit the middle event instance (3rd)
  • Save using "Update Series"
  • Preform the same test with PR
  • Preform test on primary occurrence by changing the recurrence count, this should properly adjust the length of the series
  • Preform test on nth occurrence by changing the count and saving with "this and future", this should create a continuation with the changed count

Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
@SebastianKrupinski

Copy link
Copy Markdown
Contributor Author

/backport to stable6.6

@backportbot backportbot Bot added the backport-request A backport was requested for this pull request label Sep 9, 2026
@SebastianKrupinski

Copy link
Copy Markdown
Contributor Author

/backport to stable6.5

@SebastianKrupinski SebastianKrupinski added this to the v6.7 milestone Sep 9, 2026
@SebastianKrupinski
SebastianKrupinski marked this pull request as ready for review September 9, 2026 13:35
@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/store/calendarObjectInstance.js 85.71% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@SebastianKrupinski
SebastianKrupinski merged commit 1b870f9 into main Sep 9, 2026
34 checks passed
@SebastianKrupinski
SebastianKrupinski deleted the fix/recurrence-rule-truncation-on-nth-occurrence-save branch September 9, 2026 14:46
@github-project-automation github-project-automation Bot moved this from 🏗️ In progress to ☑️ Done in 💌 📅 👥 Groupware team Sep 9, 2026
@backportbot backportbot Bot removed the backport-request A backport was requested for this pull request label Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

Status: ☑️ Done

Development

Successfully merging this pull request may close these issues.

2 participants