-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Update of custom field does not reflect the change on a device #12954
Comments
The custom field system was never designed to do this, so I'm having a hard time seeing it being a bug.
This doesn't really make sense as there are only keys basically. You can't change I think the closest we could get to improve on the situation is to iterate the objects when a custom field has its choices changed and removing choices that are not valid anymore. Doesn't sound like what you want though. |
Hi! Thanks for the reply. I understand now that this is not a bug but an expected behavior as per design. My bad ...
Well, that could be part of the solution. I mean, there are situations where you really need to update the values of the CF along the life of a network. And when you have tons of devices using a CF's choice, then if for some reason that choice changed, you need to (manually?) update the amount of devices that were using the specific choice. Like in the example, say you have 1000 routers with a CF representing the list of NTP Servers. The choices are Probably one could use a dictionary instead of a list to store the different choices. So, CF's choices instead of being |
IIRC custom fields are stored as a string in the database so it should be relatively straightforward to migrate your data to a new name |
If bulk editing is not an option, the recommendation would be using a custom script, the API or nbshell to do the change.
NTP servers specifically are a good usecase for config contexts, which do reflect the changes globally. I understand what you are trying to achieve, it's just not an easy thing to solve with the way it's currently implemented. |
I believe #12988 is meant to cover this? |
It does look like so ... :-) ... |
I'm going to close this out as it does not appear to be a valid bug report. |
NetBox version
docker version 3.5.3
Python version
3.10
Steps to Reproduce
multiple selection
. The content type can beDCIM > Devices
. Add some choices to it using in the fieldChoices
. For example, the options could be:a,b,c,d,e
a
andd
.a
toa1
.a
andd
. You need to manually edit the CF to reflect the change.Expected Behavior
Once changing the value of the options at the definition of the CF, that should be reflected in each and every content type that is using the CF.
This is particularly important if you have hundreds/thousands of devices using a particular CF, and a CF with hundreds of options (which is actually my real case scenario). One should be able to modify only a specific option of the CF at its definition: then that change should be back-reflected to the device. Otherwise one needs to go to each and every device to update the content of the CF.
Observed Behavior
When changing a specific value of the CF at the CF definition, that is not being reflected at the device.
The text was updated successfully, but these errors were encountered: