-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Custom fields with default values appear as applied filters in object list views #8314
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
Comments
What name are you assigning to the field? |
This name should fail validation when attempting to save the custom field, as only alphanumeric characters and underscores are permitted as of v3.1.1 (see #8030). At any rate, I'm not able to reproduce this on v3.1.5, even using the same exact field name (by bypassing validation). |
Are there any debug logs worth collecting before I try and re-save the custom field without the - in the name? I'm able to replicate the behaviour across user accounts and browsers. Even hitting 'Clear All' still results in Filter [1] showing in the tab. |
See if you can reproduce it on the demo instance (which is running v3.1.5): https://demo.netbox.dev/ |
I can immediately replicate this on the demo instance once I add the same custom field, even once complying with the new name requirements. |
Looks like this only occurs when you've defined a default value for the custom field. Again, this is why it's so important to note every step taken to reproduce the issue when opening a bug report: It saves a lot of time. |
My mistake. When I looked at the custom field when creating the report, I assumed N/A meant no default value as opposed to the fact I'd actually set it to N/A. |
…s from appearing as applied filters erroneously
NetBox version
3.1.2
Python version
3.8
Steps to Reproduce
Create a 'Selection' custom field with no default value applied to DCIM -> Sites
Visit /dcim/sites
Filter tab aways shows [1] filter applied. No filter shows applied on the table view itself
Apply an actual filter, i.e. Status: Active
2 filters show applied. The one actually applied + the phantom custom field with an empty value
Expected Behavior
Custom field filter should not be applied by default?
Observed Behavior
Filter tab aways shows [1] filter applied. No filter shows applied on the table view itself
The text was updated successfully, but these errors were encountered: