org-gcal-fetch wipes out CLOSED date
wrn opened this issue · 4 comments
wrn commented
To reproduce:
- Create a TODO entry, and schedule it with "org-schedule"
- org-gcal-post-at-point post the entry to Google calendar
- Close the entry in org file with "org-todo", adding "CLOSED [date]" automatically
- run org-gcal-fetch, "CLOSED [date]" is wiped out in org buffer.
wrn commented
I tried this patch on function "org-gcal--update-entry" and it seems to have fixed the issue. If somebody can confirm this is indeed the right fix, that will be great. Thanks.
modified org-gcal/org-gcal.el
@@ -1714,7 +1714,7 @@ heading."
(if (< 11 (length end))
end
(org-gcal--iso-previous-day end))))))))
- (if (org-element-property :scheduled elem)
+ (if (and (org-element-property :scheduled elem) (not (org-entry-is-done-p)))
(unless (and recurrence old-start) (org-schedule nil timestamp))
(insert timestamp)
(newline)
telotortium commented
wrn commented
It is indeed a better fix. Thanks!
wrn commented
Thanks for the merging the fix. But it seems the fix does not work as expected. Please see my comments to the commit. Thanks.