Skip to content
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

Sync Annual Nth recurrences rules as 12 monthly O->G #445

Closed
HCITMK opened this issue Jan 25, 2018 · 27 comments
Closed

Sync Annual Nth recurrences rules as 12 monthly O->G #445

HCITMK opened this issue Jan 25, 2018 · 27 comments
Assignees
Labels
enhancement New feature recurring appointment resolved Working hotfix available
Milestone

Comments

@HCITMK
Copy link

HCITMK commented Jan 25, 2018

📝 Use the below template to report your issue.
💡 Have you upgraded to the latest alpha to check if the problem is already fixed?
📎 To aid investigation, please provide your OGcalsync.log file (see instructions).


OGCS Version: v1.2.3.4
Installed or Portable: Installed

Problem Description
<Update here>An appointment with a recurrence, say 1st Thursday in May every year, is not corrently reflected in gmail.

Steps to Reproduce the Issue

  1. <Update>

Any other information
<Update here>

@phw198
Copy link
Owner

phw198 commented Jan 25, 2018

You've not provided the version of OGCS you are running.

@HCITMK
Copy link
Author

HCITMK commented Jan 26, 2018

My apologies, I am new to OGCS. I previously used Sony Companion quite successfully on Windows XP, but it won't run on Windows 10, so I'm looking around for an alternative application and came across yours.

I am running version 2.6.5.0

I have just set up two repeating events for today , 'Repeat Yearly' and 'Repeat 12 Monthly', both with the 'fourth Friday of January' recurrence and run OGCS. Both events appear in Google Calendar as Repeat 'Annualy on 26 January'? And on 26 January 2019, not the 4th Friday. A log is attached.

OGcalsync.log

@HCITMK
Copy link
Author

HCITMK commented Jan 26, 2018

I've downloaded setup.exe for version 2.6.6.0, but when run, Windows 10 intervenes with: "Windows Defender SmartScreen prevented an unreconised app from starting. Running this app might put your PC at risk" , without an override option?

@phw198
Copy link
Owner

phw198 commented Jan 26, 2018

OK, thanks I will investigate the annual recurrence issue.

For the v2.6.6.0 download, check if Edge has unhelpfully blocked the downloaded file - right click, Properties and click Unblock? Alternatively, in OGCS > About > Check for Alpha updates >Check for Update.

@phw198 phw198 self-assigned this Jan 26, 2018
@phw198
Copy link
Owner

phw198 commented Jan 27, 2018

No, I can't replicate this. I created a recurring annual event on 4th Friday of January (26th for 2018), and OGCS replicates this as

2018-01-27 11:24:29,265 DEBUG  11 OutlookGoogleCalendarSync.GoogleOgcs.Calendar [317] -  Processing >> 26/01/2018 15:00 (R) => "TEST"
2018-01-27 11:24:29,306 DEBUG  11 OutlookGoogleCalendarSync.Recurrence [31] -  Creating Google iCalendar definition for recurring event.
2018-01-27 11:24:29,386 DEBUG  11 OutlookGoogleCalendarSync.Recurrence [40] -  RRULE:FREQ=YEARLY;BYDAY=FR;BYMONTH=1;BYSETPOS=4

Checking in Google, the new interface doesn't know how to show it as it's too "complicated", but the meeting shows on Friday 25th Jan 2019 and Friday 24th Jan 2020.

@phw198 phw198 removed their assignment Jan 27, 2018
@HCITMK
Copy link
Author

HCITMK commented Jan 27, 2018 via email

@phw198
Copy link
Owner

phw198 commented Jan 27, 2018

v2.6.5 would be the more recent alpha and v2.6.0 the older beta. I would expect the problem to be in the beta if at all.

FYI new beta v2.7 is just out.

@HCITMK
Copy link
Author

HCITMK commented Jan 28, 2018 via email

@phw198
Copy link
Owner

phw198 commented Jan 29, 2018

Can OGCS respect the difference between an annual and a 12 monthly repeat in the next release?

I see what you mean, Google also allows for the recurrence in this way:
image

Though the root bug seems to be with other Android apps not being able to interpret the iCal standard properly for an annual recurrence. However, I've checked my previous test on the Google Android calendar app and it displays the events fine. Again, if I go to edit the appointment on my phone it shows it as "annual recurrence", but it's actually shows the events on the nth Friday of the month (so the same thing the web interface struggles with). Not a problem unless you want to edit the recurring pattern in Google though.

@phw198 phw198 added the enhancement New feature label Jan 29, 2018
@phw198
Copy link
Owner

phw198 commented Jan 29, 2018

I have tested an Outlook monthly recurrence with an interval of 12 and unfortunately the API surfaces it as an annual recurrence - it's being too "clever" for it's own good. I assume it is actually held differently deeper in the Outlook object model as Outlook remembers the difference if I save it either as an annual recurrence or as every 12 months.

So back to your question "can OGCS respect the difference" - no it can't because Microsoft doesn't! 🙄

@phw198 phw198 removed the enhancement New feature label Jan 29, 2018
@HCITMK
Copy link
Author

HCITMK commented Jan 30, 2018 via email

@phw198
Copy link
Owner

phw198 commented Jan 30, 2018

So let's be clear, OGCS is not doing anything "incorrectly".

If you use https://www.textmagic.com/free-tools/rrule-generator and plug in our example, it produces an RRULE that is exactly the same as what you see in the OGCS logs: FREQ=YEARLY;BYDAY=FR;BYSETPOS=4;BYMONTH=1

image

What you are asking for is an enhancement to make it more compatible with the shortcomings of other apps (indeed even the Google Calendar web app) 🙂

So we would need to say, if Outlook has olRecurringYearlyNth recurrence with an interval of 12, translate this to FREQ=MONTHLY;BYDAY=FR;BYSETPOS=4;INTERVAL=12.

And, strictly, this would need to be done for two-way sync back in to Outlook too, else we would trample the original yearly recurrence with a Google-pleasing 12 monthly recurrence. Do-able I guess...

Re the WET time"zone" that isn't - you've contaminated your appointments with a time region of UTC+1 which has no mapping to a unique IANA timezone. You can see support for CET is deprecated from IANA.

On a system that's not XP 😉 you'll need to edit each problematic appointment and pick a valid timezone.

@HCITMK
Copy link
Author

HCITMK commented Jan 30, 2018 via email

@phw198
Copy link
Owner

phw198 commented Jan 30, 2018

@HCITMK No worries - we'll get the bottom of this!

the translation by OGCS from the 1st Monday in February annually to the 5th of February annually, which may be the same this year, but not next. Surely, it is better to change the type of repeat rather than introduce an unintended change?

The point is that OGCS is not doing that and not introducing any change. It is following the iCAL standard and defines a rule for Google that is RRULE:FREQ=YEARLY;BYDAY=MO;BYMONTH=2;BYSETPOS=1. See, nowhere does that say "repeat on the 5th February". You need to check what is actually happening on the Google calendar as close to the truth as you can get: https://calendar.google.com - and this displays as you want. If you want, you could export the Google calendar as .ics and confirm the appointment is still defined with that RRULE.

💭 If you have an Android app that can't handle this recurrence, then it may be possible this is corrupting it to something else (ie repeat on 5 Feb each year) and by the time you check Google, it's wrong again and you're concluding OGCS is doing this?

What app are you using that can't handle this recurrence? If it's free I could try replicating the issue. Have you tried the official Google calendar app?

I do take your point however, that a) you can't view or edit the annual recurrence rule in Google; b) other dumb apps won't even display the annual recurrence series on the right days at all (taking your word on this). So for those reasons, I'm willing to entertain a workaround enhancement (not bugfix!) to OGCS.

Where do I need to edit the timezones, Outlook or Google Calendar?

It sounds like Outlook, but in whichever is the source calendar for the particular direction of sync when the error occurs. If you're one-way syncing O -> G, then edit in Outlook.

@phw198
Copy link
Owner

phw198 commented Jan 31, 2018

So I've had a play with translating an annual recurrence to 12 monthly recurrence - have a play and see if the Google apps are happier.

📦 Development build v2.7.0.1.zip (see instructions for applying).

Please let me know how it goes.

@HCITMK
Copy link
Author

HCITMK commented Feb 1, 2018 via email

@phw198 phw198 self-assigned this Feb 1, 2018
@phw198 phw198 changed the title Appointment Recurrences Sync Annual Nth recurrences rules as 12 monthly O->G Feb 1, 2018
@phw198 phw198 added the resolved Working hotfix available label Feb 1, 2018
@phw198 phw198 added this to the v2.7.0 milestone Feb 1, 2018
@phw198
Copy link
Owner

phw198 commented Feb 1, 2018

Yes exactly - and the purest in me hates this workaround 😞

I may further enhance this as a configurable option for the user, though.

As OGCS is a spare time project for me, I can't commit to dates for new features like contacts....but I'm coming round to the idea (upvote here) as the syncing of calendars is becoming more stable.

You can check here to see what's coming down the pipeline - calendar colour syncing and multiple calendar support first.

Repository owner deleted a comment from HCITMK Feb 1, 2018
@HCITMK
Copy link
Author

HCITMK commented Feb 1, 2018 via email

@phw198
Copy link
Owner

phw198 commented Feb 1, 2018

converting 12 monthly repeats into annual repeats was a bug

A bug in the sense that it's a limitation of the Outlook API - so the bug is Microsoft's not mine ;-)

So the options for "nth weekday of month recurrences" are:

  1. Native/Purist (v2.7.0.0) = rule doesn't display/isn't editable properly in Google apps
    1. Syncs annual recurrence as is to Google
    2. Syncs 12 monthly recurrence to Google as annual recurrence (Outlook API bug)
  2. Workaround (v2.7.0.1) = rule editable in Google apps
    1. Syncs annual recurrence to Google as 12 monthly recurrence
    2. Sync 12 monthly recurrence as 12 monthly recurrence (translate Outlook API bug)

As it's not possible to cherry pick 1i and 2ii I think you're right, the workaround is the lesser of the two evils and overall plays nicer with Google so it's probably not worth surfacing this as a choice to the user; I'll bake it into the next release as v2.7.0.1 is.

Thanks for your help on this and the donation! 👍

@phw198 phw198 closed this as completed in 2d34cc5 Feb 13, 2018
@HCITMK
Copy link
Author

HCITMK commented Apr 6, 2018 via email

@phw198
Copy link
Owner

phw198 commented Apr 7, 2018

Hi Andy,
Thanks for checking, but no not yet. Quite some growth pains the code needs to go through first in preparation, but I do now want to get Contacts sync in to OGCS.

@HCITMK
Copy link
Author

HCITMK commented Jul 15, 2018 via email

@phw198
Copy link
Owner

phw198 commented Jul 15, 2018

Hi @HCITMK - Looks like issue #455 which was fixed in v2.7.1.

If you are on an earlier version, due to a GitHub change you will need to download the latest version directly from the project website.

@HCITMK
Copy link
Author

HCITMK commented Feb 10, 2019 via email

@phw198
Copy link
Owner

phw198 commented Apr 10, 2019

Not started on Contacts sync yet, still a way off I'm afraid.

I'm aware that AVG is a medicine worse than the disease, yes 🙄 Seriously though, what version of OGCS are you running? I started code signing OGCS as of v2.7.3 so I would really hope that helps the likes of AVG from black listing it...

@HCITMK
Copy link
Author

HCITMK commented May 23, 2019

I was invited to install a new beta this morning which I duly did followed shortly afterwards by an AVG warning:

Threat Blocked

We've blocked OutlookGoogleCalendarSync.exe because it was infected with IDP.ALEXA.51.

What would you like to do?

I've temporarily move it to Quarantine.

Is this a known issue?

@phw198
Copy link
Owner

phw198 commented May 23, 2019

@HCITMK Unfortunately, I discovered the certificate authority I used do not provide code signing certificate renewals, so I had to purchase a new one. This has clearly lost the reputation the old certificate had built up, which is more than a little frustrating. Next year I will consider changing certificate authority for one that provides renewals so this does happen again (well, it will again next year, but that would then be the last time!)...

Note, that new certificate was only applied to v2.7.9 if you are installing a previous version of OGCS, then AVG is just being extra dumb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature recurring appointment resolved Working hotfix available
Projects
None yet
Development

No branches or pull requests

2 participants