#203 some calendars don't work with Google Calendars URL import
Closed: Fixed 4 months ago by pingou. Opened 8 months ago by chrismurphy.

Describe what you would like us to do:


Fix server and cloud ical subscriptions so they work with Google Calendars; workstation and qa calendars work correctly.

  1. Go here https://calendar.fedoraproject.org/cloud/
  2. Mouse over on 'cloud' on the left hand column to reveal options
  3. click the 'copy iCal link' option; control-c to copy
  4. Google Calendar, find 'Other calendars' and click on the '+' icon to add other calendars
  5. Choose 'From URL' from the list
  6. Paste the URL https://calendar.fedoraproject.org//ical/cloud/ in the location provided and click 'Add calendar'. Notification, 'calendar added'. Optional: rename the calendar to something other than its URL, which is the default
  7. Click the <-- arrow in the upper left corner next to the word Settings to get back to the calendar
  8. Click and unclick the cloud (or server) calendars and notice that there is nothing scheduled showing up at all in any month.

Repeat this with either QA or Workstation calendars, and it works. In step 8, you'll see scheduled items appear and vanish.

When do you need this to be done by? (YYYY/MM/DD)


sooner than later, kinda hard to to keep track of meetings when the subscriptions aren't working


The same issue is also for SIGs meeting. I missed ELN meeting because of not seeing it in my calendar. Please would be great to have this solved soon.

As a workaround, edit the ical file and remove decimals from the interval value:

RRULE:FREQ=WEEKLY;INTERVAL=2.0;UNTIL=20251231T000000Z

to

RRULE:FREQ=WEEKLY;INTERVAL=2;UNTIL=20251231T000000Z

Nifty work around, although the problem is that I then have to import an ical file into Google Calendar which means it's not a subscription that automatically picks up any changes to the schedule.

The workaround suggested gave me a trail to follow.

In fedocal/fedocallib/__init.py__ the function add_meeting_to_vcal calculates some values to pass to the rrule function. In the code block below, the interval value is set equal to freq. Earlier in the code, freq is set to meeting.recursion_frequency / 7. I believe this would cast freq to a float so interval=freq would cast interval to float as well.

In the code block below, interval=freq, has been changed to interval=int(freq), to cast interval as an integer. Perhaps freq also needs to be recast as an integer, but I haven't dug that deep into rrule.

if meeting.recursion_frequency and meeting.recursion_ends:
    newrule = rrule.rruleset()
    freq = meeting.recursion_frequency / 7
    recursion_ends = datetime.combine(
        meeting.recursion_ends, time(0)).replace(tzinfo=pytz.utc)
    newrule.rrule(
        rrule.rrule(
            freq=rrule.WEEKLY,
            interval=int(freq),
            dtstart=start.value,
            until=recursion_ends))
    entry.rruleset = newrule

If I can get my fedocal dev instance working I should be able to test this.

Please let me know If this seems to be the right path.

Thanks,
AustinPowered

This starts to sound like a py2/py3 migrate fall over, iirc something changed in
python in division (by int or float) in py3 vs py2.

It would appear @lorbus already arrived at the same conclusion regarding properly casting variables to int for the RRULE function. See PR-205

I'm more or less retired but I'm still a life-long learner and all of this is new to me. While I have much still to learn about Python, my engagement with the Fedora Project is driven by a desire to learn more about the collaboration process in software development projects.

That said, please take the following as a naive question and not a criticism. Should the PR be referenced as a comment in the issue? It seems the PR isn't getting seen by the right people to move it forward.

Respectfully submitted,
AustinPowered

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #205 Merged 4 months ago