Skip to content

[8.19] [ResponseOps][MaintenanceWindows] Move recurring schedule form to dedicated package (#220535)#223203

Merged
umbopepato merged 3 commits intoelastic:8.19from
umbopepato:backport/8.19/pr-220535
Jun 10, 2025
Merged

[8.19] [ResponseOps][MaintenanceWindows] Move recurring schedule form to dedicated package (#220535)#223203
umbopepato merged 3 commits intoelastic:8.19from
umbopepato:backport/8.19/pr-220535

Conversation

@umbopepato
Copy link
Member

Backport

This will backport the following commits from main to 8.19:

Questions ?

Please refer to the Backport tool documentation

…icated package (elastic#220535)

## Summary

Moves the recurring schedule (rrule) form from the Maintenance Windows
form to a dedicated package.

## Implementation details

~~Because of the tight time constraints we have for this epic, I tried
to change the recurring schedule form as little as possible, keeping the
existing form-lib-based implementation and adding an intermediate layer
to embed the editing UI in larger forms (i.e. MW form). While this is
not particularly elegant, it allows us to build on top of an existing,
tested codebase and to leverage form-lib's validation and state
management capabilities.~~

~~In the context of the MW form, the recurring schedule editor is
treated as a single field. Value and error updates are synced through
form-lib's field hook API:~~

https://github.com/elastic/kibana/blob/acd6a4823e5b9c53ae7cbed59a246972ab32cfe0/x-pack/platform/plugins/shared/alerting/public/pages/maintenance_windows/components/recurring_schedule_field.tsx#L21-L34

~~Errors are handled internally by the schedule editor, but must still
be surfaced up to the parent form in order to have a consistent validity
state (otherwise submits are not prevented even if errors are shown in
the UI).~~

The recurring schedule form schema and form fields are exported to be
reused in larger form-lib forms.

## References

Closes elastic#219454

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 664a435)

# Conflicts:
#	src/platform/packages/shared/response-ops/recurring-schedule-form/utils/convert_to_rrule.ts
#	src/platform/packages/shared/response-ops/recurring-schedule-form/utils/parse_schedule.ts
#	src/platform/packages/shared/response-ops/recurring-schedule-form/utils/recurring_summary.ts
#	x-pack/platform/plugins/shared/alerting/public/pages/maintenance_windows/components/recurring_schedule_form/custom_recurring_schedule.test.tsx
#	x-pack/platform/plugins/shared/alerting/public/pages/maintenance_windows/components/recurring_schedule_form/custom_recurring_schedule.tsx
#	x-pack/platform/plugins/shared/alerting/public/pages/maintenance_windows/components/recurring_schedule_form/recurring_schedule.test.tsx
#	x-pack/platform/plugins/shared/alerting/public/pages/maintenance_windows/components/recurring_schedule_form/recurring_schedule.tsx
#	x-pack/platform/plugins/shared/alerting/public/pages/maintenance_windows/constants.ts
@umbopepato umbopepato added the backport This PR is a backport of another PR label Jun 10, 2025
@umbopepato umbopepato enabled auto-merge (squash) June 10, 2025 10:00
@elasticmachine
Copy link
Contributor

elasticmachine commented Jun 10, 2025

💔 Build Failed

Failed CI Steps

History

@umbopepato umbopepato merged commit c97aedb into elastic:8.19 Jun 10, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants