Skip to content

Changing event rule action type messes up Conditions field #14838

@markkuleinio

Description

@markkuleinio

Deployment Type

Self-hosted

NetBox Version

v3.7.1

Python Version

3.11

Steps to Reproduce

  1. Go to Operations - Event Rules - Add
  2. Set Conditions = { "and": [{"attr": "status.value", "value": "deprecated"}]}
  3. Select Action type = Script

Expected Behavior

Conditions field stays as-is

Observed Behavior

Conditions field is rewritten as invalid JSON:

"{ \"and\": [{\"attr\": \"status.value\", \"value\": \"deprecated\"}]}"

The quoting is added with every change of the Action type.

This also happens if editing an existing event rule and changing the Action type.

Workaround

  • Copy the Conditions field somewhere
  • Change the Action type
  • Paste the Conditions field back

Metadata

Metadata

Assignees

Labels

severity: mediumResults in substantial degraded or broken functionality for specfic workflowsstatus: acceptedThis issue has been accepted for implementationtopic: event rulesFor issues related to the Event Rules featuretype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions