Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
candlerb opened this issue Jan 17, 2020 · 2 comments · Fixed by #3955
Closed

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

candlerb opened this issue Jan 17, 2020 · 2 comments · Fixed by #3955
Assignees
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@candlerb
Copy link
Contributor

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.

@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application labels Jan 17, 2020
@jeremystretch
Copy link
Member

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.

@hSaria
Copy link
Contributor

hSaria commented 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 #3893 (comment).

@kobayashi kobayashi self-assigned this Jan 18, 2020
kobayashi added a commit to kobayashi/netbox that referenced this issue Jan 24, 2020
kobayashi added a commit to kobayashi/netbox that referenced this issue Jan 24, 2020
jeremystretch added a commit that referenced this issue Jan 24, 2020
Fixes: #3950 "Create and Add Another" does retain device type
@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants