Change log entry displays "No changes" when editing description field on device components and previous value was null. #4390

Closed
opened 2025-12-29 18:35:31 +01:00 by adam · 6 comments
Owner

Originally created by @dare-to-recurse on GitHub (Dec 22, 2020).

Environment

  • Python version: 3.6.8
  • NetBox version: 2.10.2

Steps to Reproduce

  1. Create a device from a device type with interfaces.
  2. Edit an interface on the device and set the description field to some value.
  3. View the change log entry for the edit.

Note, the same observed behaviour also happens when editing the description field on:

  • Front Ports
  • Rear Ports
  • Console Ports
  • Console Server Ports
  • Power Ports
  • Power Outlets
  • Device Bays

Expected Behavior

In the Difference section it should display that description was changed from null to the value that was submitted in the edit.

Example of corresponding behaviour from editing the mac_address field:
image

Observed Behavior

image

Originally created by @dare-to-recurse on GitHub (Dec 22, 2020). <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for reporting reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, please start a discussion instead: https://github.com/netbox-community/netbox/discussions Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report, and that any plugins have been disabled. --> ### Environment * Python version: 3.6.8 * NetBox version: 2.10.2 <!-- Describe in detail the exact steps that someone else can take to reproduce this bug using the current stable release of NetBox. Begin with the creation of any necessary database objects and call out every operation being performed explicitly. If reporting a bug in the REST API, be sure to reconstruct the raw HTTP request(s) being made: Don't rely on a client library such as pynetbox. --> ### Steps to Reproduce 1. Create a device from a device type with interfaces. 2. Edit an interface on the device and set the description field to some value. 3. View the change log entry for the edit. Note, the same observed behaviour also happens when editing the description field on: * Front Ports * Rear Ports * Console Ports * Console Server Ports * Power Ports * Power Outlets * Device Bays <!-- What did you expect to happen? --> ### Expected Behavior In the **Difference** section it should display that _description_ was changed from null to the value that was submitted in the edit. Example of corresponding behaviour from editing the _mac_address_ field: ![image](https://user-images.githubusercontent.com/1220054/102894737-d8855580-4463-11eb-90b7-bae2ede23bb5.png) <!-- What happened instead? --> ### Observed Behavior ![image](https://user-images.githubusercontent.com/1220054/102894810-f488f700-4463-11eb-90f6-a383fffa0661.png)
adam added the type: feature label 2025-12-29 18:35:31 +01:00
adam closed this issue 2025-12-29 18:35:32 +01:00
Author
Owner

@jeremystretch commented on GitHub (Dec 22, 2020):

There's no delta displayed because interfaces (and other components) populated when creating a new device don't generate a change record. (Whether or not this is desired is subject to debate, but IIRC we decided not too to, both to cut down on log spam and because a user didn't technically create the component directly.)

When viewing a change record, the diff displayed is generated by comparing the current record against its predecessor. When no preceding record exists, there is no diff to show. This is true for any attribute on any model, not just device components. (You're seeing a diff for mac_address because NetBox is comparing the object's second change record to its first.)

@jeremystretch commented on GitHub (Dec 22, 2020): There's no delta displayed because interfaces (and other components) populated when creating a new device don't generate a change record. (Whether or not this is desired is subject to debate, but IIRC we decided not too to, both to cut down on log spam and because a user didn't technically create the component directly.) When viewing a change record, the diff displayed is generated by comparing the current record against its predecessor. When no preceding record exists, there is no diff to show. This is true for _any_ attribute on _any_ model, not just device components. (You're seeing a diff for `mac_address` because NetBox is comparing the object's second change record to its first.)
Author
Owner

@dare-to-recurse commented on GitHub (Dec 23, 2020):

That makes sense, and I agree with the reasoning behind reducing log spam and the technicality of the user not creating the component directly.

This is honestly something that would be considered a nice-to-have for the situation I noticed it in, not a requirement in any way, so compared to the downside of additional log spam it's not really worth it.

@dare-to-recurse commented on GitHub (Dec 23, 2020): That makes sense, and I agree with the reasoning behind reducing log spam and the technicality of the user not creating the component directly. This is honestly something that would be considered a nice-to-have for the situation I noticed it in, not a requirement in any way, so compared to the downside of additional log spam it's not really worth it.
Author
Owner

@lampwins commented on GitHub (Jan 19, 2021):

@dare-to-recurse are you willing to take this issue on? Without a community owner, this is not likely to get traction from the core team due to the lack of substantial interest from others.

@lampwins commented on GitHub (Jan 19, 2021): @dare-to-recurse are you willing to take this issue on? Without a community owner, this is not likely to get traction from the core team due to the lack of substantial interest from others.
Author
Owner

@dare-to-recurse commented on GitHub (Jan 19, 2021):

I'd class myself as a beginner when it comes to programming (especially in python), but I could give it a go.
I have to note that work is extremely busy for me over the coming 1-2 months though, so I might not have the time to look at it properly until after then.

Would that still be okay?

@dare-to-recurse commented on GitHub (Jan 19, 2021): I'd class myself as a beginner when it comes to programming (especially in python), but I could give it a go. I have to note that work is extremely busy for me over the coming 1-2 months though, so I might not have the time to look at it properly until after then. Would that still be okay?
Author
Owner

@stale[bot] commented on GitHub (Mar 5, 2021):

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. Please see our contributing guide.

@stale[bot] commented on GitHub (Mar 5, 2021): 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. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@jeremystretch commented on GitHub (Mar 5, 2021):

Incidentally, this has been addressed by the change in #5913 and will be fixed in the upcoming v2.11 release.

@jeremystretch commented on GitHub (Mar 5, 2021): Incidentally, this has been addressed by the change in #5913 and will be fixed in the upcoming v2.11 release.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4390