Skip to content

Filtering on multi-selection custom field is not performing exact match #7093

@candlerb

Description

@candlerb

NetBox version

v2.11.12

Python version

3.7

Steps to Reproduce

  1. Create a custom field
    • Type: Multiple Selection
    • Name: snmp_module
    • Label: SNMP Module
    • Content Types: DCIM > device
    • Choices: if_mib,if_mib1,keepalived1
  2. On some devices set module if_mib; on some devices set if_mib1
  3. Browse to /dcim/devices/, filter on this custom field and select if_mib

image

-->

image

Note that this is an exact match from a set of choices, and not a substring match.

Expected Behavior

If I select if_mib as the choice, it should show only those devices which have choice if_mib

Observed Behavior

If I select if_mib as the choice, it shows devices with either if_mib or if_mib1 as the choice. Add "SNMP Module" to the table columns to see this.

(Aside: if I select both if_mib1 and keepalived1 then it shows only devices with both if_mib1 and keepalived1 selected. This is consistent with tags, rather than, say, sites. I think being consistent with tags is correct here)

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions