Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
thefreakquency opened this issue Oct 31, 2023 · 2 comments
Closed

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

thefreakquency opened this issue Oct 31, 2023 · 2 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Milestone

Comments

@thefreakquency
Copy link

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

@thefreakquency thefreakquency added the type: feature Introduction of new functionality to the application label Oct 31, 2023
@arthanson arthanson self-assigned this Oct 31, 2023
@ITJamie
Copy link
Contributor

ITJamie commented 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.

@rizlas
Copy link
Contributor

rizlas commented 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.

@jeremystretch jeremystretch added the status: accepted This issue has been accepted for implementation label Dec 15, 2023
@jeremystretch jeremystretch added this to the v3.7 milestone Dec 15, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

5 participants