diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fe15105..f36e56f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 by excluding dark theme css vars in this case ([#3336](https://github.com/grafana/oncall/pull/3336)) - Fix issue when acknowledge reminder works for deleted organizations @Ferril ([#3345](https://github.com/grafana/oncall/pull/3345)) - Fix generating QR code ([#3347](https://github.com/grafana/oncall/pull/3347)) +- Fixed recurrency limit issue in the Rotation Modal ([#3358](https://github.com/grafana/oncall/pull/3358)) ## v1.3.57 (2023-11-10) diff --git a/grafana-plugin/src/containers/RotationForm/RotationForm.tsx b/grafana-plugin/src/containers/RotationForm/RotationForm.tsx index ed02dd3b..3f09db67 100644 --- a/grafana-plugin/src/containers/RotationForm/RotationForm.tsx +++ b/grafana-plugin/src/containers/RotationForm/RotationForm.tsx @@ -283,22 +283,19 @@ const RotationForm = observer((props: RotationFormProps) => { [showActiveOnSelectedPartOfDay, showActiveOnSelectedDays, repeatEveryValue] ); - const handleRepeatEveryValueChange = useCallback( - (option) => { - const value = Math.floor(Number(option.value)); - if (isNaN(value) || value < 1) { - return; - } + const handleRepeatEveryValueChange = (option) => { + const value = Math.floor(Number(option.value)); + if (isNaN(value) || value < 1) { + return; + } - setShiftPeriodDefaultValue(undefined); - setRepeatEveryValue(value); + setShiftPeriodDefaultValue(undefined); + setRepeatEveryValue(value); - if (!showActiveOnSelectedPartOfDay) { - setShiftEnd(shiftStart.add(value, repeatEveryPeriodToUnitName[repeatEveryPeriod])); - } - }, - [showActiveOnSelectedPartOfDay, repeatEveryPeriod] - ); + if (!showActiveOnSelectedPartOfDay) { + setShiftEnd(rotationStart.add(value, repeatEveryPeriodToUnitName[repeatEveryPeriod])); + } + }; const handleRotationStartChange = useCallback( (value) => {