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

Omit "empty" values from displayed data for created & deleted objects #86

Open
jeremystretch opened this issue Sep 6, 2024 · 0 comments
Labels
app: branching type: feature A new feature or functionality

Comments

@jeremystretch
Copy link
Contributor

Plugin Version

v0.4.0

Proposed functionality

When displaying the serialized representation of objects that have been created or deleted within a branch, omit any empty values (null, empty strings, empty arrays, etc.) from the output. For example, creating a site named "New Site" will show the following data in the "after" state of the change:

asns: []
comments: 
custom_fields: {}
description: 
facility: 
group: None
latitude: None
longitude: None
name: New Site
physical_address: 
region: None
shipping_address: 
slug: new-site
status: active
tags: []
tenant: None
time_zone: None

Omitting empty values leaves only fields which contain meaningful data, namely the name and slug fields:

name: New Site
slug: new-site

This more closely resembles the behavior when modifying an existing object, where only the modified fields are shown.

Use case

This would reduce noise in the change log and simplify human review.

External dependencies

No response

@jeremystretch jeremystretch added the type: feature A new feature or functionality label Sep 6, 2024
@jeremystretch jeremystretch changed the title Omit "empty" values from change data for created & deleted objects Omit "empty" values from displayed data for created & deleted objects Sep 6, 2024
@cvitan cvitan added the netbox-branching label Oct 31, 2024 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app: branching type: feature A new feature or functionality
Projects
None yet
Development

No branches or pull requests

2 participants