form3tech-oss / go-pagerduty-oncall-report

Generate a report for the oncall rotation using PagerDuty API
Apache License 2.0
23 stars 12 forks source link

Extend report to consider users across different timezones #41

Closed renato-araujo-form3 closed 2 years ago

renato-araujo-form3 commented 2 years ago

Context

This PR introduces support for calculating the remuneration of on-call employees considering their timezones.

It is now possible to have a single more complex schedule with engineers located in different parts of the world and exclude the work schedule based on their timezones.

This featured required to add a new parameter (defaultUserTimezone) to define the default user timezone when not found in the PagerDuty API. This is to cover an edge case when there is a user listed in a PagerDuty schedule but for some reason was removed from the PagerDuty (i.e. left the company).

Proof of Work

To exemplify one schedule will be created having the following parameters/configurations:

From the previous version without the timezone feature, the report generated will look like the image below:

The new version of the generated report:

Extra mile