Now, in a child class, Server (child through FunctionalCI -> PhysicalDevice -> ConnectableCI -> DatacentreDevice -> Server), I want to redefine this node to have <is_null_allowed>false</is_null_allowed>
Normally I would just add this definition in Server and be done with it:
It's a iTop limitation, you cannot on a child class modify all or part of any parent field.
Adding such mandatory constrain can be performed in 2 manners
Create the field on each sub-class with its own constrains
Create the field on the parent and make it mandatory on the child by code for eg. with AddAttributeFlags
You can also perform a CheckToWrite but this is after the submission so not very user friendly
Last edit: Vincent @ Combodo 7 days ago
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey all.
I have a field node being defined in our version of FunctionalCI, called "hostname". Definition as follows:
Now, in a child class, Server (child through FunctionalCI -> PhysicalDevice -> ConnectableCI -> DatacentreDevice -> Server), I want to redefine this node to have <is_null_allowed>false</is_null_allowed>
Normally I would just add this definition in Server and be done with it:
However, when trying to use this definition, it complains that "hostname" doesn't actually exist, despite the module that defines it being loaded:
Now, if I add "define" instead of "redefine", I get the following error:
I've tried many other combinations of deltas, such as:
They all give me some variation of either "hostname could not be found" or "hostname is already defined on FunctionalCI".
There is one delta which gives me a different error, usually related to using the wrong deltas:
Gives me this:
Let me know if you need to know more about the context or definitions.
Last edit: Jacques Dancause 7 days ago
It's a iTop limitation, you cannot on a child class modify all or part of any parent field.
Adding such mandatory constrain can be performed in 2 manners
You can also perform a CheckToWrite but this is after the submission so not very user friendly
Last edit: Vincent @ Combodo 7 days ago
Thank you for the clarification; this makes sense.