Device "Create and Add Another" does not retain Manufacturer and Device Type #3179

Closed
opened 2025-12-29 18:26:22 +01:00 by adam · 2 comments
Owner

Originally created by @candlerb on GitHub (Jan 17, 2020).

Originally assigned to: @kobayashi on GitHub.

Environment

  • Python version: 3.5.2
  • NetBox version: 2.7.1

Steps to Reproduce

  1. Add Device
  2. Enter Name, Role, Manufacturer, Device Type, Site and Rack (optionally Tags and Comments)
  3. Click "Create and Add Another"

Expected Behavior

Given the new feature in 2.7, I was expecting the fields to be carried forward into the next form.

Observed Behavior

Manufacturer and Device Type are not carried forward (neither are Comments)

However: Role, Site, Rack and Tags are carried forward.

Originally created by @candlerb on GitHub (Jan 17, 2020). Originally assigned to: @kobayashi on GitHub. ### Environment * Python version: 3.5.2 * NetBox version: 2.7.1 ### Steps to Reproduce 1. Add Device 2. Enter Name, Role, Manufacturer, Device Type, Site and Rack (optionally Tags and Comments) 3. Click "Create and Add Another" ### Expected Behavior Given the new feature in 2.7, I was expecting the fields to be carried forward into the next form. ### Observed Behavior Manufacturer and Device Type are *not* carried forward (neither are Comments) However: Role, Site, Rack and Tags *are* carried forward.
adam added the type: bugstatus: accepted labels 2025-12-29 18:26:22 +01:00
adam closed this issue 2025-12-29 18:26:23 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jan 17, 2020):

This is a bug with the form widgets. We're passing an initial value for the device_type field, however that field is chained to manufacturer, which has no initial value, so the set of available choices for device_type is empty.

@jeremystretch commented on GitHub (Jan 17, 2020): This is a bug with the form widgets. We're passing an initial value for the `device_type` field, however that field is chained to `manufacturer`, which has no initial value, so the set of available choices for `device_type` is empty.
Author
Owner

@hSaria commented on GitHub (Jan 17, 2020):

@jeremystretch checkout #3912 as it removes chaining (no longer needed, explanation in the ticket). It's also the cause of the issue you noticed in https://github.com/netbox-community/netbox/pull/3893#discussion_r365908986.

@hSaria commented on GitHub (Jan 17, 2020): @jeremystretch checkout #3912 as it removes chaining (no longer needed, explanation in the ticket). It's also the cause of the issue you noticed in https://github.com/netbox-community/netbox/pull/3893#discussion_r365908986.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3179