-
Notifications
You must be signed in to change notification settings - Fork 105
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
Changes in Date or Time on Deadlines or Scheduled Events Not Syncing Since Recent Changes #267
Comments
Could you please provide the following info:
For TODO sync, the SCHEDULED timestamp is mapped to icalendar's DTSTART, bare timestamp isn't mapped to any icalendar field (though it may be included in the DESCRIPTION). We actually inherit this behavior from upstream ox-icalendar.el (see Also, TODO sync was only recently added to |
To answer your last question first, I was using the main release of org-caldav from this repo through MELPA. The old org-caldav supported syncing todos that had date stamps (such as scheduled or deadline date stamps) to calendars, but you're right that the old org-caldav did not support syncing todos without datestamps. The sync functionality for dated todos has been in place for at least 4 or 5 years I think (it's worked since I've been using the package). So this was a breaking change for a long established workflow, and I appreciate your help very much! I did notice that the new version now syncs todos that didn't have any date stamps, which is a nice improvement to the old functionality. My emacs version is 28.2 As a test, I tried enabling org-caldav-sync-todo, but that resulted in no change to the behavior I observed above (I still saw no timestamp changes getting synced). Also, as a testing note: when I upgraded to the new version of org-caldav I noticed that all my non-dated todos got synced to my tasks, even though I had org-caldav-sync-todo set to nil, which is interesting. I suspect the fact that I had org-icalendar-include-todo already set may have caused that? In any case you may want to check and make sure that the org-caldav-sync-todo code-path is working as expected, as I would not have expected to get them all synced with that set to nil if I were coming to org-caldav as a new user, if you see what I mean? I've included two example entries that exhibit my problem:
To be clear both of those entries get synced to the calendar correctly when first created, and if I delete them they get removed correctly. The issue is if I change the datestamp in my org file no changes are propagated to the calendar (which used to work flawlessly). This is especially important for entries like the Wind Clock entry which gets updated every few days. But the issue exists with a simple deadline like my first example too. Thank you very much for the speedy reply, I sincerely appreciate you taking the time to help figure it out! Edited to Add: I can confirm that reverting to an older version makes everything work correctly, but I had to step back through several older versions, essentially going back to the last changes dengste made in 2020. Specifically, rolling back to this commit resulted in seeing time or datestamp changes getting picked up again. Interestingly, rolling back alone wasn't enough, I also had to remove the sync states to start fresh, but after that everything works normally. I am not an elisp expert, so unfortunately I can't seem to spot which specific changes might've caused it, but please let me know if I can provide any more information to help reproduce the issue. |
I think the following setting will solve your issue, can you please try it:
Explanation: your org-icalendar settings export multiple icalendar entries for each org entry: However, org-caldav does not handle these types of duplicates well. Therefore, you should unset The problem happens in Line 840 in cc1b820
The first time the event is encountered, it will notice the md5 changed, mark the event as changed-in-org, and update the md5 in database. The second time the event is encountered, the md5 sum will be the same as in database, so org-caldav thinks it's unchanged, and marks it as up-to-date. The underlying issue was already present in older versions of org-caldav, for example if you try the following event:
then the ox-icalendar export will create duplicate events (for Scheduled and Deadline timestamps), which will cause the same error with being unable to update the event.
Yes, we should perhaps bind Also, the duplicate entries can explain the different behavior with dated/non-dated todos. It appears the dated todos don't show up in Tasks because of the duplicate calendar entry. Finally: for your config, rather than unsetting |
After testing that does seem to fix it, and it makes sense why that would work that way. Am I correct in concluding based on your answer that there's no way to get datestamped todos to the calendar, but also have undated todos go to tasks? Basically if I understand you correctly one has to pick whether you want todos on the calendar or in tasks, but there's no way to get both? No worries if so, just making sure I'm understanding. It's much more important for my workflow that I get the calendar entries and alarms for my timestamped todos, so I'll be sticking to calendar if I have to pick, but it would be nice to be able to have less urgent items on the task list too if that makes sense. In any case, I greatly appreciate the help and troubleshooting! Thank you. |
Yes that is my understanding of the current situation.
Understandable, especially since recurring tasks are not yet implemented. Still, I'd recommend to consider switching to tasks after we've added that -- it's more natural to export Org TODOs as iCalendar tasks, and Nextcloud shows upcoming tasks both on the main dashboard and in the calendar. |
I've been using org-caldav successfully for several years and previously when I changed the date or time on a deadline or scheduled event org-caldav-sync would sync the changes to my nextcloud calendar. Today I updated to the version that's current in MELPA and changes to dates or times in the org file no longer sync to the nextcloud calendar. When I run org-caldav-sync it reports nothing to sync, no errors. It's as though nothing had changed in the source files.
To be clear, brand new deadlines or scheduled entries sync to the calendar correctly, as do deletions, but date changes on existing todo entries with deadlines or scheduled timestamps no longer sync. This is potentially very disruptive for folks who make extensive use of repeating entries and/or org-habits.
That said, I'm very pleased to see some development activity on this repo after a long hiatus, and thank you very much for your work on improving org-caldav!
Please let me know if I can provide any additional configuration or debugging information.
Edited to add: Events without a todo status and a bare timestamp (i.e. without a deadline or scheduled keyword) seem to still sync date/time changes correctly. This issue only seems to affect date or time changes for todo entries that have deadline dates or scheduled dates.
The text was updated successfully, but these errors were encountered: