Dragging repeating event makes other occurrences disappear
Prerequisites
- [ ] I have searched open and closed issues for duplicates.
Describe the bug
When I drag and drop a recurring event, its recurrence data seems to disappear. The recurrences disappear from the UI, although some information can be recovered using the Edit dialog.
To Reproduce
Steps to reproduce the behavior:
- Create a new recurring event.
- Drag and drop one of the event cells in the grid view. You can drop on any day, including the original one.
- All occurrences other than the one you dragged will disappear.
- Open the dialog for that event. It will still have recurrence data.
- Save the event. All following occurrences will reappear in the UI, and all occurrences before the selected cell will not.
After doing this process, last time I tried I dragged it around a few more times and more bugs started to show up. Eventually, the event got into an uneditable state. Haven't figured out how to reproduce that though. Hopefully it's the same issue that causes the above behavior.
Expected behavior
Only the selected occurrence will be affected, and all recurrence data will be retained.
Screenshots or screen recordings
Created a new recurring event:
Dragged the event on the 16th and dropped it in the original cell:
Edited that event and saved:

Logs
Here's the part of the log starting when I created the event:
** (io.elementary.calendar:8842): DEBUG: 15:50:07.654: Store.vala:134: Adding event '8904bdfd8c24bb6577d813564585858deff045de'
** (io.elementary.calendar:8842): DEBUG: 15:50:07.675: Received 1 added event(s) for source 'Test'
** (io.elementary.calendar:8842): DEBUG: 15:50:07.676: ADDED Event ['Test', Test, UID 8904bdfd8c24bb6577d813564585858deff045de, START 20200902, RID 20200902 )]
** (io.elementary.calendar:8842): DEBUG: 15:50:07.676: ADDED Event ['Test', Test, UID 8904bdfd8c24bb6577d813564585858deff045de, START 20200906, RID 20200906 )]
** (io.elementary.calendar:8842): DEBUG: 15:50:07.676: ADDED Event ['Test', Test, UID 8904bdfd8c24bb6577d813564585858deff045de, START 20200909, RID 20200909 )]
** (io.elementary.calendar:8842): DEBUG: 15:50:07.676: ADDED Event ['Test', Test, UID 8904bdfd8c24bb6577d813564585858deff045de, START 20200913, RID 20200913 )]
** (io.elementary.calendar:8842): DEBUG: 15:50:07.676: ADDED Event ['Test', Test, UID 8904bdfd8c24bb6577d813564585858deff045de, START 20200916, RID 20200916 )]
** (io.elementary.calendar:8842): DEBUG: 15:50:07.676: ADDED Event ['Test', Test, UID 8904bdfd8c24bb6577d813564585858deff045de, START 20200920, RID 20200920 )]
** (io.elementary.calendar:8842): DEBUG: 15:50:07.676: ADDED Event ['Test', Test, UID 8904bdfd8c24bb6577d813564585858deff045de, START 20200923, RID 20200923 )]
** (io.elementary.calendar:8842): DEBUG: 15:50:07.676: ADDED Event ['Test', Test, UID 8904bdfd8c24bb6577d813564585858deff045de, START 20200927, RID 20200927 )]
** (io.elementary.calendar:8842): DEBUG: 15:50:07.676: ADDED Event ['Test', Test, UID 8904bdfd8c24bb6577d813564585858deff045de, START 20200930, RID 20200930 )]
** (io.elementary.calendar:8842): DEBUG: 15:50:25.598: Store.vala:161: Updating event '8904bdfd8c24bb6577d813564585858deff045de' [mod_type=E_CAL_OBJ_MOD_ALL]
** (io.elementary.calendar:8842): DEBUG: 15:50:25.613: Received 1 modified event(s) for source 'Test'
** (io.elementary.calendar:8842): DEBUG: 15:50:25.613: MODIFIED - ORIGINAL Event ['Test', Test, UID 8904bdfd8c24bb6577d813564585858deff045de, START 20200902, RID 20200902 )]
** (io.elementary.calendar:8842): DEBUG: 15:50:25.613: MODIFIED - ORIGINAL Event ['Test', Test, UID 8904bdfd8c24bb6577d813564585858deff045de, START 20200906, RID 20200906 )]
** (io.elementary.calendar:8842): DEBUG: 15:50:25.613: MODIFIED - ORIGINAL Event ['Test', Test, UID 8904bdfd8c24bb6577d813564585858deff045de, START 20200909, RID 20200909 )]
** (io.elementary.calendar:8842): DEBUG: 15:50:25.613: MODIFIED - ORIGINAL Event ['Test', Test, UID 8904bdfd8c24bb6577d813564585858deff045de, START 20200913, RID 20200913 )]
** (io.elementary.calendar:8842): DEBUG: 15:50:25.613: MODIFIED - ORIGINAL Event ['Test', Test, UID 8904bdfd8c24bb6577d813564585858deff045de, START 20200916, RID 20200916 )]
** (io.elementary.calendar:8842): DEBUG: 15:50:25.613: MODIFIED - ORIGINAL Event ['Test', Test, UID 8904bdfd8c24bb6577d813564585858deff045de, START 20200920, RID 20200920 )]
** (io.elementary.calendar:8842): DEBUG: 15:50:25.613: MODIFIED - ORIGINAL Event ['Test', Test, UID 8904bdfd8c24bb6577d813564585858deff045de, START 20200923, RID 20200923 )]
** (io.elementary.calendar:8842): DEBUG: 15:50:25.613: MODIFIED - ORIGINAL Event ['Test', Test, UID 8904bdfd8c24bb6577d813564585858deff045de, START 20200927, RID 20200927 )]
** (io.elementary.calendar:8842): DEBUG: 15:50:25.613: MODIFIED - ORIGINAL Event ['Test', Test, UID 8904bdfd8c24bb6577d813564585858deff045de, START 20200930, RID 20200930 )]
** (io.elementary.calendar:8842): DEBUG: 15:50:25.614: MODIFIED - GENERATED Event ['Test', Test, UID 8904bdfd8c24bb6577d813564585858deff045de, START 20200909, RID 20200909 )]
** (io.elementary.calendar:8842): CRITICAL **: 15:50:27.174: Store.vala:126: No calendar client was found
** (io.elementary.calendar:8842): CRITICAL **: 15:50:27.174: Store.vala:126: No calendar client was found
** (io.elementary.calendar:8842): CRITICAL **: 15:50:27.174: Store.vala:126: No calendar client was found
** (io.elementary.calendar:8842): CRITICAL **: 15:50:27.174: Store.vala:126: No calendar client was found
** (io.elementary.calendar:8842): CRITICAL **: 15:50:27.174: Store.vala:126: No calendar client was found
** (io.elementary.calendar:8842): CRITICAL **: 15:50:27.174: Store.vala:126: No calendar client was found
** (io.elementary.calendar:8842): DEBUG: 15:50:29.105: Store.vala:161: Updating event '8904bdfd8c24bb6577d813564585858deff045de' [mod_type=E_CAL_OBJ_MOD_ALL]
** (io.elementary.calendar:8842): DEBUG: 15:50:29.132: Received 1 added event(s) for source 'Test'
** (io.elementary.calendar:8842): DEBUG: 15:50:29.135: ADDED Event ['Test', Test, UID 8904bdfd8c24bb6577d813564585858deff045de, START 20200909, RID 20200909 )]
** (io.elementary.calendar:8842): DEBUG: 15:50:29.135: ADDED Event ['Test', Test, UID 8904bdfd8c24bb6577d813564585858deff045de, START 20200913, RID 20200913 )]
** (io.elementary.calendar:8842): DEBUG: 15:50:29.135: ADDED Event ['Test', Test, UID 8904bdfd8c24bb6577d813564585858deff045de, START 20200916, RID 20200916 )]
** (io.elementary.calendar:8842): DEBUG: 15:50:29.135: ADDED Event ['Test', Test, UID 8904bdfd8c24bb6577d813564585858deff045de, START 20200920, RID 20200920 )]
** (io.elementary.calendar:8842): DEBUG: 15:50:29.135: ADDED Event ['Test', Test, UID 8904bdfd8c24bb6577d813564585858deff045de, START 20200923, RID 20200923 )]
** (io.elementary.calendar:8842): DEBUG: 15:50:29.135: ADDED Event ['Test', Test, UID 8904bdfd8c24bb6577d813564585858deff045de, START 20200927, RID 20200927 )]
** (io.elementary.calendar:8842): DEBUG: 15:50:29.135: ADDED Event ['Test', Test, UID 8904bdfd8c24bb6577d813564585858deff045de, START 20200930, RID 20200930 )]
Platform Information
- [x] 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.
Looking at it more closely, it seems like the behavior where only the following events are recreated is unrelated. I'll open a separate issue for that.
The issue here seems to be that the code that recreates all the events on edit doesn't recreate all of the related objects in the recurring event. Somehow this behavior only shows up when it's called by the drag event.
I also noticed this bug, but not only with dragging but also after changing the name of the event. All recurring events then disappear.
Hmm, that doesn't happen on my end. I only tried a few times though. Does it happen every time for you, or only in certain situations?
I'll have to look into it. There are a lot of bugs in Maya involving repeating events, which makes it harder to find clear patterns.
Thanks. Agreed, repeating events are a little wacky, but if you could help track down any issues that would be amazing!