Netbox: custom field value search not working in 2.7.4

Created on 5 Feb 2020  路  3Comments  路  Source: netbox-community/netbox

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.

accepted bug

Most helpful comment

thank you for the quick fix

All 3 comments

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.

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

thank you for the quick fix

Was this page helpful?
0 / 5 - 0 ratings

Related issues

markve-sa picture markve-sa  路  4Comments

aarjbdea picture aarjbdea  路  3Comments

billyzoellers picture billyzoellers  路  3Comments

bellwood picture bellwood  路  4Comments

bellwood picture bellwood  路  3Comments