Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use consistent case in old message count conditions #3454

Merged
merged 3 commits into from Feb 2, 2017
Merged

Conversation

edmundoa
Copy link
Contributor

@edmundoa edmundoa commented Feb 1, 2017

Since 2.2.0, we are storing the message count threshold_type parameter in upper case, just like we do with other types in field value conditions. Previous Graylog versions were storing threshold_type in lower case, same case that were use in parameters when instantiating new
MessageCountAlertCondition objects. This resulted in case inconsistencies in objects from that class, which were propagated to the API and persistence layer.

This PR converts threshold_type to upper case, so we use that case when instantiating old conditions. I also included two other related small fixes: using consistent case in alert condition descriptions, and fixing the option keys in DropdownFields. Let me know if I crept too much in here 馃槈

Fixes #3451

Edmundo Alvarez added 3 commits February 1, 2017 15:48
Since 2.2.0, we are storing the message count `threshold_type` parameter in
uppercase, just like we do with other types in field value conditions.
Previous Graylog versions were storing `threshold_type` in lowercase,
same case that were use in parameters when instantiating new
MessageCountAlertCondition objects. This resulted in case inconsistencies
in objects from that class, which were propagated to the API and
persistance layer.

This commit converts `threshold_type` to uppercase, so we use that case
when instantiating old conditions.

Fixes #3451
Copy link
Member

@bernd bernd left a comment

Choose a reason for hiding this comment

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

LGTM and fixes the backward compat problem 馃憤

@bernd bernd merged commit f67e711 into master Feb 2, 2017
@bernd bernd deleted the issue-3451 branch February 2, 2017 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alert condition threshold type resets when entering title
2 participants