oncall-engine/engine/apps
Vadim Stepanov a936c8c7fe
Improve schedule quality feature (#1602)
# What this PR does

Before:

<img width="281" alt="Screenshot 2023-03-23 at 16 56 42"
src="https://user-images.githubusercontent.com/20116910/227279464-c883ec05-a964-4360-bda2-3443409ca90a.png">

After:

<img width="338" alt="Screenshot 2023-03-23 at 16 57 41"
src="https://user-images.githubusercontent.com/20116910/227279476-468bffba-922a-45ea-b400-5f34d6bf0534.png">


- Add scores for overloaded users, e.g. `(+25% avg)` which means the
user is scheduled to be on-call 25% more than average for given
schedule.
- Add score for gaps, e.g. `Schedule has gaps (29% not covered)` which
means 29% of time no one is scheduled to be on-call.
- Make things easier to understand when there are gaps in the schedule,
add `(see overloaded users)` text.
- Consider events for next 52 weeks (~1 year) instead of 90 days (~3
months), so the quality report is more accurate. Also treat any balance
quality >95% as perfectly balanced. These two changes (period change and
adding 95% threshold) should help eliminate false positives for _most_
schedules.
- Modify backend & frontend so the backend returns all necessary user
information to render without using the user store.
- Move quality report generation to `OnCallSchedule` model, add more
tests.

## Which issue(s) this PR fixes
Related to https://github.com/grafana/oncall/issues/1552

## Checklist

- [x] Tests updated
- [x] `CHANGELOG.md` updated
(public docs will be added in a separate PR)
2023-03-27 11:03:16 +00:00
..
alerts Teams redesign (#1528) 2023-03-22 00:57:20 +08:00
api Improve schedule quality feature (#1602) 2023-03-27 11:03:16 +00:00
api_for_grafana_incident Include alert details in Grafana Incident alert-group endpoint (#1280) 2023-02-03 13:43:21 +00:00
auth_token Change Organization Deleted/Moved Precedence (#1402) 2023-02-24 11:45:21 +00:00
base Inbound email integration (#837) 2023-03-16 13:59:21 +08:00
email Inbound email integration (#837) 2023-03-16 13:59:21 +08:00
grafana_plugin Check stack cluster for insight_logs (#1469) 2023-03-09 06:30:54 +00:00
heartbeat Add database migrations linter (#1020) 2023-02-06 16:01:37 +08:00
integrations Inbound email integration (#837) 2023-03-16 13:59:21 +08:00
mobile_app minor bugfix for ios push notifications config (#1614) 2023-03-23 14:48:52 +00:00
oss_installation Add database migrations linter (#1020) 2023-02-06 16:01:37 +08:00
public_api Teams redesign (#1528) 2023-03-22 00:57:20 +08:00
schedules Improve schedule quality feature (#1602) 2023-03-27 11:03:16 +00:00
slack Add SLACK_INTEGRATION_MAINTENANCE env var (#1582) 2023-03-21 08:15:35 +00:00
social_auth Rework slack login to check backend before redirecting (#1306) 2023-02-08 09:08:18 -03:00
telegram Refactor get_user_verbal_for_team_for_slack. (#809) 2023-03-07 10:09:37 +00:00
twilioapp Add database migrations linter (#1020) 2023-02-06 16:01:37 +08:00
user_management Fix teams duplication and user list permission control (#1591) 2023-03-22 14:38:31 +08:00
webhooks Keep webhook responses data (#1580) 2023-03-21 13:43:37 +00:00
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00