Skip to content

fix: update, delete, accept, decline all occurrences - #7600

Open
SebastianKrupinski wants to merge 4 commits into
mainfrom
fix/issue-3355-delete-update-all-occurrences
Open

fix: update, delete, accept, decline all occurrences#7600
SebastianKrupinski wants to merge 4 commits into
mainfrom
fix/issue-3355-delete-update-all-occurrences

Conversation

@SebastianKrupinski

@SebastianKrupinski SebastianKrupinski commented Oct 20, 2025

Copy link
Copy Markdown
Contributor

Summary

Logic Changes

  • As organizer all actions, update and delete, are applicable to either the this occurrence, this occurrence and all future, and all occurrences, this is manually controlled with no "why did this happen"
Screenshot 2026-08-25 113759 Screenshot 2026-08-25 113805
  • As participant all actions are restricted based on the instance type of the event. normal series instance or exemption instance. When accepting/declining of updating a normal series instance the changes are applied to the entire series. When accepting/declining or updating a exemption instance, the changes are applied to the exemption instance.
image

@codecov

codecov Bot commented Oct 20, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Jerome-Herbinet

Copy link
Copy Markdown
Member

Hi,
Any news about this development's progression ?
I think that this development is actually important for web UI end-users.
Thanks !

@IT-Seezeit

Copy link
Copy Markdown

Hello,

that's a big problem for us too. It would be great if that could be fixed soon.
Thanks

@Jerome-Herbinet

Copy link
Copy Markdown
Member

@SebastianKrupinski ; may this PR resolve #6146 as well ?

@SebastianKrupinski

Copy link
Copy Markdown
Contributor Author

@SebastianKrupinski ; may this PR resolve #6146 as well ?

That is the idea, I just need to figure out the best work flow logic.

@SebastianKrupinski SebastianKrupinski changed the title fix: update, delete, accept, devline all occurrences fix: update, delete, accept, decline all occurrences Aug 25, 2026
@SebastianKrupinski
SebastianKrupinski force-pushed the fix/issue-3355-delete-update-all-occurrences branch 6 times, most recently from 928f361 to 9b343a4 Compare August 25, 2026 15:57
@SebastianKrupinski
SebastianKrupinski marked this pull request as ready for review August 25, 2026 16:41
@SebastianKrupinski

Copy link
Copy Markdown
Contributor Author

PHP errors are unrelated

@SebastianKrupinski SebastianKrupinski added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Aug 25, 2026
@SebastianKrupinski
SebastianKrupinski force-pushed the fix/issue-3355-delete-update-all-occurrences branch from 9b343a4 to ebf29dc Compare August 27, 2026 13:46
@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 Aug 27, 2026
@SebastianKrupinski

Copy link
Copy Markdown
Contributor Author

/backport to stable6.5

@SebastianKrupinski
SebastianKrupinski force-pushed the fix/issue-3355-delete-update-all-occurrences branch from ebf29dc to 8b424b7 Compare August 27, 2026 14:39
@SebastianKrupinski

Copy link
Copy Markdown
Contributor Author

@odzhychko should be good now

@SebastianKrupinski
SebastianKrupinski force-pushed the fix/issue-3355-delete-update-all-occurrences branch from 8b424b7 to cc7fd03 Compare August 27, 2026 15:14

@odzhychko odzhychko 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. Works as expected.

Aside from the failing tests,
https://github.com/nextcloud/calendar/pull/7600/changes#r3878791313 might be a blocking issues.

Comment thread src/views/EditFull.vue Outdated
Comment thread src/views/EditFull.vue Outdated
Comment thread src/views/EditFull.vue
@@ -154,16 +185,10 @@ export default {
async setParticipationStatus(participationStatus) {

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.

nit(non-blocking): changeAttendeesParticipationStatus is not unused.

Comment thread src/store/calendarObjectInstance.js Outdated
Comment thread src/store/calendarObjectInstance.js
Comment thread src/store/calendarObjectInstance.js Outdated
@SebastianKrupinski
SebastianKrupinski force-pushed the fix/issue-3355-delete-update-all-occurrences branch from e2571ee to 32619c4 Compare August 31, 2026 12:58
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
@SebastianKrupinski
SebastianKrupinski force-pushed the fix/issue-3355-delete-update-all-occurrences branch from 32619c4 to c26c525 Compare August 31, 2026 13:02
Comment thread src/store/calendarObjectInstance.js Outdated
logger.error('Could not find master component to save series-wide changes to')
} else {
const isBaseOccurrence = !eventComponent.originalRecurrenceId
|| eventComponent.originalRecurrenceId.compare(baseComponent.startDate) === 0

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.

issue: eventComponent.originalRecurrenceId.compare(baseComponent.startDate) === 0 breaks if

  • Create event on Thursday
  • Set weekly recurrence on Mondays
  • Save
  • Edit time first occurrence
  • Actual: Seeing the warning and changes are discarded
  • Expected: Time change saved

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hey, I was not able to reproduce this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nvm, managed to reproduce it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good find btw, would have never thought of trying this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed

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.

I'm not sure, if finding by recurrence ID can really be made robust.

Might be easier to record what instance the calendar started editing. Maybe a blunt solution like storing a copy of the original event (or only the original start/end dates) when starting to edit and then diffing with it on save.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I found the issue with your new scenario above. Its crashing on the date update

image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Its caused by @nextcloud/calendar-js's RecurrenceManager.updateStartDateOfMasterItem():

for (const recurrenceException of this.getRecurrenceExceptionIterator()) {  // live Map iterator
    this.removeRecurrenceException(recurrenceException)                     // deletes current entry
    recurrenceException.recurrenceId.addDuration(difference)                // shifts its key
    this.relateRecurrenceException(recurrenceException)                     // re-inserts under a NEW key
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Well lets see how many more libraries we can fix while trying to fix this functionality

nextcloud/calendar-js#923

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think I found part of the confusion, the event is not actually changing, its only showing the new time on the pop up

I modified the second event by one hour you can see the diff in the popup and actual event (also I did get a warning)

image

So I just need to make the pop state refresh when we do not allow time update

Comment thread src/store/calendarObjectInstance.js Outdated

const dateTimeWasChanged = eventComponent.startDate.compare(eventComponent.originalRecurrenceId) !== 0
|| currentDuration.compare(originalDuration) !== 0

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.

compare calculates correctly with timezones.

So warning is not shown (and changes are silently discarded), when uses changes the timezone but the actual UTC time stays identical.
Not sure, if this is an issue.

  • create repeating event A starting at 10AM Berlin/Europe
  • Edit changing timezone to London/Europe and start to 9AM
  • Save for series
  • Expected: The warning
  • Actual: No warning

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Warning is show correctly when changing the time zone

image

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.

Screencast.From.2026-09-01.16-20-31.mp4

Happens only if the UTC time stays the same after timezone change. E.g. user updates from "10 Europe/Madrid === 11 UTC" to "11 Europe/London === 11 UTC".

Becomes an issue, because (a) user sets timezone for a reason and (b) even if UTC time is same at time of comparison it might be different later for example if one time zone uses summer time/winter time and the other does not.

Probably just needs an additional check here, that timzone in start and end date stayed the same.

@SebastianKrupinski

Copy link
Copy Markdown
Contributor Author

@odzhychko Do you mind giving this one last test!?

@odzhychko odzhychko 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.

Looked and tested the fix for the last issue.
Found two broken edge case with regards to saving series.

I've seen that some more code changed in the meanwhile.
I'll try to look at it and retest PR from scratch after the know issues are fixed ^^

@SebastianKrupinski
SebastianKrupinski force-pushed the fix/issue-3355-delete-update-all-occurrences branch from 70a63fe to 56588d5 Compare September 1, 2026 17:38
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
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 backport-request A backport was requested for this pull request

Projects

Status: 🏗️ In progress

4 participants