Bug? Deleting Custom Attributes deletes value, but not the Custom Attribute.

Started by cbwecomm, August 17, 2025, 03:37:25 AM

Previous topic - Next topic

cbwecomm

I'm not sure what the intended action is when this happens. 

I created a Custom Attribute at the Infrastructure Services Container with no value, and made it inheritable.  
I then set a value on a node (about 3 containers down). 

When I delete the Custom Attribute at the Infrastructure Services Container level, the VALUE of custom attribute on the node is deleted, but the Custom Attribute itself is still there.  

I would have expected:
A)  Deleting a custom attribute would remove it and the value from all child objects.
or
B)  Deleting a custom attribute would remove it from all child objects that have not been defined with a different value.

I would prefer  "B"..... If a custom attribute is removed, I would appreciate it, if it did not delete all values on child objects which are different than the value being deleted (i.e. if something is defined or has a override at a child object DONT delete it).    This could easily wipe out hundreds or thousands of custom defined values which could be nearly impossible to repair.  

But the current behavior I saw (I tested it a few times, a few different ways) was completely unexpected and not what I assume the intention was/is. 

As a side note feature request, there are a number of things in NetXMS which it will catastrophically let you do without warning.   More than once I have accidentally chosen a "delete" option on something, thinking I was removing it from a template, container, etc only to have NetXMS completely deleted the Node.  I realize this is ultimately my fault :-) but sometimes those late 3-4am nights get the best of me and I click without completely processing what is about to happen haha. 

Thanks!

Filipp Sudanov

Hi!

Sorry, it took a while, we've had some vacations here. 

I've replicated this behavior if there's more then one path of inheritance for the custom attribute - e.g. a node is present in two containers. Created a ticket for that: https://track.radensolutions.com/issue/NX-2831

You probably have several hierarchies under Infrastructure which contain same nodes in them. If so, for now the fix could be to avoid multy-path inheritance by creating custom attributes only on one container under Infrastructure. The reason is that currently custom attributes are not handled correctly in such situation, there's another ticket for that, possibly related to the one I've just created: https://track.radensolutions.com/issue/NX-2717

cbwecomm

No problem Filipp.  Appreciate the response.   

You're correct; I have multiple hierarchies so nodes exist in multiple places (i.e. it might be listed in my physical topology under "Core Routers" but then it might also be listed under Manufacturers > MikroTik... I think this is just for my visual benefit / sorting more than anything else.  I know I tend to over-complicate everything haha). 

Thanks again, and look forward to the fix (noting that B would be my preference, so we don't ever delete a bunch of custom attribute values...like keys/passwords/etc that could be impossible to recover or recreate easily).   

~C