Skip to content

Commit c6b6a27

Browse files
authored
Add missing notification grns to sharing dependency check during event definition creation (#23283)
* add missing notification grns to dependency check * add changelog
1 parent a243530 commit c6b6a27

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

changelog/unreleased/pr-23283.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
type = "f"
2+
message = "Fix dependency check during sharing of event definitions."
3+
4+
issues = ["graylog-plugin-enterprise#11055"]
5+
pulls = ["23283"]

graylog2-web-interface/src/components/event-definitions/event-definition-form/ShareForm.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ type Props = {
3232
const ShareForm = ({ onChange, eventDefinition }: Props) => {
3333
const handleEntityShareSet = (entityShare?: EntitySharePayload) => onChange('share_request', entityShare);
3434
const streamDependenciesGRN = eventDefinition?.config?.streams?.map((streamId) => createGRN('stream', streamId));
35+
const notificationDependenciesGRN = eventDefinition?.notifications?.map((notification) =>
36+
createGRN('notification', notification.notification_id),
37+
);
3538

3639
return (
3740
<Row>
@@ -44,7 +47,7 @@ const ShareForm = ({ onChange, eventDefinition }: Props) => {
4447
onSetEntityShare={handleEntityShareSet}
4548
entityType="event_definition"
4649
entityTitle=""
47-
dependenciesGRN={streamDependenciesGRN}
50+
dependenciesGRN={[...streamDependenciesGRN, ...notificationDependenciesGRN]}
4851
/>
4952
</Col>
5053
</Row>

0 commit comments

Comments
 (0)