Allow admins to set more default values in fields #11138

Open
opened 2025-12-29 21:40:51 +01:00 by adam · 8 comments
Owner

Originally created by @chrisvella92 on GitHub (May 7, 2025).

NetBox version

v4.3.0

Feature type

Data model extension

Proposed functionality

In configuration.py , admin users could be able to set default values for fields such as tenant (currently, there are default values for rack sizes for example and I am proposing having something similar).

Use case

It would be great if admins would be able to set default values for fields such as 'tenant' when creating new devices. In our netbox, I have set permission restrictions to now allow the tenant to be left empty for better housekeeping however it is a bit messy as users that leave empty get a message saying 'object level permission'. The issue could be solved by simply having a default value in the tenant field (and any other applicable fields).

Database changes

No response

External dependencies

No response

Originally created by @chrisvella92 on GitHub (May 7, 2025). ### NetBox version v4.3.0 ### Feature type Data model extension ### Proposed functionality In configuration.py , admin users could be able to set default values for fields such as tenant (currently, there are default values for rack sizes for example and I am proposing having something similar). ### Use case It would be great if admins would be able to set default values for fields such as 'tenant' when creating new devices. In our netbox, I have set permission restrictions to now allow the tenant to be left empty for better housekeeping however it is a bit messy as users that leave empty get a message saying 'object level permission'. The issue could be solved by simply having a default value in the tenant field (and any other applicable fields). ### Database changes _No response_ ### External dependencies _No response_
adam added the type: featurecomplexity: mediumnetboxstatus: backlog labels 2025-12-29 21:40:51 +01:00
Author
Owner

@jeremystretch commented on GitHub (May 8, 2025):

I think if we were to go down this path, it would need to be via a single configuration parameter to hold default values for all potential model fields, rather than an individual setting per field.

@jeremystretch commented on GitHub (May 8, 2025): I think if we were to go down this path, it would need to be via a single configuration parameter to hold default values for all potential model fields, rather than an individual setting per field.
Author
Owner

@PieterL75 commented on GitHub (May 9, 2025):

I'd love to see the default for 'interface status' to be 'disabled'. If this FR can accomplish that, then I'm in favor

@PieterL75 commented on GitHub (May 9, 2025): I'd love to see the default for 'interface status' to be 'disabled'. If this FR can accomplish that, then I'm in favor
Author
Owner

@jeremystretch commented on GitHub (May 9, 2025):

I'd love to see the default for 'interface status' to be 'disabled'.

I'd expect that to look like this:

DEFAULT_VALUES = {
    'dcim.Interface': {
        'enabled': False,
    }
}
@jeremystretch commented on GitHub (May 9, 2025): > I'd love to see the default for 'interface status' to be 'disabled'. I'd expect that to look like this: ```python DEFAULT_VALUES = { 'dcim.Interface': { 'enabled': False, } } ```
Author
Owner

@drobnymichal commented on GitHub (Oct 31, 2025):

I'd love to see the default for 'interface status' to be 'disabled'.

I'd expect that to look like this:

DEFAULT_VALUES = {
'dcim.Interface': {
'enabled': False,
}
}

Hi,

We would also appreciate this functionality within our organization.

@drobnymichal commented on GitHub (Oct 31, 2025): > > I'd love to see the default for 'interface status' to be 'disabled'. > > I'd expect that to look like this: > > DEFAULT_VALUES = { > 'dcim.Interface': { > 'enabled': False, > } > } Hi, We would also appreciate this functionality within our organization.
Author
Owner

@ultrapista commented on GitHub (Nov 4, 2025):

I'd love to see the default for 'interface status' to be 'disabled'.

I'd expect that to look like this:
DEFAULT_VALUES = {
'dcim.Interface': {
'enabled': False,
}
}

Hi,

We would also appreciate this functionality within our organization.

Same for us.

@ultrapista commented on GitHub (Nov 4, 2025): > > > I'd love to see the default for 'interface status' to be 'disabled'. > > > > > > I'd expect that to look like this: > > DEFAULT_VALUES = { > > 'dcim.Interface': { > > 'enabled': False, > > } > > } > > Hi, > > We would also appreciate this functionality within our organization. Same for us.
Author
Owner

@PieterL75 commented on GitHub (Nov 4, 2025):

Can we also set the default for the global search 'lookup'. Our company prefers to always use the regex based search rather than the 'contains'

@PieterL75 commented on GitHub (Nov 4, 2025): Can we also set the default for the global search 'lookup'. Our company prefers to always use the regex based search rather than the 'contains'
Author
Owner

@jsenecal commented on GitHub (Nov 5, 2025):

Can we also set the default for the global search 'lookup'. Our company prefers to always use the regex based search rather than the 'contains'

This would be out of scope IMHO, and would require a separate FR

@jsenecal commented on GitHub (Nov 5, 2025): > Can we also set the default for the global search 'lookup'. Our company prefers to always use the regex based search rather than the 'contains' This would be out of scope IMHO, and would require a separate FR
Author
Owner

@PieterL75 commented on GitHub (Nov 8, 2025):

Can we also set the default for the global search 'lookup'. Our company prefers to always use the regex based search rather than the 'contains'

This would be out of scope IMHO, and would require a separate FR

Created https://github.com/netbox-community/netbox/issues/20768 for that

@PieterL75 commented on GitHub (Nov 8, 2025): > > Can we also set the default for the global search 'lookup'. Our company prefers to always use the regex based search rather than the 'contains' > > This would be out of scope IMHO, and would require a separate FR Created https://github.com/netbox-community/netbox/issues/20768 for that
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11138