Skip to content

Unnecessary changelog records for tag add/change/remove #5583

@netsandbox

Description

@netsandbox

Environment

  • Python version: 3.6.9
  • NetBox version: 2.10.3

Steps to Reproduce

  1. create two tags TagA and TagB
  2. create a virtual-machine (or device)
  3. add TagA to the virtual-machine
  4. remove TagA and add TagB to the virtual-machine (in one request)
  5. remove TagB from the virtual-machine

Expected Behavior

Steps 3., 4. and 5. create only one changelog record

Observed Behavior

Step 3. creates two changelog records (with the same request id), where only one record shows the tag add and one shows no change.

Step 4. creates three changelog records (with the same request id), where one record shows the TagA remove, one the TagB add, and one shows no change.

Step 5. creates two changelog records (with the same request id), where only one record shows the tag remove and one shows no change.

Here are the database extras_objectchange records for the above steps 2.-5.:
https://gist.github.com/cloos/e7dd4c3b1f064098e4250e7cddb29c85

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: 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