Include more information in iMIP email and show diff information on updating an event
- Resolves: part of https://github.com/nextcloud/calendar/issues/3919
Summary
Instead of taking the date and time of the main recurrence, the changed VEVENT is filtered from the main VCALENDAR event and used to build a diff to accurately represent what changed.
Screenshots to follow
To Do
- [x] Check if the logic is still sound if there is a recurrence that has a recurrence exception - what happens if I update the whole event - done, the logic is not sound yo
- [x] Instead, filter old and new events and only leave what's been modified. Signifiers for this change are LAST-MODIFIED, SEQUENCE, RECURRENCE-ID / RRULE
- [x] Build a visual diff for the email
As discussed with @ChristophWurst:
- [x] Extract the event comparisons into its own service
- [x] refactor the iMIP plugin to use that service instead of private methods
- [ ] make the data array backwards- compatible by introducing new array params for the new values and leaving the old ones unchanged (as templates that have overwritten ours might break otherwise)
- [ ] tests for the new service and the plugin
Testing manually
All events must have at least one attendee to trigger the iMIP logic
- [ ] Manually test with a single event - creating, updating
- [ ] Manually test with a new recurring event without a preexisting old event - test changing the main recurrence, creating a single or multiple recurrence exceptions in the middle
- [ ] Adjust PHPUnit tests
Checklist
- Code is properly formatted
- Sign-off message is added to all commits
- [ ] Tests (unit, integration, api and/or acceptance) are included
- [ ] Screenshots before/after for front-end changes
- [x] Documentation (manuals or wiki) has been updated or is not required
- [x] Backports requested where applicable (ex: critical bugfixes)
/backport to stable25
/backport to stable24
/backport to stable23
unfortunately, the approach with just the reccurence-id doesn't work correctly if I first update a single recurrence and then the whole instance.
Extract the event comparisons into its own service
What if we extracted the event comparison part in something that's usable for other things like for improved activity entries? For https://github.com/nextcloud/server/issues/23443 and https://github.com/nextcloud/server/issues/18508
Great improvement @miaulalala, happy to see progress on this issue.
This is how it currently looks, getting a invitation as an attendee to a recurring event and then changing the start and weekday as an organizer
In both cases mail subject is: "Invitation: wöchentliches meeting" (meaning "weekly meeting")

This is how the it looks without this PR

Would it be possible to also change the mail subject to "Invitation updated: ..." in case an existing event gets updated?
Great improvement @miaulalala, happy to see progress on this issue.
This is how it currently looks, getting a invitation as an attendee to a recurring event and then changing the start and weekday as an organizer
In both cases mail subject is: "Invitation: wöchentliches meeting" (meaning "weekly meeting")
This is how the it looks without this PR
Would it be possible to also change the mail subject to "Invitation updated: ..." in case an existing event gets updated?
Hm I think that was somewhere in there already but I will keep an eye out.
Thanks for testing!!
I had a look, it's not in there yet. Will have to be a followup ticket due to time constraints this week. Sorry @onny
The backport to stable25 failed. Please do this backport manually.
# Switch to the target branch and update it
git checkout stable25
git pull origin/stable25
# Create the new backport branch
git checkout -b fix/foo-stable25
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable25
More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport
The backport to stable24 failed. Please do this backport manually.
# Switch to the target branch and update it
git checkout stable24
git pull origin/stable24
# Create the new backport branch
git checkout -b fix/foo-stable24
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable24
More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport
The backport to stable23 failed. Please do this backport manually.
# Switch to the target branch and update it
git checkout stable23
git pull origin/stable23
# Create the new backport branch
git checkout -b fix/foo-stable23
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable23
More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport
/backport to stable25
/backport to stable24
The backport to stable25 failed. Please do this backport manually.
# Switch to the target branch and update it
git checkout stable25
git pull origin/stable25
# Create the new backport branch
git checkout -b fix/foo-stable25
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable25
More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport
The backport to stable24 failed. Please do this backport manually.
# Switch to the target branch and update it
git checkout stable24
git pull origin/stable24
# Create the new backport branch
git checkout -b fix/foo-stable24
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable24
More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport
The backport to stable23 failed. Please do this backport manually.
# Switch to the target branch and update it
git checkout stable23
git pull origin/stable23
# Create the new backport branch
git checkout -b fix/foo-stable23
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable23
More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport
/backport to stable25
/backport to stable24