Skip to content

Fixes #3310: Preselect cable fields #3893

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
wants to merge 14 commits into from
Closed

Fixes #3310: Preselect cable fields #3893

wants to merge 14 commits into from

Conversation

hSaria
Copy link
Contributor

@hSaria hSaria commented Jan 11, 2020

Fixes: #3310

Preselect the site and rack fields when connecting a cable. Also noticed that the status, type, and length unit weren't using Select2, so fixed that one up as well.

Because of how chain filtering cannot span multiple model relationships (AFAIK), I cannot filter the list of interfaces based on the site and rack; this change only assists with the devices field.

@hSaria hSaria requested a review from jeremystretch January 13, 2020 20:54
@jeremystretch
Copy link
Member

The root issue here was trying to set initial data in the form's __init__() after it had already been modified by the mixin. Ideally, initial data should be applied from within the view rather than from within the form itself. I've created PR #3987 to resolve this, which incorporates your other changes here. Thank you for your work on this!

@hSaria hSaria deleted the 3310-preselect-cable-fields branch January 22, 2020 21:21
@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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make connecting cables quicker by pre-selecting B end Site and Rack
2 participants