server icon indicating copy to clipboard operation
server copied to clipboard

Include more information in iMIP email and show diff information on updating an event

Open miaulalala opened this issue 3 years ago • 4 comments

  • 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

miaulalala avatar Dec 12 '22 20:12 miaulalala

/backport to stable25

miaulalala avatar Dec 12 '22 20:12 miaulalala

/backport to stable24

miaulalala avatar Dec 12 '22 20:12 miaulalala

/backport to stable23

miaulalala avatar Dec 12 '22 20:12 miaulalala

unfortunately, the approach with just the reccurence-id doesn't work correctly if I first update a single recurrence and then the whole instance.

miaulalala avatar Dec 13 '22 14:12 miaulalala

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

tcitworld avatar Jan 04 '23 07:01 tcitworld

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")

image

This is how the it looks without this PR

image

Would it be possible to also change the mail subject to "Invitation updated: ..." in case an existing event gets updated?

onny avatar Jan 28 '23 16:01 onny

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")

image

This is how the it looks without this PR

image

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!!

miaulalala avatar Jan 30 '23 12:01 miaulalala

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

miaulalala avatar Jan 30 '23 16:01 miaulalala

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

miaulalala avatar Feb 06 '23 06:02 miaulalala

/backport to stable24

miaulalala avatar Feb 06 '23 06:02 miaulalala

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

st3iny avatar Feb 08 '23 08:02 st3iny

/backport to stable24

st3iny avatar Feb 08 '23 08:02 st3iny