Graylog2 / Graylog2/graylog2-server

Prevent saving an Event Definition with Cardinality Aggregation without field specified.

Open
#18,034 1 comment 0 reactions 1 assignee Assigned to @maxiadlovskii View on GitHub
bug Medium Prio triaged
Dominant language
Java
Stars
8.1k
Forks
1.1k
Avg merge
1d 20h
Merged PRs (30d)
217

Description

Prevent saving an Event Definition with Cardinality Aggregation without field specified.

## Expected Behavior
Field should be mandatory for Cardinality Aggregation.

## Current Behavior
You can save an Event Definition with Cardinality Aggregation ... without field specified:
![image](https://github.com/Graylog2/graylog2-server/assets/100699120/0888375c-0f93-422c-afb6-d60de1f58664)

## Possible Solution
Better validation, probably both BE and FE.

## Steps to Reproduce (for bugs)
1. Create or edit event definition.
2. Choose: `Create Events for Definition if...` -> `Aggregation of results reaches a threshold`
3. Pick cardinality, but do not choose a field.
4. Notice you can save this kind of event definition.

## Context
HS-2290625939

## Your Environment

* Graylog Version: 5.2.3

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.