Skip to content

Regression: Bulk Edit fails to update Scope when using ContentTypeChoiceField (HTMX) #19092

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
pheus opened this issue Apr 6, 2025 · 0 comments · Fixed by #19102
Closed

Regression: Bulk Edit fails to update Scope when using ContentTypeChoiceField (HTMX) #19092

pheus opened this issue Apr 6, 2025 · 0 comments · Fixed by #19102
Assignees
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Milestone

Comments

@pheus
Copy link
Contributor

pheus commented Apr 6, 2025

Deployment Type

Self-hosted

NetBox Version

main (v4.2.7)

Python Version

3.10

Steps to Reproduce

  1. Create a Site named Site1
  2. Create a Prefix 10.0.0.0/16 with:
    • Scope Type: Site
    • Scope: Site1
  3. Navigate to IPAM → Prefixes (PrefixListView)
  4. Select the prefix 10.0.0.0/16 using the checkbox (✅)
  5. Click Edit Selected to initiate a bulk edit
  6. In the bulk edit form:
    • Change the Scope Type dropdown to Location (or any other valid choice)
    • Attempt to select a Scope from the corresponding dropdown

Expected Behavior

  • After selecting a Scope Type, the Scope dropdown should become active and list the available objects of the selected type.

Observed Behavior

  • The Scope Type field gets reset to None
  • The Scope field remains disabled
  • This effectively prevents setting a Scope during bulk edits

When performing bulk edits on models utilizing a ContentTypeChoiceField (typically for GenericForeignKey fields), the dynamic behavior of the Scope field is broken. Specifically, selecting a Scope Type fails to properly enable and populate the corresponding Scope field.

This is a recent regression, which is included in the upcoming v4.2.7 patch release.

Regression Introduced By

Commit: 12231ad
Pull Request: #18997 Select all with bulk edit only changes the currently visible objects
Related Issue: #18964 The function of selecting all devices fails.

@pheus pheus added status: needs triage This issue is awaiting triage by a maintainer type: bug A confirmed report of unexpected behavior in the application labels Apr 6, 2025
@jnovinger jnovinger added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation severity: low Does not significantly disrupt application functionality, or a workaround is available and removed status: needs triage This issue is awaiting triage by a maintainer labels Apr 7, 2025
@jnovinger jnovinger added this to the v4.2.7 milestone Apr 7, 2025
@jnovinger jnovinger self-assigned this Apr 7, 2025
@jnovinger jnovinger added status: accepted This issue has been accepted for implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available 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.

2 participants