Cancelled events on same day sometimes not being removed #327
Replies: 18 comments
-
Could you give more details on when this happens? Maybe it's always all-day events or instances of a recurring event series? These events start in the future, are ongoing or already ended when the script is supposed to remove them? |
Beta Was this translation helpful? Give feedback.
-
Yes for sure, thanks for your reply. This is not only all-day events, or recurring events. It seems to happen more when the time is approaching, so for example if there is an event in 1 hours time, but that event is removed from the source, it seems to find it difficult to remove it. Almost as if that event is already 'saved' after using #109. Below I have attached a screenshot of the calendar with an example. The calendar events in question are in orange. So you can see that all past events are being saved which is fantastic. However, on Saturday 4th, the event that says James Hazel, this is saved however it was removed from the source an hour or 2 hours before it happened. However, it has still saved. It always works correctly unless its on the day of, then it seems to sometimes have this issue. Any potential fix would be awesome. Thanks! |
Beta Was this translation helpful? Give feedback.
-
A quick rundown of what i suspect is the reason for this: (Code as in #109)
however,
therefore
which finally leads to the following check returning true even though the event has not ended yet tl;dr: the event does not get removed because the script falsely thinks the event has ended. Solution: |
Beta Was this translation helpful? Give feedback.
-
Okay great I will give this a go, all makes sense. Out of interest, does it make a difference that the timezone I am using for the calendar is Pacific Time? Does that change the fix or I should still use the same as you said. |
Beta Was this translation helpful? Give feedback.
-
Also, here are the lines I see. Do these lines still correspond to where I add your fixes. 171 and 177? |
Beta Was this translation helpful? Give feedback.
-
Yes. |
Beta Was this translation helpful? Give feedback.
-
Does this now look correct? Sorry I am not very good at all this. Also, the fix is the same considering I am in Canada on PT time not GMT? Thanks! |
Beta Was this translation helpful? Give feedback.
-
Interestingly, I noticed after adding the extra code that it deleted the next two events that passed instead of saving them. Not sure if that is something I did wrong or just bad timing or something. I won't be able to see if it happens again until tomorrow. The two in the trash were not deleted by me, and still show in the source calendar so have been removed automatically. |
Beta Was this translation helpful? Give feedback.
-
I did another test, with the additional code I added: Solution: add It is now deleting every event once it passes it rather than keeping them. Any idea why? It does seem like it's fixed the original problem but now this new one. |
Beta Was this translation helpful? Give feedback.
-
Hmm it seems to be working just fine for me. Let's try this:
|
Beta Was this translation helpful? Give feedback.
-
Okay so I followed your instructions and reverted the changes made to lines 171 and 177. I then added your code above in replacement to the code I added from #109. This is now still removing events that have passed. See screenshot example below. I would be totally happy to send you the whole code or give you access if that is possible. |
Beta Was this translation helpful? Give feedback.
-
FYI the example that was removed was a booking called Linda Henderson Janet Burgess and it was for 1pm. |
Beta Was this translation helpful? Give feedback.
-
Another example, the next two events that you saw visible above, now gone after the start time has passed. |
Beta Was this translation helpful? Give feedback.
-
@jonas0b1011001 , just wanted to check in here to see if you might have a solution to the symptoms above? If there is no fix, not to worry, I will just move on with it how it was. I really appreciate your help! |
Beta Was this translation helpful? Give feedback.
-
I have not had time to look into this again, sorry. As mentioned, the proposed changes fixed the error i was able to reproduce on my end. I will have to come up with a different solution to find/fix the error you are experiencing. |
Beta Was this translation helpful? Give feedback.
-
@jonas0b1011001, not a problem at all. I also tried starting fresh and following your steps and it for sure fixed the original issue about events not being removed on the same day. However, it still was removing each event after the start time passes rather than keeping them which for me is important. I am sure you are super busy but when you get the time it would be great to have a fix. I will keep checking here. Thanks again! |
Beta Was this translation helpful? Give feedback.
-
@jonas0b1011001 , just wanted to check in here in case it was one that had been forgotten about. Any update on a potential solution? I have been using this and its been great, just this one issue that would be amazing to fix. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Since it seems like this is still happening (?) I'm going to transfer to a discussion (our new forum for support). If it's no longer happening, please close out. |
Beta Was this translation helpful? Give feedback.
-
First of all, this script is awesome and is working almost perfectly. I just had a follow-up question related to a thread that has already been resolved. When I first set this up, any events in the past were being removed from my Google Cal. I then read #109 and added this which then kept the old events. However, as mentioned in the thread, sometimes when something is adjusted or deleted on the same day, it does not delete from the Google Cal. Sometimes it does, sometimes not. Is there any way for this to be fixed so that even if something is deleted on the same day, the change reflects in the Google Cal?
Beta Was this translation helpful? Give feedback.
All reactions