custom field value search not working in 2.7.4 #3276

Closed
opened 2025-12-29 18:27:20 +01:00 by adam · 3 comments
Owner

Originally created by @netsandbox on GitHub (Feb 5, 2020).

Originally assigned to: @jeremystretch on GitHub.

Environment

  • Python version: 3.6.9
  • NetBox version: 2.7.4

Steps to Reproduce

  1. create a custom field (text, selection) for virtual machine
  2. add a value for the custom field on a virtual machine
  3. search for a virtual machine with a previously set custom field value

Expected Behavior

Search shows only the virtual machines which have this custom field value set.

Observed Behavior

All virtual machines are shown, regardless if the custom field value is set or not.

Downgrading to 2.7.3 resolves this problem.

NetBox 2.7.3 has cf_<custom field name>=... in the url query string and
2.7.4 has <custom field name>=... (without the cf_ prefix) in the url query string when searching for custom field values.

Originally created by @netsandbox on GitHub (Feb 5, 2020). Originally assigned to: @jeremystretch on GitHub. ### Environment * Python version: 3.6.9 * NetBox version: 2.7.4 ### Steps to Reproduce 1. create a custom field (text, selection) for virtual machine 2. add a value for the custom field on a virtual machine 3. search for a virtual machine with a previously set custom field value ### Expected Behavior Search shows only the virtual machines which have this custom field value set. ### Observed Behavior All virtual machines are shown, regardless if the custom field value is set or not. Downgrading to 2.7.3 resolves this problem. NetBox 2.7.3 has `cf_<custom field name>=...` in the url query string and 2.7.4 has `<custom field name>=...` (without the `cf_` prefix) in the url query string when searching for custom field values.
adam added the type: bugstatus: accepted labels 2025-12-29 18:27:20 +01:00
adam closed this issue 2025-12-29 18:27:20 +01:00
Author
Owner

@phurrelmann commented on GitHub (Feb 5, 2020):

We are facing the very same regression on the regular device search. We just updated our netbox instances from 2.6.12 to 2.7.4. Searching for custom fields is quite essential.

@phurrelmann commented on GitHub (Feb 5, 2020): We are facing the very same regression on the regular device search. We just updated our netbox instances from 2.6.12 to 2.7.4. Searching for custom fields is quite essential.
Author
Owner

@jeremystretch commented on GitHub (Feb 5, 2020):

Fixed above. As a workaround, you can manually append cf_ to any custom filed names in the URL query string.

@jeremystretch commented on GitHub (Feb 5, 2020): Fixed above. As a workaround, you can manually append `cf_` to any custom filed names in the URL query string.
Author
Owner

@phurrelmann commented on GitHub (Feb 5, 2020):

thank you for the quick fix

@phurrelmann commented on GitHub (Feb 5, 2020): thank you for the quick fix
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3276