Can't set Custom fields to null during bulk edit #6245

Closed
opened 2025-12-29 19:38:26 +01:00 by adam · 3 comments
Owner

Originally created by @jasser-chaoued on GitHub (Mar 22, 2022).

NetBox version

v3.1.10

Python version

3.9

Steps to Reproduce

1-Select multiple interfaces then click edit
2-Changing the value of fields and put the value of some custom fields to default "--------"
3-Saving changes

Expected Behavior

While editing multiple Interfaces, we can see that all the fields have a checkbox named "set null" except generated custom fields. Without it we can't change the custom field value to Null during bulk edit and it's value stays the same even if we put the default value "-------" which normally sets it to null, so we have to do it manually for every interface and there putting the default value in the custom field changes it to Null.

Observed Behavior

The applied changes are all took into consideration (custom fields or not) except the custom fields that are set to default value, their values stays as the same as before editing.

Originally created by @jasser-chaoued on GitHub (Mar 22, 2022). ### NetBox version v3.1.10 ### Python version 3.9 ### Steps to Reproduce 1-Select multiple interfaces then click edit 2-Changing the value of fields and put the value of some custom fields to default "--------" 3-Saving changes ### Expected Behavior While editing **multiple** Interfaces, we can see that all the fields have a checkbox named "set null" except generated **custom fields**. Without it we can't change the **custom field** value to Null during **bulk edit** and it's value stays the same even if we put the default value "-------" which normally sets it to null, so we have to do it manually for every interface and there putting the default value in the custom field changes it to **Null**. ### Observed Behavior The applied changes are all took into consideration (custom fields or not) except the custom fields that are set to default value, their values stays as the same as before editing.
adam closed this issue 2025-12-29 19:38:27 +01:00
Author
Owner

@jeremystretch commented on GitHub (Mar 22, 2022):

Thank you for opening a bug report. Unfortunately, the information you have provided is not sufficient for someone else to attempt to reproduce the reported behavior. Remember, each bug report must include detailed steps that someone else can follow on a clean, empty NetBox installation to reproduce the exact problem you're experiencing. These instructions should include the creation of any involved objects, any configuration changes, and complete accounting of the actions being taken. Also be sure that your report does not reference data on the public NetBox demo, as that is subject to change at any time by an outside party and cannot be relied upon for bug reports.

@jeremystretch commented on GitHub (Mar 22, 2022): Thank you for opening a bug report. Unfortunately, the information you have provided is not sufficient for someone else to attempt to reproduce the reported behavior. Remember, each bug report must include detailed steps that someone else can follow on a clean, empty NetBox installation to reproduce the exact problem you're experiencing. These instructions should include the creation of any involved objects, any configuration changes, and complete accounting of the actions being taken. Also be sure that your report does not reference data on the public NetBox demo, as that is subject to change at any time by an outside party and cannot be relied upon for bug reports.
Author
Owner

@jasser-chaoued commented on GitHub (Mar 22, 2022):

1-Create a new custom field called Protect DHCP that it's value can be "trust or no trust" and its content type is DCIM>Interface
image

2-Go to Devices > Interfaces, select Two random interfaces and click on edit on the bottom of the page and put their Protect DHCP value to Trust as we can see the value of that custom field on the two selected interface on the picture.
image

3-Now let's say you want to reproduce the same previous step but you want the field value to be null, we select the interfaces > Edit and change the value of the Protect DHCP field to the default value and we click Apply
image

4-The Protect DHCP value stays the same and no changes are applied as we can see here :
image

which make it impossible to set a custom field value to Null with Bulk Edit and we have to do by editing the interfaces one by one which will cost us a huge amount of time.

I also noticed that all the other fields in the Bulk Edit page have a checkbox with the label Set Null that sets their value to null upon editing, maybe adding that to the custom fields will help setting their value to null when needed.

@jasser-chaoued commented on GitHub (Mar 22, 2022): 1-Create a new custom field called **Protect DHCP** that it's value can be "trust or no trust" and its **content type** is **DCIM>Interface** ![image](https://user-images.githubusercontent.com/57174259/159490143-fddd4768-dae1-408f-ad51-bd8810b6ed2b.png) 2-Go to Devices > Interfaces, select Two random interfaces and click on edit on the bottom of the page and put their Protect DHCP value to Trust as we can see the value of that custom field on the two selected interface on the picture. ![image](https://user-images.githubusercontent.com/57174259/159490545-0a19b3d7-0252-481b-a5e1-0825a284967d.png) 3-Now let's say you want to reproduce the same previous step but you want the field value to be null, we select the interfaces > Edit and change the value of the Protect DHCP field to the **default value** and we click **Apply** ![image](https://user-images.githubusercontent.com/57174259/159491414-d8a238d1-2382-4659-b3f3-c925cd725c73.png) 4-The **Protect DHCP** value stays the same and no changes are applied as we can see here : ![image](https://user-images.githubusercontent.com/57174259/159491706-b351fef1-8ffb-40f2-97db-719196a87165.png) which make it impossible to set a custom field value to Null with Bulk Edit and we have to do by editing the interfaces one by one which will cost us a huge amount of time. I also noticed that all the other fields in the Bulk Edit page have a checkbox with the label **Set Null** that sets their value to null upon editing, maybe adding that to the custom fields will help setting their value to null when needed.
Author
Owner

@jeremystretch commented on GitHub (Mar 23, 2022):

There's no option to nullify the field because you've designated it as a required custom field (per your first screenshot above). If you make the custom field optional, you can then set it to null during bulk edit.

@jeremystretch commented on GitHub (Mar 23, 2022): There's no option to nullify the field because you've designated it as a required custom field (per your first screenshot above). If you make the custom field optional, you can then set it to null during bulk edit.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6245