-
Notifications
You must be signed in to change notification settings - Fork 31
[Feature]: Adding and relating Custom Fields #259
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
Thanks for opening this Issue! We really appreciate the feedback & testing from users like you! |
Hi @bststr,Thanks for opening this issue! Could you provide a step-by-step guide to reproduce the behavior you're experiencing? I attempted to replicate the issue, but everything seems to be working as expected. I was able to:
Custom Field on AccessList (Text) – API Request:{
"object_types": [
"netbox_acls.accesslist"
],
"type": "text",
"name": "role",
"label": "Role",
"group_name": "string",
"description": "string",
"required": false,
"unique": false,
"ui_visible": "always",
"ui_editable": "yes",
"is_cloneable": true,
"default": "standard"
} Response: {
"id": 2,
"url": "http://netbox/api/extras/custom-fields/2/",
"display_url": "http://netbox/extras/custom-fields/2/",
"display": "Role",
"object_types": [
"netbox_acls.accesslist"
],
"type": {
"value": "text",
"label": "Text"
},
"related_object_type": null,
"data_type": "string",
"name": "role",
"label": "Role",
"group_name": "string",
"description": "string",
"required": false,
"unique": false,
"search_weight": 1000,
"filter_logic": {
"value": "loose",
"label": "Loose"
},
"ui_visible": {
"value": "always",
"label": "Always"
},
"ui_editable": {
"value": "yes",
"label": "Yes"
},
"is_cloneable": true,
"default": "standard",
"related_object_filter": null,
"weight": 100,
"validation_minimum": null,
"validation_maximum": null,
"validation_regex": "",
"choice_set": null,
"comments": "",
"created": "2025-03-27T20:57:02.863726Z",
"last_updated": "2025-03-27T20:57:02.863751Z"
}
Custom Field on Device (Multiple Objects – Related to AccessList) – API Request:{
"object_types": [
"dcim.device"
],
"type": "multiobject",
"name": "acl_assignment",
"label": "ACL Assignment",
"required": false,
"unique": false,
"ui_visible": "always",
"ui_editable": "yes",
"is_cloneable": true,
"related_object_type": "netbox_acls.accesslist"
} Response: {
"id": 4,
"url": "http://netbox/api/extras/custom-fields/4/",
"display_url": "http://netbox/extras/custom-fields/4/",
"display": "ACL Assignment",
"object_types": [
"dcim.device"
],
"type": {
"value": "multiobject",
"label": "Multiple objects"
},
"related_object_type": "netbox_acls.accesslist",
"data_type": "array",
"name": "acl_assignment",
"label": "ACL Assignment",
"group_name": "",
"description": "",
"required": false,
"unique": false,
"search_weight": 1000,
"filter_logic": {
"value": "loose",
"label": "Loose"
},
"ui_visible": {
"value": "always",
"label": "Always"
},
"ui_editable": {
"value": "yes",
"label": "Yes"
},
"is_cloneable": true,
"default": null,
"related_object_filter": null,
"weight": 100,
"validation_minimum": null,
"validation_maximum": null,
"validation_regex": "",
"choice_set": null,
"comments": "",
"created": "2025-03-27T21:02:18.838176Z",
"last_updated": "2025-03-27T21:02:18.838204Z"
} From my testing, custom fields seem to be functioning correctly for Access Lists and Rules. If you're encountering a different issue, could you please share the exact steps you took? That way, we can investigate further. Looking forward to your response! |
Hello @pheus , thanks for investigating. So far I can say, that I couldn't select Access Lists for custom fields in the gui, neither for object nor as related object type when selecting object as custom field type. So i thought it wasn't implemented so far. That's the reason for feature request and not bug. Thanks and best regards! |
Hi @bststr, Thanks for your response! No worries—take your time, and we’ll be happy to look into it further once you’ve had a chance to check your NetBox installation. You may be encountering this issue – "Models from plugin not showing up for custom field selection (#17836)". Let us know what you find on Monday! Wishing you a great weekend. |
Hello @pheus, I checked the issue you linked and found this comment from phlpr:
Although we do not use netbox_attachments plugin, I reordered the plugins in our configuration, and now the netbox_acls plugin is listed for custom fields. I don't know which plugin we use is responsible for this behavior, but it could be netbox_floorplan, because it also has to do with attachments. I'm not sure. Our plugins are now listed in the following order: netbox_reorder_rack With this order, everything works. Thank you very much, pheus, for this tip and your support! Have a good start to the week! |
NetBox version
v4.2.3
Feature type
Add a function
Proposed functionality
Would be great, if you can create custom fields for Access Lists and Rules.
Also it would be great, if you can use ACLs and Rules as Related object type if you create a Custom Field with type "Object" or "Multiple Objects".
This should also work with the API.
In the API response the custom_fields key is listed. But you cannot create Custom Fields with and for ACLs and rules.
Thank you!
Use case
Safe Custom Data within an ACL or Rule Object.
External dependencies
No response
The text was updated successfully, but these errors were encountered: