Skip to content

Fix all day events from Outlook allowing bookings#2464

Merged
pumfleet merged 3 commits intomainfrom
hotfix/outlook-all-day-events
Apr 12, 2022
Merged

Fix all day events from Outlook allowing bookings#2464
pumfleet merged 3 commits intomainfrom
hotfix/outlook-all-day-events

Conversation

@joeauyeung
Copy link
Copy Markdown
Contributor

What does this PR do?

This is a hot fix to not allow bookings for all day events. Since busy times coming from MS Graph were in UTC, converted to a dayjs object, back to a string, it would apply the UTC offset to the time which allowed some bookings through.

Fixes issue from email thread.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How should this be tested?

  • Connect an Outlook calendar
  • Create an all day event on Outlook
  • Go back to cal.com and on the availability page select the day that you made the all day event
  • You should see no times for that day

@joeauyeung joeauyeung requested a review from PeerRich April 11, 2022 18:59
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 11, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

docs – ./apps/docs

🔍 Inspect: https://vercel.com/cal/docs/6WqYqYFXJpM97rM4o7nkytCEnfA6
✅ Preview: Canceled

[Deployment for 77ec7b8 canceled]

calendso – ./apps/web

🔍 Inspect: https://vercel.com/cal/calendso/9JqHZMsPZNPkZq1R5FdXjQqWLZgA
✅ Preview: https://calendso-git-hotfix-outlook-all-day-events-cal.vercel.app

Comment on lines -90 to +91
start: dayjs(a.start).subtract(currentUser.bufferTime, "minute").toString(),
end: dayjs(a.end).add(currentUser.bufferTime, "minute").toString(),
start: dayjs(a.start).subtract(currentUser.bufferTime, "minute"),
end: dayjs(a.end).add(currentUser.bufferTime, "minute"),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pass dayjs object to determine unavailable times

@joeauyeung joeauyeung marked this pull request as ready for review April 11, 2022 19:00
@vercel vercel Bot temporarily deployed to Preview – calendso April 11, 2022 19:00 Inactive
@vercel vercel Bot temporarily deployed to Preview – docs April 11, 2022 19:00 Inactive
@vercel vercel Bot temporarily deployed to Preview – calendso April 12, 2022 12:01 Inactive
@vercel vercel Bot temporarily deployed to Preview – docs April 12, 2022 12:01 Inactive
@pumfleet pumfleet merged commit 9d86039 into main Apr 12, 2022
@pumfleet pumfleet deleted the hotfix/outlook-all-day-events branch April 12, 2022 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants