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

allow filtering of changelogs by types of changes #13391

Closed
ITJamie opened this issue Aug 5, 2023 · 4 comments
Closed

allow filtering of changelogs by types of changes #13391

ITJamie opened this issue Aug 5, 2023 · 4 comments
Labels
pending closure Requires immediate attention to avoid being closed for inactivity type: feature Introduction of new functionality to the application

Comments

@ITJamie
Copy link
Contributor

ITJamie commented Aug 5, 2023

NetBox version

v3.5.7

Feature type

Data model extension

Proposed functionality

An additional json field on the changelog model which contained a dict of true/false booleans for each model field to give high level info of what changes are in each changelog. This would allow for filtering of changelogs in a sane way (and scale across all the object types)

eg: for "device" model:

{
  "name": true, # eg if name changed
  "rack": false, # eg if assigned rack changed
  "position": true, # eg if position in rack changed
  "custom_fields": # if any of the custom fields changed value
}

when the changelog entry is being created it would loop through the pre/post changed json dicts and create true/false for each field depending on if the fieldcontent changed.
part of the migration could be to backfill in these changes (or add a command to do it, similar to the command which rebuilds the search cache)

Use case

right now there is no way to filter down changelogs on an object to specific types of changes.
by extending the changelog model with a "change_metadata" it could be possible to easily add filtering to the changelog views.

trying to do this by parsing the pre/post change fields is computationally expensive

Database changes

additional jsonb field for the change metadata

External dependencies

No response

@ITJamie ITJamie added the type: feature Introduction of new functionality to the application label Aug 5, 2023
@ITJamie
Copy link
Contributor Author

ITJamie commented Aug 5, 2023

note this could also allow filtering out of "no difference" changelog entrys for those who dislike that (#6599)

@jeremystretch
Copy link
Member

@ITJamie could you please provide a more reader-friendly title for this issue?

@jeremystretch jeremystretch added the status: revisions needed This issue requires additional information to be actionable label Aug 28, 2023
@ITJamie ITJamie changed the title changelog - additional json field - containing booleans about changed sections allow filtering of changelogs by types of changes Aug 28, 2023
@jeremystretch jeremystretch removed the status: revisions needed This issue requires additional information to be actionable label Aug 31, 2023
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

@github-actions github-actions bot added the pending closure Requires immediate attention to avoid being closed for inactivity label Nov 30, 2023
Copy link
Contributor

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 30, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pending closure Requires immediate attention to avoid being closed for inactivity type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

2 participants