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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot rename a rule #128

Open
frantz45 opened this issue Jan 18, 2024 · 2 comments
Open

Cannot rename a rule #128

frantz45 opened this issue Jan 18, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@frantz45
Copy link
Collaborator

  1. Edit an existing rule
  2. Change its title
  3. Click Save

A red banner appears:
Updating alert rule failed with status: There was an error fetching a rousrce: Internal Server Error. Additional Information: Cannot invoke "com.airbus_cyber_security.graylog.wizard.alert.model.AlertRule.getStreamIdentifier()" because "oldAlert" is null

@c8y3
Copy link
Collaborator

c8y3 commented Jun 7, 2024

A test for this:

    def test_update_alert_rule_title_should_not_fail(self):
        title = 'aaa'
        rule = self._graylog.create_alert_rule_count(title, _PERIOD)
        response = self._graylog.update_alert_rule(title, {**rule, 'title': 'new_title'})
        self.assertEqual('new_title', response['title'])

@c8y3 c8y3 added the bug Something isn't working label Jun 7, 2024
@c8y3
Copy link
Collaborator

c8y3 commented Jun 7, 2024

The root issue is that alert rules are identified by their titles when unique identifiers should be used instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants