Extension of Custom Fields to Object Level #10866

Closed
opened 2025-12-29 21:36:56 +01:00 by adam · 5 comments
Owner

Originally created by @julianstolp on GitHub (Mar 10, 2025).

NetBox version

v4.2.5

Feature type

Change to existing functionality

Proposed functionality

I suggest extending the custom fields to the object level. The custom fields should be able to be assigned to multiple objects. This would help to map a wide variety of device types with different properties. At the same time, it is up to the user to fill them and the NetBox UI remains simple in the core.

Workflow

  1. Create custom field
  2. Select the object type
  3. NEW: You can select all logically parent objects for the object type to assign the custom field to that set of objects. You can think of this as a filter that assigns the custom field to all objects in the intersection.

Examples:
Red is the selected object type
Green are the objects you could build your filter around to limit the matching objects from your selected object type.

Image

Image

Image

Use case

For many models in NetBox it is sufficient to introduce a global custom field for the object type. Sometime however you may want to limit the custom field to only a certain set of objects.

Example:
For devices, there are a large number of specific devices with a large number of different properties, especially if end devices are also documented. This is where the object type based custom field reaches its limits. Many custom fields are not required for all devices, but only for some.

Database changes

There are certainly database changes necessary.

External dependencies

None

Originally created by @julianstolp on GitHub (Mar 10, 2025). ### NetBox version v4.2.5 ### Feature type Change to existing functionality ### Proposed functionality I suggest extending the custom fields to the object level. The custom fields should be able to be assigned to multiple objects. This would help to map a wide variety of device types with different properties. At the same time, it is up to the user to fill them and the NetBox UI remains simple in the core. Workflow 1. Create custom field 2. Select the object type 3. **NEW: You can select all logically parent objects for the object type to assign the custom field to that set of objects. You can think of this as a filter that assigns the custom field to all objects in the intersection.** Examples: Red is the selected object type Green are the objects you could build your filter around to limit the matching objects from your selected object type. ![Image](https://github.com/user-attachments/assets/9f22e729-4969-4d3f-a213-57e66fe4e286) ![Image](https://github.com/user-attachments/assets/fb329401-50c9-4b23-b7ec-31c29a715cbc) ![Image](https://github.com/user-attachments/assets/46d6dffa-f4a6-4234-af57-11ffff8cb27f) ### Use case For many models in NetBox it is sufficient to introduce a global custom field for the object type. Sometime however you may want to limit the custom field to only a certain set of objects. Example: For devices, there are a large number of specific devices with a large number of different properties, especially if end devices are also documented. This is where the object type based custom field reaches its limits. Many custom fields are not required for all devices, but only for some. ### Database changes There are certainly database changes necessary. ### External dependencies None
adam added the type: feature label 2025-12-29 21:36:56 +01:00
adam closed this issue 2025-12-29 21:36:56 +01:00
Author
Owner

@jeremystretch commented on GitHub (Mar 13, 2025):

Thank you for your interest in extending NetBox. Unfortunately, the information you have provided does not constitute an actionable feature request. Per our contributing guide, a feature request must include a thorough description of the proposed functionality, including any database changes, new views or API endpoints, and so on. It must also include a detailed use case justifying its implementation. If you would like to elaborate on your proposal, please modify your post above. If sufficient detail is not added, this issue will be closed.

@jeremystretch commented on GitHub (Mar 13, 2025): Thank you for your interest in extending NetBox. Unfortunately, the information you have provided does not constitute an actionable feature request. Per our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md), a feature request must include a thorough description of the proposed functionality, including any database changes, new views or API endpoints, and so on. It must also include a detailed use case justifying its implementation. If you would like to elaborate on your proposal, please modify your post above. If sufficient detail is not added, this issue will be closed.
Author
Owner

@julianstolp commented on GitHub (Mar 14, 2025):

@jeremystretch I have adjusted the feature request

@julianstolp commented on GitHub (Mar 14, 2025): @jeremystretch I have adjusted the feature request
Author
Owner

@github-actions[bot] commented on GitHub (Mar 22, 2025):

This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically.

@github-actions[bot] commented on GitHub (Mar 22, 2025): This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically.
Author
Owner

@julianstolp commented on GitHub (Mar 22, 2025):

@jeremystretch can you please look at this again to see if the feature request is now easier to understand?

@julianstolp commented on GitHub (Mar 22, 2025): @jeremystretch can you please look at this again to see if the feature request is now easier to understand?
Author
Owner

@jeremystretch commented on GitHub (Mar 24, 2025):

I'm sorry but it appears you're trying to utilize custom fields for something beyond their intended purpose. This sort of functionality has been proposed in the past but would not work well. Instead, consider developing a plugin to introduce the additional relations you need.

@jeremystretch commented on GitHub (Mar 24, 2025): I'm sorry but it appears you're trying to utilize custom fields for something beyond their intended purpose. This sort of functionality has been proposed in the past but would not work well. Instead, consider developing a plugin to introduce the additional relations you need.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10866