Skip to content

Fix bug when non active participant is rendered

What does this MR do and why?

Describe in detail what your merge request does and why.

Fixes bug in rendering oncall schedule rotation when participant is no longer active, introduced in !90497 (merged).

Testing will be added urgently via this issue #371217 (closed)

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

before after
Screen_Shot_2022-08-18_at_18.26.54 Screen_Shot_2022-08-18_at_18.26.28

How to set up and validate locally

  1. Open a project where you are at least a maintainer and at least Premium is activated
  2. On the left menu bar select Monitor->On-Call Schedules
  3. Add a schedule
  4. Add a rotation with at least 2 participants
  5. Allow for time to pass so that the shift occurs in the past.
  6. Remove a participant from the rotation Since you cannot wait for time to pass, this is not possible, you can change ee/app/assets/javascripts/oncall_schedules/components/schedule/components/shifts/components/schedule_shift_wrapper.vue#L43 to
      [].forEach(({ id }, index) => {

This will make all participants no longer active participants

  1. reload oncall schedules page

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by James Rushford

Merge request reports