grafana / oncall

Developer-friendly incident response with brilliant Slack integration
GNU Affero General Public License v3.0
3.46k stars 279 forks source link

When creating a schedule, selecting and unselecting "Limit Shift Length" always makes the shift length 1 day #2561

Open thomasmitchell opened 1 year ago

thomasmitchell commented 1 year ago

What went wrong?

What happened:

What did you expect to happen:

How do we reproduce it?

  1. Create a new schedule in the plugin
  2. Create a new rotation
  3. Change the recurrence period to 1 weeks
  4. Add a user into the rotation
  5. Select Limit Shift Length
  6. Unselect Limit Shift Length
  7. Create the rotation - notice that the schedule is now a one-day shift every 7 days.

Grafana OnCall Version

v1.3.14

Product Area

Schedules

Grafana OnCall Platform?

Kubernetes

User's Browser?

Firefox 115.0.1 (64-bit)

Anything else to add?

There is a workaround in that you can change the recurrence to something else and then back to the desired value to reset the shift limit again.

devminded commented 8 months ago

Any news on this? We're on latest 1.3.90, bug is still present.

There is something about how the default value is handled when showActiveOnSelectedPartOfDay is not enabled https://github.com/grafana/oncall/blob/d3b1dc619ede45f70ae22330560ac038ca997f99/grafana-plugin/src/containers/RotationForm/RotationForm.tsx#L615-L632

We have our on call shift at 1 week, from Thursday 18:00 to next Thursday same time. When we don't set limit it only schedules one day. When setting limits we can only set 6 days, which means the shift ends a day early.