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

Configure free/busy for all-day events #226

Closed
coyotejackson opened this issue Jul 27, 2021 · 7 comments
Closed

Configure free/busy for all-day events #226

coyotejackson opened this issue Jul 27, 2021 · 7 comments
Labels
enhancement New feature or request

Comments

@coyotejackson
Copy link

This script is wonderful, thank you!

One thing that would make a huge difference for being able to use this in connection with scheduling apps integrated with my google calendar is the ability to set whether the all day events synced are created as free or busy. Right now when these all day events are synced into Google Calendar they get created as busy. There isn't an option in Google Calendar to specify. In the native Google Calendar UI if you create an all-day event it will create it automatically with "free", as opposed to an event with specific times which get created as busy. But, the all-day events synced in with this script get created with busy status. This blocks off the entire day which makes this synced calendar not useful. Adding a feature flag in the script to specify whether all-day events should be created as free/busy/default would be immensely useful.

@coyotejackson coyotejackson added the enhancement New feature or request label Jul 27, 2021
@jonas0b1011001
Copy link
Collaborator

[This was requested in #211 before.]

Creating events as busy actually is the default when using the API to create them (https://developers.google.com/calendar/api/v3/reference/events), changing it to free should be achievable by the following change. Not sure if an additional setting is really needed.

Replace Helpers.gs lines 373 - 377

  if (event.hasProperty('transp')){
    var transparency = event.getFirstPropertyValue('transp').toString().toLowerCase();
    if(["opaque", "transparent"].indexOf(transparency) > -1)
      newEvent.transparency = transparency;
  }

with

  if (event.hasProperty('transp')){
    var transparency = event.getFirstPropertyValue('transp').toString().toLowerCase();
    if(["opaque", "transparent"].indexOf(transparency) > -1)
      newEvent.transparency = transparency;
  }
  else
  {
    newEvent.transparency = "transparent";
  }

You'll have to sync to a different target calendar to see the change.

@coyotejackson
Copy link
Author

Fantastic, I made this change and it works. This is a big enhancement since the vast majority of all-day events for me anyway are often not "real" appointments - they are holidays, upcoming events to plan for, reminders etc. and with this change now I can have my workouts sync from TrainingPeaks into Google Calendar but not have the whole day blocked out. Thanks!

@coyotejackson
Copy link
Author

Will send a donation.

@IssueHuntBot
Copy link

@coyotejackson has funded $50.00 to this issue.


@IssueHuntBot
Copy link

@coyotejackson has cancelled funding for this issue.(Cancelled amount: $50.00) See it on IssueHunt

@coyotejackson
Copy link
Author

Oops sorry didn't know you'd have to submit pull request to get the money :) I'll send via PayPal instead, you've already provided what's needed.

@spark-your-heart-ablaze
Copy link

For some reason this solution does not work me. The events are still created as Busy in a target calendar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants