I have added a primary_contact field to both the Group and VirtualMachine entities in iTop. Now, I would like to add a new field, actual_primary_contact, to the VirtualMachine entity.
The idea is that if the primary contact field in the VirtualMachine entity is null, the actual_primary_contact field should automatically inherit the primary contact from the associated Group.
Could anyone guide me on how to achieve this functionality in iTop? Any advice or best practices for implementing this would be greatly appreciated.
Thank you in advance!
Best Regards,
Andrea
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There's some really good documentation by Combodo. And some official examples; but there's a lot more in this repository too on how to accomplish certain things.
For your question: you'd first need to add the field (so a simple datamodel XML extension to add the field).
The second part: you'd need to add this logic using an extension. You could use the new event listener functionality in the newer iTop versions; and you'd write the logic in PHP.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi everyone,
I have added a primary_contact field to both the Group and VirtualMachine entities in iTop. Now, I would like to add a new field, actual_primary_contact, to the VirtualMachine entity.
The idea is that if the primary contact field in the VirtualMachine entity is null, the actual_primary_contact field should automatically inherit the primary contact from the associated Group.
Could anyone guide me on how to achieve this functionality in iTop? Any advice or best practices for implementing this would be greatly appreciated.
Thank you in advance!
Best Regards,
Andrea
There's some really good documentation by Combodo. And some official examples; but there's a lot more in this repository too on how to accomplish certain things.
Most useful resources are:
https://www.itophub.io/wiki/page?id=latest:customization:xml_reference
https://www.itophub.io/wiki/page?id=latest:customization:datamodel#content_of_a_module
https://www.itophub.io/wiki/page?id=latest:customization:portal_xml
For your question: you'd first need to add the field (so a simple datamodel XML extension to add the field).
The second part: you'd need to add this logic using an extension. You could use the new event listener functionality in the newer iTop versions; and you'd write the logic in PHP.