[PR #14289] [MERGED] Closes #13299: Improve options for controlling custom field visibility #14361

Closed
opened 2025-12-29 23:24:03 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/14289
Author: @jeremystretch
Created: 11/16/2023
Status: Merged
Merged: 11/20/2023
Merged by: @jeremystretch

Base: featureHead: 13299-custom-field-hiding


📝 Commits (5)

  • b1a60ca Add ui_visible and ui_editable fields
  • 9838c34 Extend migration to map new visible/editable values
  • 5a2a3e3 Remove ui_visibility field
  • 455ca26 Update docs
  • 164b232 Merge branch 'feature' into 13299-custom-field-hiding

📊 Changes

19 files changed (+204 additions, -93 deletions)

View changed files

📝 docs/customization/custom-fields.md (+12 -4)
📝 docs/models/extras/customfield.md (+17 -8)
📝 netbox/extras/api/serializers.py (+5 -4)
📝 netbox/extras/choices.py (+20 -9)
📝 netbox/extras/filtersets.py (+2 -2)
📝 netbox/extras/forms/bulk_edit.py (+9 -5)
📝 netbox/extras/forms/bulk_import.py (+12 -5)
📝 netbox/extras/forms/filtersets.py (+9 -4)
📝 netbox/extras/forms/mixins.py (+2 -5)
📝 netbox/extras/forms/model_forms.py (+1 -1)
netbox/extras/migrations/0100_customfield_ui_attrs.py (+41 -0)
📝 netbox/extras/models/customfields.py (+22 -9)
📝 netbox/extras/tables/tables.py (+7 -4)
📝 netbox/extras/tests/test_filtersets.py (+16 -7)
📝 netbox/extras/tests/test_views.py (+7 -6)
📝 netbox/netbox/forms/base.py (+6 -7)
📝 netbox/netbox/models/features.py (+8 -9)
📝 netbox/netbox/tables/tables.py (+2 -2)
📝 netbox/templates/extras/customfield.html (+6 -2)

📄 Description

Closes: #13299

  • Add two new fields to the CustomField model: ui_visible and ui_editable
  • Migrate existing custom fields, setting the appropriate values depending on the value of the legacy ui_visibility field
  • Remove the ui_visibility field
  • Update documentation

🔄 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/14289 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 11/16/2023 **Status:** ✅ Merged **Merged:** 11/20/2023 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `13299-custom-field-hiding` --- ### 📝 Commits (5) - [`b1a60ca`](https://github.com/netbox-community/netbox/commit/b1a60ca89433f46ab7f5777e35b2d6abcd1a9d31) Add ui_visible and ui_editable fields - [`9838c34`](https://github.com/netbox-community/netbox/commit/9838c347973f79b07622a07f5dc29c023df7a065) Extend migration to map new visible/editable values - [`5a2a3e3`](https://github.com/netbox-community/netbox/commit/5a2a3e3705e8575a475c195a5f26abc72b9d94b6) Remove ui_visibility field - [`455ca26`](https://github.com/netbox-community/netbox/commit/455ca26b8cd41ead4e13e08fa7eeb37a1bdbe753) Update docs - [`164b232`](https://github.com/netbox-community/netbox/commit/164b2324cec1bd89b88ad2f2efeee4955256a1e2) Merge branch 'feature' into 13299-custom-field-hiding ### 📊 Changes **19 files changed** (+204 additions, -93 deletions) <details> <summary>View changed files</summary> 📝 `docs/customization/custom-fields.md` (+12 -4) 📝 `docs/models/extras/customfield.md` (+17 -8) 📝 `netbox/extras/api/serializers.py` (+5 -4) 📝 `netbox/extras/choices.py` (+20 -9) 📝 `netbox/extras/filtersets.py` (+2 -2) 📝 `netbox/extras/forms/bulk_edit.py` (+9 -5) 📝 `netbox/extras/forms/bulk_import.py` (+12 -5) 📝 `netbox/extras/forms/filtersets.py` (+9 -4) 📝 `netbox/extras/forms/mixins.py` (+2 -5) 📝 `netbox/extras/forms/model_forms.py` (+1 -1) ➕ `netbox/extras/migrations/0100_customfield_ui_attrs.py` (+41 -0) 📝 `netbox/extras/models/customfields.py` (+22 -9) 📝 `netbox/extras/tables/tables.py` (+7 -4) 📝 `netbox/extras/tests/test_filtersets.py` (+16 -7) 📝 `netbox/extras/tests/test_views.py` (+7 -6) 📝 `netbox/netbox/forms/base.py` (+6 -7) 📝 `netbox/netbox/models/features.py` (+8 -9) 📝 `netbox/netbox/tables/tables.py` (+2 -2) 📝 `netbox/templates/extras/customfield.html` (+6 -2) </details> ### 📄 Description ### Closes: #13299 - Add two new fields to the CustomField model: `ui_visible` and `ui_editable` - Migrate existing custom fields, setting the appropriate values depending on the value of the legacy `ui_visibility` field - Remove the `ui_visibility` field - Update documentation --- <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-29 23:24:03 +01:00
adam closed this issue 2025-12-29 23:24:03 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14361