Skip to content
This repository has been archived by the owner on Oct 30, 2021. It is now read-only.

[BB-3173] Fix calculating vacations and commitments #59

Merged
merged 4 commits into from
Nov 16, 2020

Conversation

Agrendalath
Copy link
Member

@Agrendalath Agrendalath commented Nov 15, 2020

What it is

This contains the following changes:

  1. Fixes calculating commitments and vacations with the assumption that a new sprint starts at midnight UTC.
  2. Upgrades Python to 3.9 and Django to 3.1.3 and bumps dependencies (minor changes; unfortunately we cannot use PEP 585, because mypy does not support it yet).
  3. Removes unused code from the cookiecutter template.

Testing instructions

  1. Set .env and frontend/env.local (you can find them in a comment on the ticket).
  2. Comment out these two lines. They're irrelevant to the scope and will only slow down the local environment.
  3. Start the backend with docker-compose -f local.yml up --build.
  4. Register new account and get the verification link with docker-compose -f local.yml logs django.
  5. Run migrations with docker-compose -f local.yml exec django python manage.py migrate.
  6. Navigate to frontend directory and run npm i && npm start.
  7. Log in and navigate to cell's board.
  8. Create an "off" calendar event for 4 edge cases described in the _get_vacation_for_day's docstring. Change your timezone here to a negative one to see how it impacts these cases.

@Agrendalath Agrendalath self-assigned this Nov 15, 2020
@Agrendalath Agrendalath added bug Something isn't working dependencies Pull requests that update a dependency file labels Nov 15, 2020
Comment on lines +459 to +460
TODO: Check whether this works correctly with other sprint start times than midnight UTC.
For these it can span 3 days, so we might have 6 (or even more) corner cases.
Copy link
Member Author

Choose a reason for hiding this comment

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

This is not our use case now, so I omitted this.

@Agrendalath Agrendalath force-pushed the agrendalath/bb-3173-unify_sprint_end_times branch from 23d4630 to 100c08d Compare November 15, 2020 00:52
@Agrendalath Agrendalath force-pushed the agrendalath/bb-3173-unify_sprint_end_times branch from 100c08d to 0174590 Compare November 15, 2020 01:01
Copy link
Member

@0x29a 0x29a left a comment

Choose a reason for hiding this comment

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

👍

  • I tested that all 8 scenarios from _get_vacation_for_day docstring work properly for team members from different time zones.
  • I read through the code
  • Includes documentation

@Agrendalath Agrendalath merged commit 0fce937 into master Nov 16, 2020
@Agrendalath Agrendalath deleted the agrendalath/bb-3173-unify_sprint_end_times branch November 16, 2020 19:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants