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

Fixes #16782: Add object filtering for custom fields #16994

Merged

Conversation

samk-acw
Copy link
Contributor

@samk-acw samk-acw commented Jul 26, 2024

Fixes: #16782

(new pr rebased off feature branch)

  • adds 'related_object_filter' field to CustomField model and relevant form, template and api serializer
  • updated CustomField's to_form_field method to load the query_param data
  • added documentation
  • currently I've chosen to not to include any additional validation as it feels fairly fail-safe already; json syntax is already validated by the field type, and entering an invalid query_params definition results in the filter returning all values, which is the default behavior anyway

@jeremystretch jeremystretch added this to the v4.1 milestone Jul 26, 2024
Copy link
Member

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@samk-acw thanks for jumping on this so quickly!

@jeremystretch jeremystretch merged commit 6508987 into netbox-community:feature Jul 29, 2024
3 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants