Prevent logging to Change Log when no changes are made #8789

Closed
opened 2025-12-29 20:41:13 +01:00 by adam · 2 comments
Owner

Originally created by @AnythingOverIP on GitHub (Oct 31, 2023).

Originally assigned to: @arthanson on GitHub.

NetBox version

v3.6.4

Feature type

Change to existing functionality

Proposed functionality

When a record is patched via API and no changes are made, a Change Log entry is created stating "No changes". I would like to be able to either a) prevent those to be created, using a global configuration flag, or b) provide the ability to purge those manually...

Also, if those empty log gentries are kept, i would like to have, at minima, a filter in /extra/changelog/ section. Currently, it is not possible to filter by Action type = No changes.

This request is somewhat related to #13391 and #6599

Use case

I have a script that once in a while goes thru a list of 600+ sites and gather information from a corporate database, then patch the NB site with the required information. When it patches the site data, as expected, it does not update when information is the same between what's in the request and what's already in NetBox. Most of the time, nothing has changed. That said, even if nothing has changed, a change log is being created for each site. That means that every time my script runs, I get over 600 Change Logs entries even if only 20ish of those were really changed...

Database changes

None, AFAIK

External dependencies

none

Originally created by @AnythingOverIP on GitHub (Oct 31, 2023). Originally assigned to: @arthanson on GitHub. ### NetBox version v3.6.4 ### Feature type Change to existing functionality ### Proposed functionality When a record is patched via API and no changes are made, a Change Log entry is created stating "No changes". I would like to be able to either a) prevent those to be created, using a global configuration flag, or b) provide the ability to purge those manually... Also, if those empty log gentries are kept, i would like to have, _at minima_, a filter in /extra/changelog/ section. Currently, it is not possible to filter by Action type = No changes. This request is somewhat related to #13391 and #6599 ### Use case I have a script that once in a while goes thru a list of 600+ sites and gather information from a corporate database, then patch the NB site with the required information. When it patches the site data, as expected, it does not update when information is the same between what's in the request and what's already in NetBox. Most of the time, nothing has changed. That said, even if nothing has changed, a change log is being created for each site. That means that every time my script runs, I get over 600 Change Logs entries even if only 20ish of those were really changed... ### Database changes None, AFAIK ### External dependencies none
adam added the status: acceptedtype: feature labels 2025-12-29 20:41:13 +01:00
adam closed this issue 2025-12-29 20:41:13 +01:00
Author
Owner

@ITJamie commented on GitHub (Nov 1, 2023):

another example of an annoying "no change" changelog ive seen is patching / saving with a reordered list of tags or multiselect objects (restapi/pynetbox). this creates a changelog even though nothing has actually really changed.

@ITJamie commented on GitHub (Nov 1, 2023): another example of an annoying "no change" changelog ive seen is patching / saving with a reordered list of tags or multiselect objects (restapi/pynetbox). this creates a changelog even though nothing has actually really changed.
Author
Owner

@rizlas commented on GitHub (Nov 17, 2023):

Sometimes not all the changes are displayed in the UI even if something is changed via script/api/ecc.
Anyhow. imho, this is a must have feature. It'll also keep the database lighter.

@rizlas commented on GitHub (Nov 17, 2023): Sometimes not all the changes are displayed in the UI even if something is changed via script/api/ecc. Anyhow. imho, this is a must have feature. It'll also keep the database lighter.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8789