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

Improve schedule quality feature #1602

Merged
merged 17 commits into from
Mar 27, 2023
Merged

Conversation

vstpme
Copy link
Member

@vstpme vstpme commented Mar 22, 2023

What this PR does

Before:

Screenshot 2023-03-23 at 16 56 42

After:

Screenshot 2023-03-23 at 16 57 41

  • 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 #1552

Checklist

  • Tests updated
  • CHANGELOG.md updated
    (public docs will be added in a separate PR)

@vstpme vstpme added the pr:no public docs Added to a PR that does not require public documentation updates label Mar 23, 2023
@vstpme vstpme changed the title WIP: fix schedule quality issues Improve schedule quality feature Mar 23, 2023
@vstpme vstpme marked this pull request as ready for review March 23, 2023 17:52
@vstpme vstpme requested review from a team March 23, 2023 17:52
Copy link
Contributor

@matiasb matiasb left a comment

Choose a reason for hiding this comment

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

LGTM, minor comment/question.

Copy link
Member

@teodosii teodosii left a comment

Choose a reason for hiding this comment

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

Looks good! 👍

@vstpme vstpme added this pull request to the merge queue Mar 27, 2023
Merged via the queue into dev with commit a936c8c Mar 27, 2023
@vstpme vstpme deleted the vadimkerr/schedule-quality-issues branch March 27, 2023 11:23
brojd pushed a commit that referenced this pull request Sep 18, 2024
# 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 #1552

## Checklist

- [x] Tests updated
- [x] `CHANGELOG.md` updated
(public docs will be added in a separate PR)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:no public docs Added to a PR that does not require public documentation updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants