oncall-engine/engine
Matias Bordese 6e5d417967
Update shift week_start when translating to UTC (#2124)
This fixes scenario described
[here](https://github.com/grafana/oncall/issues/2118#issuecomment-1580499754).

When a rotation is setup in UTC+1, and the shift starts at 00:00 with
Monday as active day and a weekly frequency, the values are translated
to UTC when submitting to the backend, so the shift data becomes
something like: shift starting at 23:00 on Sunday, but since week_start
is on Monday, the "first event" in the week belongs to the "previous
week". This can be addressed by moving the week_start, so a weekly shift
that was starting on a Monday but in UTC tz starts on Sunday,
"translates" to a UTC week_start on Sunday:


![rotation-example](https://github.com/grafana/oncall/assets/260710/5222d3ce-52b7-41d5-8ecb-d01c7a0139cb)


(this is with the proposed changes; otherwise you get the same issue
linked above where the first event in the week is assigned to the other
user group).

About selected week days changed when editing a rotation, see inline
comment (related to
[this](https://github.com/grafana/oncall/issues/1322#issuecomment-1521787786))
2023-06-13 14:31:50 +00:00
..
apps Update shift week_start when translating to UTC (#2124) 2023-06-13 14:31:50 +00:00
common add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
config_integrations Disable alertmanager_v2 in web ui 2023-06-13 16:13:02 +08:00
engine Remove request reading middleware as we use post-buffering (#2094) 2023-06-05 11:49:39 +08:00
settings Draft AlertManager integration v2 (#2167) 2023-06-13 07:10:38 +00:00
static/images World, meet OnCall! 2022-06-03 08:09:47 -06:00
.dockerignore One startup command to rule them all (#760) 2022-11-07 16:34:43 +01:00
.gitignore modify push notification settings + use fcm-django library (#998) 2022-12-20 12:41:34 +01:00
celery_with_exporter.sh Add flag to debug logs (#912) 2022-11-29 11:16:42 +08:00
conftest.py remove SlackActionRecord model/table (#2201) 2023-06-13 10:56:06 +00:00
Dockerfile Run containers as a non-root user (#2053) 2023-06-08 07:12:00 +00:00
manage.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
pyproject.toml add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
requirements-dev.txt add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
requirements.txt add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
tox.ini Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
uwsgi.ini Run containers as a non-root user (#2053) 2023-06-08 07:12:00 +00:00
wait_for_test_mysql_start.sh Revert "Revert "speed up ci builds from 15 to <7 minutes"" (#1643) 2023-03-28 09:34:03 +02:00