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

Conversation

Projects
None yet
2 participants
@edmundoa
Member

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

edmundoa added some commits Feb 1, 2017

Use consistent case in old message count conditions
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
@bernd

bernd approved these changes Feb 2, 2017

LGTM and fixes the backward compat problem 馃憤

@bernd bernd merged commit f67e711 into master Feb 2, 2017

4 checks passed

ci-web-linter Jenkins build graylog-pr-linter-check 1330 has succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
licence/cla Contributor License Agreement is signed.
Details

@bernd bernd deleted the issue-3451 branch Feb 2, 2017

@bernd bernd removed the ready-for-review label Feb 2, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment