Skip to content

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

@pheus

Description

@pheus

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.

Metadata

Metadata

Assignees

Labels

severity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions