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

fix: make half-day selection more precise #98

Merged
merged 3 commits into from
Jul 26, 2023
Merged

Conversation

lyind
Copy link
Contributor

@lyind lyind commented Jul 25, 2023

Fixes https://github.com/giantswarm/giantswarm/issues/27691

Summary

Single-day events which both start and end in the hour 12 (12:00 - 12:59) were erroneously interpreted and inserted/updated as whole-day time-offs in Personio (both half_day_start and half_day_end flags set).

Changes

This PR fixes the issue by improving:

  1. Interpretation and normalization of Google Calendar events into internal TimeOffs objects (dates + half-days)
    • Fixes the original issue
  2. Serialization of internal TimeOff objects to Personio API time-off update payload/body
    • Avoids similar issues to the original issue from occuring again (robustness)
  3. Relevant tests.

@lyind lyind added the bug Something isn't working label Jul 25, 2023
@lyind lyind self-assigned this Jul 25, 2023
@lyind lyind requested a review from a team as a code owner July 25, 2023 17:07
@lyind lyind force-pushed the fix-half-day-precision branch 4 times, most recently from bd357ba to 6cb0080 Compare July 25, 2023 17:19
@lyind lyind marked this pull request as draft July 25, 2023 17:19
@lyind lyind force-pushed the fix-half-day-precision branch 15 times, most recently from 1c13a45 to cf3123c Compare July 25, 2023 18:44
@lyind lyind requested a review from MarcelMue July 25, 2023 20:12
@lyind lyind marked this pull request as ready for review July 25, 2023 20:12
@lyind lyind merged commit 3dbaaec into main Jul 26, 2023
6 checks passed
@lyind lyind deleted the fix-half-day-precision branch July 26, 2023 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants