oncall-engine/engine/apps
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
..
alerts add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
api Update shift week_start when translating to UTC (#2124) 2023-06-13 14:31:50 +00:00
api_for_grafana_incident add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
auth_token Improve plugin authentication (#1995) 2023-05-23 16:13:25 +00:00
base add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
email Fix warnings when running backend tests (#2079) 2023-06-06 18:38:00 +00:00
grafana_plugin add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
heartbeat Add database migrations linter (#1020) 2023-02-06 16:01:37 +08:00
integrations Draft AlertManager integration v2 (#2167) 2023-06-13 07:10:38 +00:00
metrics_exporter Save only organizations with integrations in cache (#2190) 2023-06-13 13:31:14 +00:00
mobile_app add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
oss_installation Add database migrations linter (#1020) 2023-02-06 16:01:37 +08:00
phone_notifications Better simple phone provider (#2143) 2023-06-09 13:21:38 +08:00
public_api Draft AlertManager integration v2 (#2167) 2023-06-13 07:10:38 +00:00
schedules add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
slack remove SlackActionRecord model/table (#2201) 2023-06-13 10:56:06 +00:00
social_auth Social auth exception logging (#2041) 2023-06-02 11:20:54 +00:00
telegram add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
twilioapp add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
user_management remove SlackActionRecord model/table (#2201) 2023-06-13 10:56:06 +00:00
webhooks add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00