Skip to content

Log pre-existing object state when creating an ObjectChange instance #5913

@jeremystretch

Description

@jeremystretch

Environment

  • Python version: 3.7.9
  • NetBox version: 2.10.5

Proposed Functionality

When creating a new ObjectChange instance to log a change to a NetBox object, capture its pre-change state as well as its current state. This may take a bit of cleverness to implement, but it should be possible by using a custom signal to register a pre-change copy of data on an instance immediately prior to modifying it.

Use Case

Storing both the pre- and post-change copies of an object allows us to present a more accurate depiction of that changes attributable to a specific action, and not worry about indirect changes not being accounted for. Related issues:

Database Changes

Add a field to the ObjectChange model for storing pre-change data.

External Dependencies

None expected

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the application

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions