Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Also delete recurring events when master event is deleted? #259

Open
Lxxrxns opened this issue Dec 21, 2023 · 1 comment
Open

Also delete recurring events when master event is deleted? #259

Lxxrxns opened this issue Dec 21, 2023 · 1 comment

Comments

@Lxxrxns
Copy link

Lxxrxns commented Dec 21, 2023

When I create a recurring event, the repeats ('children' if you will) get slightly different itemIds, which makes it hard to find and delete them later on.

How can I delete all recurrences when deleting the master event?

Because even if I delete the "master" event (i.e. the first event) based on that itemId and changeKey, the recurring event still remains in the calendar...

I created the following recurring event, which is shown as two events when I do getCalendarItems:

Subject: Test 5
Start: 2020-01-05T09:00:00Z
End: 2020-01-05T10:00:00Z
itemId: AAMkADJhY2ZmMDRkLWEzNjctNGI4MS05M2M0LTVhYzViNmRlZmU5ZAFRAAgI15FyNSMAAEYAAAAANTLcdKApVk26/E16wDmruwcAYhwxX7uX10ikCHfRdGwnRQAAAAABDQAAYhwxX7uX10ikCHfRdGwnRQADVJTimwAAEA==
changeKey: DwAAABYAAABiHDFfu5fXSKQId9F0bCdFAANUyPtZ
uID: 040000008200E00074C5B7101A82E0080000000098478BB6F633DA01000000000000000010000000B2233F11011B0B42BC1A45162B66757E

Subject: Test 5
Start: 2020-01-06T09:00:00Z
End: 2020-01-06T10:00:00Z
itemId: AAMkADJhY2ZmMDRkLWEzNjctNGI4MS05M2M0LTVhYzViNmRlZmU5ZAFRAAgI15I7X4zAAEYAAAAANTLcdKApVk26/E16wDmruwcAYhwxX7uX10ikCHfRdGwnRQAAAAABDQAAYhwxX7uX10ikCHfRdGwnRQADVJTimwAAEA==
changeKey: DwAAABYAAABiHDFfu5fXSKQId9F0bCdFAANUyPtZ
uID: 040000008200E00074C5B7101A82E0080000000098478BB6F633DA01000000000000000010000000B2233F11011B0B42BC1A45162B66757E

Then I do:

// Get the item based on its itemId and changeKey that we stored: 
$item= $calendar->getCalendarItem($itemId, $changeKey);

// Delete that item:
$calendar->deleteCalendarItem($item->getItemId());

In which I provided the $itemId and $changeKey of the MASTER event.
However, this ONLY deletes the first event, NOT the second one.

Any ideas?

@Lxxrxns
Copy link
Author

Lxxrxns commented Dec 21, 2023

Update: having the same problem with updating. Even though the events are supposed to be recurrences of a master event, changing the subject of the master event does not update the recurrences...

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

No branches or pull requests

1 participant