Skip to content

Generate shifts for a timeframe based on on-call rotation params

Sarah Yasonik requested to merge 262860-generate-shifts-dynamically into master

What does this MR do?

Related issue: #262860 (closed).

This is one of several MRs for managing on-call shifts. Under Operations > On-call schedules, we're building the tools to manage an on-call rotation for a project. A project can have an OncallSchedule, which can have many OncallRotations, which describe the participants of the rotation and the parameters of the OncallShifts for that rotation. For example, the image in the proposal section of #262860 (closed) shows a single schedule with a single rotation which has 3-day-long shifts & four participants.

#262860 (closed) is comprised of several pieces:

This MR adds a class which does two things:

  • generates a collections shifts based on a range of time and an IncidenmentManagement::OncallRotation
  • generates a single shift based on a timestamp and a rotation

Changes in this MR are not yet user-facing, so there won't be a changelog.

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #262860 (closed)

Edited by Sarah Yasonik

Merge request reports