Skip to content

custom field value search not working in 2.7.4 #4091

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
netsandbox opened this issue Feb 5, 2020 · 3 comments
Closed

custom field value search not working in 2.7.4 #4091

netsandbox opened this issue Feb 5, 2020 · 3 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@netsandbox
Copy link
Contributor

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.

@phurrelmann
Copy link
Contributor

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.

@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application labels Feb 5, 2020
@jeremystretch jeremystretch self-assigned this Feb 5, 2020
@jeremystretch
Copy link
Member

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

@phurrelmann
Copy link
Contributor

thank you for the quick fix

This was referenced Feb 13, 2020
@lock lock bot locked as resolved and limited conversation to collaborators May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

3 participants