Skip to content
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

Fix TagFilterField definition to make dynamic-groups happy #4299

Merged
merged 2 commits into from
Aug 21, 2023

Conversation

glennmatthews
Copy link
Contributor

Closes: #N/A

What's Changed

#4178 added a to_field_name = "slug" attribute on TagFilterField and logic in DynamicGroup.set_filter that expected all TagFilterField to have this attribute (TagFilterField is a MultipleChoiceField subclass, not a ModelMultipleChoiceField subclass, and so it doesn't natively have any to_field_name attribute). When we merged develop up into next (#4271) the to_field_name line was deleted instead of being updated to to_field_name = "name" as it should have been. However, the automated tests added in #4178 didn't catch this issue until #4284 fixed DeviceFilterForm to have a tags TagFilterField instead of the incorrectly-named-for-2.0 tag field.

Solution: add to_field_name = "name" to make dynamic-groups happy for now.

TODO

  • Explanation of Change(s)
  • Added change log fragment(s) (for more information see the documentation)
  • Attached Screenshots, Payload Example
  • Unit, Integration Tests
  • n/a Documentation Updates (when adding/changing features)
  • n/a Example Plugin Updates (when adding/changing features)
  • Outline Remaining Work, Constraints from Design

@glennmatthews glennmatthews added the emergent Unplanned work that is brought into a sprint after it's started. label Aug 21, 2023
@glennmatthews glennmatthews self-assigned this Aug 21, 2023
@glennmatthews glennmatthews merged commit 92ab899 into next Aug 21, 2023
23 checks passed
@glennmatthews glennmatthews deleted the u/glennmatthews-fix-tagfilterfield branch August 21, 2023 17:13
@bryanculver bryanculver added the type: bug Something isn't working as expected label Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emergent Unplanned work that is brought into a sprint after it's started. type: bug Something isn't working as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants