Allow custom object fields to reference a user or group #7091

Closed
opened 2025-12-29 20:19:08 +01:00 by adam · 10 comments
Owner

Originally created by @joaolucasmacedo on GitHub (Oct 7, 2022).

Originally assigned to: @abhi1693 on GitHub.

NetBox version

v3.3.5

Feature type

Data model extension

Proposed functionality

Being able to create object type custom fields with Netbox users.

Use case

Being able to point a specific user which is responsible for a given object, like a device or VM.

Database changes

No response

External dependencies

No response

Originally created by @joaolucasmacedo on GitHub (Oct 7, 2022). Originally assigned to: @abhi1693 on GitHub. ### NetBox version v3.3.5 ### Feature type Data model extension ### Proposed functionality Being able to create object type custom fields with Netbox users. ### Use case Being able to point a specific user which is responsible for a given object, like a device or VM. ### Database changes _No response_ ### External dependencies _No response_
adam added the status: acceptedtype: feature labels 2025-12-29 20:19:08 +01:00
adam closed this issue 2025-12-29 20:19:08 +01:00
Author
Owner

@bistraque commented on GitHub (Oct 17, 2022):

That's why Contacts are for: give a specific role to a specific contact for a given object, and for free you get a many-to-many relationship. In case an object does not have a Contacts field, a custom field of that type will do. It also allows for Contacts to exist while not being Users with credentials on Netbox itself (covers different tenancy models).

Arguably, we may question the use case where a Contact is optionally associated with a Netbox User at creation time (e.g. autofill name and associated info). This could be helpful as a "garbage collection" strategy to detect obsolete contact info (via scripting for example if user no longer valid in ldap).

@bistraque commented on GitHub (Oct 17, 2022): That's why _Contacts_ are for: give a specific role to a specific contact for a given object, and for free you get a many-to-many relationship. In case an object does not have a _Contacts_ field, a custom field of that type will do. It also allows for _Contacts_ to exist while not being _Users_ with credentials on Netbox itself (covers different tenancy models). Arguably, we may question the use case where a _Contact_ is optionally associated with a Netbox _User_ at creation time (e.g. autofill name and associated info). This could be helpful as a "garbage collection" strategy to detect obsolete contact info (via scripting for example if user no longer valid in ldap).
Author
Owner

@jeremystretch commented on GitHub (Oct 18, 2022):

I think it's reasonable to allow referencing a NetBox user (or group) as well; we do this today with rack reservations.

@jeremystretch commented on GitHub (Oct 18, 2022): I think it's reasonable to allow referencing a NetBox user (or group) as well; we do this today with rack reservations.
Author
Owner

@github-actions[bot] commented on GitHub (Dec 18, 2022):

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[bot] commented on GitHub (Dec 18, 2022): 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](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@github-actions[bot] commented on GitHub (Mar 23, 2023):

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[bot] commented on GitHub (Mar 23, 2023): 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](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@abhi1693 commented on GitHub (Mar 23, 2023):

Can I take a shot at this?

@abhi1693 commented on GitHub (Mar 23, 2023): Can I take a shot at this?
Author
Owner

@jeremystretch commented on GitHub (Apr 5, 2023):

Assigned to you @abhi1693, thanks!

@jeremystretch commented on GitHub (Apr 5, 2023): Assigned to you @abhi1693, thanks!
Author
Owner

@abhi1693 commented on GitHub (Apr 7, 2023):

For the assigned user/group, should the custom field be hidden from the UI that were not assigned on it?

@abhi1693 commented on GitHub (Apr 7, 2023): For the assigned user/group, should the custom field be hidden from the UI that were not assigned on it?
Author
Owner

@jeremystretch commented on GitHub (Apr 7, 2023):

@abhi1693, sorry, I'm not clear on what you're asking. Could you give me an example?

@jeremystretch commented on GitHub (Apr 7, 2023): @abhi1693, sorry, I'm not clear on what you're asking. Could you give me an example?
Author
Owner

@abhi1693 commented on GitHub (Apr 7, 2023):

Lets say I created a custom field and assigned to bob. Should the field only be visible to bob whether its view or edit on the UI? If so, should this also be tackled on the API side?

@abhi1693 commented on GitHub (Apr 7, 2023): Lets say I created a custom field and assigned to `bob`. Should the field only be visible to `bob` whether its view or edit on the UI? If so, should this also be tackled on the API side?
Author
Owner

@jeremystretch commented on GitHub (Apr 7, 2023):

No, I don't think so. I believe the intent here is merely to be able to associate an arbitrary object with a particular user or group, like we do currently for rack reservations.

@jeremystretch commented on GitHub (Apr 7, 2023): No, I don't think so. I believe the intent here is merely to be able to associate an arbitrary object with a particular user or group, like we do currently for rack reservations.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7091