-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
status: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the applicationIntroduction of new functionality to the application
Milestone
Description
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:
- Provide a diff showing the changes between two logged changes #2511: Provide a diff showing the changes between two logged changes (implemented)
- WebHook should provide old data together with new data #3451: WebHook should provide old data together with new data
- Unnecessary changelog records for tag add/change/remove #5583: Unnecessary changelog records for tag add/change/remove
Database Changes
Add a field to the ObjectChange model for storing pre-change data.
External Dependencies
None expected
tyler-8sdktr and xkilian
Metadata
Metadata
Assignees
Labels
status: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the applicationIntroduction of new functionality to the application