Skip to content

Event Definitions - Retain selected sharing info across navigation (7.1) - #27059

Merged
danotorrey merged 1 commit into
7.1from
backport-7.1/14480-sigma-rules-form-on-share-tab-gets-cleared-on-navigation
Aug 25, 2026
Merged

danotorrey merged 1 commit into
7.1from
backport-7.1/14480-sigma-rules-form-on-share-tab-gets-cleared-on-navigation

Conversation

@ryan-carroll-graylog

@ryan-carroll-graylog ryan-carroll-graylog commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Note: This is a backport of #26990 to 7.1.

Backport notes

  • Scoped to the fix itself. The purely cosmetic type cleanups from the original PR (dropping the now-redundant EventDefinition & { share_request? } intersection in EventDefinitionFormContainer.tsx, EventDefinitionSummary.tsx, and useEventDefinitionCommonSteps.tsx) were left out — they are no-ops here, and touching EventDefinitionFormContainer.tsx makes Reviewbot flag a pre-existing react-hooks/set-state-in-effect violation in that file that master fixed in a separate, unrelated commit.
  • The new EventDefinitionFormContainer test case was omitted: it depends on the master-only useEntityShareState refactor (prepare().then(setEntityShareState)), whereas this branch reads share state from the reflux EntityShareStore and that test file mocks stores/connect non-reactively, so any adaptation would pass even with the fix reverted. The fix is covered by the two new EntityCreateShareFormGroup tests, which assert the restored selected_grantee_capabilities and the re-run dependency check.

Description

Keep the share settings of an event definition from getting cleared when navigating between wizard steps.

This turned out to affect all event definitions, not just sigma.

Motivation and Context

Closes: https://github.com/Graylog2/graylog-plugin-enterprise/issues/14480

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have requested a documentation update.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

…26990)

* Reain selected sharing info across navigation

* update cl

* cleanup

* fix linter issues

* address PR feedback

(cherry picked from commit 074aba3)
@ryan-carroll-graylog
ryan-carroll-graylog force-pushed the backport-7.1/14480-sigma-rules-form-on-share-tab-gets-cleared-on-navigation branch from 5e063d9 to cbba4d4 Compare August 21, 2026 14:56
@ryan-carroll-graylog

Copy link
Copy Markdown
Contributor Author

Tests successfully for me on https://server-pr-27059.dev.torch.sh/graylog/alerts/definitions

Note: that I had to make a few tweaks to the cherry-pick as noted in the description.

Please feel free to merge this once reviews are in.

@ryan-carroll-graylog
ryan-carroll-graylog marked this pull request as ready for review August 21, 2026 16:35
@kingzacko1 kingzacko1 self-assigned this Aug 24, 2026

@danotorrey danotorrey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and test successfully.

@danotorrey
danotorrey merged commit 6d231c6 into 7.1 Aug 25, 2026
28 checks passed
@danotorrey
danotorrey deleted the backport-7.1/14480-sigma-rules-form-on-share-tab-gets-cleared-on-navigation branch August 25, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants