elementary/calendar

Bug: changing a monthly recurring event to a date before will repeat events daily

Opened this issue · 3 comments

wout commented

Prerequisites

  • I have searched open and closed issues for duplicates.

Describe the bug

If there is a monthly recurring event, starting on the first of November for example, and you change the event so it starts the first of October, the events will be repeated daily between 1/10 and 1/11. This only happens in the backwards direction, not forwards.

To Reproduce

Steps to reproduce the behavior:

  1. Create an event of 1/11
  2. Make it monthly recurring
  3. Save
  4. Edit event and change the start date to 1/10
  5. Save

Daily events will now be added between 1/10 and 1/11.

Expected behavior

Just one event should be created

Screenshots or screen recordings

image

Platform Information

image

  • I'm using the latest version from git that I've manually compiled
  • I'm using the latest released stable version

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Hold on a second--I think I found the cause of this, and it's not a bug with the repeat mechanism. When you change the start date of an event, it keeps the end date the same. When you modify events to see this behavior, do you see that the end date stays the same? Because in that case, it's intended behavior. (I'd argue that the end date should change, but it's a separate issue.)

wout commented

I noticed it when I accidentally created an even for 1 Nov instead of 1 Oct. The end date stays the same indeed.

Just now I tried it again, and now it replicated the events going backwards as well as going forwards. So instead of repeating the event monthly, it's now daily from start to end. Which made me wonder if it has something to do with the date being in the past. So I created an event for tomorrow, 7 Nov 2020, and repeated until 7 Apr 2021. Then changed the start date back to 7 Oct 2020, which made everything repeat daily in both directions. Now, if I create an event for 7 Dec 2020, repeat monthly until 7 Apr 2021, then change the start date to 7 Nov 2020, it also switches to daily repeat. So something is not right...

Ok, I'm feeling pretty confident now that this is intended behavior actually. Let me describe what I think is going on, and see if it's what you see too:

You create an event and set it to repeat.
before

You change the start date (or end) to whatever date you meant.
edit

You see that it "repeats" every day between the old and new start dates.
after

At least on my machine, this isn't creating a "replicated" event. It's editing when a single event starts. Note in the second image that the event starts on the 19th and ends on the 21st. That's not a repeating event, just a single event that lasts 3 days. You can also see that in the third picture, I selected Wednesday and it shows the event spanning 19. October - 21. November. From what I understand, what you see looks consistent with this behavior. If so, it's working exactly as designed: you only changed the start date, not the end date, so each recurrence will span an extra few days. (Sorry for the German text, but the app layout is the same as in English so it should be understandable)

Could you follow my steps and see if you come up with the same results? What should clear this up is if you change the end date to match. So say you have a repeating event on 6. November - 7. November. Move the start date from 6. November to 6. October, just like you've been doing. Then move the end date from 7. November to 7. October. If I'm right, you should see your event just move backward as you want. If you see something else, I'll have some digging to do to see what's going wrong.