[PR #16957] [CLOSED] Fixes #16782: Add object filtering for custom fields #14960

Closed
opened 2025-12-30 00:19:08 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/16957
Author: @samk-acw
Created: 7/23/2024
Status: Closed

Base: developHead: 16782-cfobjectfilter


📝 Commits (10+)

📊 Changes

317 files changed (+7851 additions, -2202 deletions)

View changed files

📝 docs/customization/custom-fields.md (+2 -0)
📝 docs/features/facilities.md (+4 -0)
docs/models/circuits/circuitgroup.md (+13 -0)
docs/models/circuits/circuitgroupassignment.md (+25 -0)
📝 docs/models/dcim/moduletype.md (+4 -0)
📝 docs/models/dcim/rack.md (+6 -41)
docs/models/dcim/racktype.md (+60 -0)
📝 docs/models/extras/customfield.md (+4 -0)
docs/models/extras/notification.md (+17 -0)
docs/models/extras/notificationgroup.md (+17 -0)
docs/models/extras/subscription.md (+15 -0)
📝 docs/models/ipam/vlangroup.md (+2 -2)
📝 docs/models/virtualization/virtualmachine.md (+5 -0)
📝 docs/models/wireless/wirelesslink.md (+4 -0)
docs/plugins/development/events.md (+16 -0)
📝 docs/plugins/development/rest-api.md (+3 -7)
📝 docs/plugins/development/views.md (+11 -5)
docs/release-notes/version-4.1.md (+37 -0)
📝 mkdocs.yml (+8 -0)
📝 netbox/account/urls.py (+2 -0)

...and 80 more files

📄 Description

Fixes: #16782

  • 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

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/16957 **Author:** [@samk-acw](https://github.com/samk-acw) **Created:** 7/23/2024 **Status:** ❌ Closed **Base:** `develop` ← **Head:** `16782-cfobjectfilter` --- ### 📝 Commits (10+) - [`5016936`](https://github.com/netbox-community/netbox/commit/50169365a9b7007eddf8bb1dd4f419141963fa50) Closes #16359: Add navbar() method to PluginTemplateExtension - [`1952d3e`](https://github.com/netbox-community/netbox/commit/1952d3e63a9e6d9c6dc164ac493988e2fc7ed238) Merge branch 'develop' into feature - [`c6bd714`](https://github.com/netbox-community/netbox/commit/c6bd714a04e1770f689453d1351964ab15f79ee0) Closes #15908: Establish canonical & local sources for release info (#16420) - [`c7176e8`](https://github.com/netbox-community/netbox/commit/c7176e86fc92e0488e08a6e53b840012ae9d7cdd) 15410 removed deprecated filters (#16410) - [`4da5bd6`](https://github.com/netbox-community/netbox/commit/4da5bd6ed1bbfee5f2f76ed53cd41a048edf4fdc) #15908: Update upgrade.sh - [`c1d7696`](https://github.com/netbox-community/netbox/commit/c1d7696b2a0c22c142122d9cb65e5b1c868a08cb) 14692 Convert VM disk size (#16434) - [`c6553c4`](https://github.com/netbox-community/netbox/commit/c6553c45dd1847baef21f2f13bd7ece865293eb9) 7537 add serial number to virtual machines (#16407) - [`853d990`](https://github.com/netbox-community/netbox/commit/853d990c033b638585c95da4ffa0889bb4f9f0ed) Closes #16388: Move change logging resources from `extras` to `core` (#16545) - [`e12edd7`](https://github.com/netbox-community/netbox/commit/e12edd7420937138c9a809ef77a1031014a2f1fa) #16388: Fix migration bug - [`91dcecb`](https://github.com/netbox-community/netbox/commit/91dcecbd077d1af3c886c4d34a45a3c823b3f350) 15106 Add Length Field to Wireless Link (#16528) ### 📊 Changes **317 files changed** (+7851 additions, -2202 deletions) <details> <summary>View changed files</summary> 📝 `docs/customization/custom-fields.md` (+2 -0) 📝 `docs/features/facilities.md` (+4 -0) ➕ `docs/models/circuits/circuitgroup.md` (+13 -0) ➕ `docs/models/circuits/circuitgroupassignment.md` (+25 -0) 📝 `docs/models/dcim/moduletype.md` (+4 -0) 📝 `docs/models/dcim/rack.md` (+6 -41) ➕ `docs/models/dcim/racktype.md` (+60 -0) 📝 `docs/models/extras/customfield.md` (+4 -0) ➕ `docs/models/extras/notification.md` (+17 -0) ➕ `docs/models/extras/notificationgroup.md` (+17 -0) ➕ `docs/models/extras/subscription.md` (+15 -0) 📝 `docs/models/ipam/vlangroup.md` (+2 -2) 📝 `docs/models/virtualization/virtualmachine.md` (+5 -0) 📝 `docs/models/wireless/wirelesslink.md` (+4 -0) ➕ `docs/plugins/development/events.md` (+16 -0) 📝 `docs/plugins/development/rest-api.md` (+3 -7) 📝 `docs/plugins/development/views.md` (+11 -5) ➕ `docs/release-notes/version-4.1.md` (+37 -0) 📝 `mkdocs.yml` (+8 -0) 📝 `netbox/account/urls.py` (+2 -0) _...and 80 more files_ </details> ### 📄 Description ### Fixes: #16782 - 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 00:19:08 +01:00
adam closed this issue 2025-12-30 00:19:08 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14960