Display user full name in Change Log #3804

Closed
opened 2025-12-29 18:31:17 +01:00 by adam · 1 comment
Owner

Originally created by @mathieu-mp on GitHub (Jun 23, 2020).

Environment

  • Python version: 3.6.8
  • NetBox version: 2.8.5

Proposed Functionality

Display user full name beside/instead of its raw username, namely in Change Logs.
This could be offered through a configuration.py option, or become standard behavior.

On front page, "username - 2020-06-23 14:41" would become "John Doe (@username) - 2020-06-23 14:41" or just "John Doe - 2020-06-23 14:41"
The enhancement would also affect User column on Change Log tabs for any object.

Use Case

A raw username is not always relevant to easily identify the real person beyond, namely when the username is retrieved from an AD and the AD policy leads to obscure ids.
Displaying the full name would ease the identification of users, and users would be able to associate any change with a team-mate to call to discuss changes or solve issues.

Database Changes

Full name value is already available when displaying personal profile, but the API only shows id and username properties.
Only assuming: a new field might have to be created inside the User model. Any change to first or last name inside the admin panel should propagate to this value. Again, i can only assume as I have very little programming skills and I did not dive into this part of the code.

External Dependencies

Probably none

Originally created by @mathieu-mp on GitHub (Jun 23, 2020). <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for proposing specific new features or enhancements. If you have a general idea or question, please post to our mailing list instead of opening an issue: https://groups.google.com/forum/#!forum/netbox-discuss NOTE: Due to an excessive backlog of feature requests, we are not currently accepting any proposals which significantly extend NetBox's feature scope. 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. --> ### Environment * Python version: 3.6.8 * NetBox version: 2.8.5 <!-- Describe in detail the new functionality you are proposing. Include any specific changes to work flows, data models, or the user interface. --> ### Proposed Functionality Display user full name beside/instead of its raw username, namely in Change Logs.\ This could be offered through a `configuration.py` option, or become standard behavior. On front page, "username - 2020-06-23 14:41" would become "John Doe (@username) - 2020-06-23 14:41" or just "John Doe - 2020-06-23 14:41"\ The enhancement would also affect User column on Change Log tabs for any object. <!-- Convey an example use case for your proposed feature. Write from the perspective of a NetBox user who would benefit from the proposed functionality and describe how. ---> ### Use Case A raw username is not always relevant to easily identify the real person beyond, namely when the username is retrieved from an AD and the AD policy leads to obscure ids.\ Displaying the full name would ease the identification of users, and users would be able to associate any change with a team-mate to call to discuss changes or solve issues. <!-- Note any changes to the database schema necessary to support the new feature. For example, does the proposal require adding a new model or field? (Not all new features require database changes.) ---> ### Database Changes Full name value is already available when displaying personal profile, but the API only shows id and username properties.\ Only assuming: a new field might have to be created inside the User model. Any change to first or last name inside the admin panel should propagate to this value. Again, i can only assume as I have very little programming skills and I did not dive into this part of the code. <!-- List any new dependencies on external libraries or services that this new feature would introduce. For example, does the proposal require the installation of a new Python package? (Not all new features introduce new dependencies.) --> ### External Dependencies Probably none
adam closed this issue 2025-12-29 18:31:17 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jun 30, 2020):

The username is displayed because it is guaranteed to be defined and unique, which cannot be said for a user's optional first and last name attributes. Like most applications, NetBox assumes that you're using meaningful usernames to represent individual users.

There is a second reason for this as well: An ObjectChange instance records both a reference to the User instance as well as a static representation of the username. This ensures that the attribution of a particular change to a user remains intact even after the user is deleted from NetBox.

@jeremystretch commented on GitHub (Jun 30, 2020): The username is displayed because it is guaranteed to be defined and unique, which cannot be said for a user's optional first and last name attributes. Like most applications, NetBox assumes that you're using meaningful usernames to represent individual users. There is a second reason for this as well: An ObjectChange instance records both a reference to the User instance as well as a static representation of the username. This ensures that the attribution of a particular change to a user remains intact even after the user is deleted from NetBox.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3804