Default value for required custom_fields overwrite existing data #1533

Closed
opened 2025-12-29 16:32:44 +01:00 by adam · 2 comments
Owner

Originally created by @bdlamprecht on GitHub (Feb 3, 2018).

Issue type

[ ] Feature request
[X] Bug report
[ ] Documentation

Environment

  • Python version: 3.6.4
  • NetBox version: 2.2.9

Description

I didn't do a complete test to see if this was limited only to the device model, but that is where I originally saw the error.

When doing a bulk update to devices, you are presented with the following window:

image

As you can see, the default value is pre-populated for the custom_fields that are required.
My example uses N/A for both template_name and template_version.

If you change any field here (platform or status or type), it will overwrite any accurate information stored in those custom_fields.

In my opinion, this is undesired outcome as most likely you won't want to have to remove the pre-populated values every time you do a bulk edit.

Originally created by @bdlamprecht on GitHub (Feb 3, 2018). ### Issue type [ ] Feature request <!-- An enhancement of existing functionality --> [X] Bug report <!-- Unexpected or erroneous behavior --> [ ] Documentation <!-- A modification to the documentation --> ### Environment * Python version: 3.6.4 * NetBox version: 2.2.9 <!-- BUG REPORTS must include: * A list of the steps needed for someone else to reproduce the bug * A description of the expected and observed behavior * Any relevant error messages (screenshots may also help) --> ### Description I didn't do a complete test to see if this was limited only to the `device` model, but that is where I originally saw the error. When doing a bulk update to devices, you are presented with the following window: ![image](https://user-images.githubusercontent.com/7783306/35759428-dd556076-0836-11e8-9a35-4caa11826223.png) As you can see, the `default` value is pre-populated for the `custom_fields` that are `required`. My example uses `N/A` for both `template_name` and `template_version`. If you change **_any_** field here (`platform` or `status` or `type`), it will overwrite any accurate information stored in those `custom_fields`. In my opinion, this is undesired outcome as most likely you won't want to have to remove the pre-populated values _every_ time you do a bulk edit.
adam added the type: bugstatus: accepted labels 2025-12-29 16:32:44 +01:00
adam closed this issue 2025-12-29 16:32:45 +01:00
Author
Owner

@bdlamprecht commented on GitHub (Feb 3, 2018):

I just verified that this was not the case in v2.2.8 (default and required values for custom_fields weren't pre-populated).

@bdlamprecht commented on GitHub (Feb 3, 2018): I just verified that this was **_not_** the case in v2.2.8 (default and required values for `custom_fields` weren't pre-populated).
Author
Owner

@jeremystretch commented on GitHub (Feb 3, 2018):

I don't think this changed in v2.2.9. It seems to happen in v2.2.8 as well, though I didn't check any further back. At any rate, this should be fixed in 594ef71. If you still have problems comment here and I'll re-open this for further investigation.

@jeremystretch commented on GitHub (Feb 3, 2018): I don't think this changed in v2.2.9. It seems to happen in v2.2.8 as well, though I didn't check any further back. At any rate, this should be fixed in 594ef71. If you still have problems comment here and I'll re-open this for further investigation.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1533