I am following the documentation about customizing iTop and the example about adding a NetworkDeviceType, I installed the iTop toolkit to check the integrity of all changes.
What I want:
I need a 'buydate' attribute on some CIs: PC, Servers, NetworkDevice, … so I added the attribute to the common parent class 'Device' adding a line:
I tried updating the db table 'device' and tried throught the toolkit too. The toolkit detect correctly the change and propose the SQL commands I apply the commands without error.
But when I go to new CI the new attribute doesn't appear on the GUI.
I search for errors on the apache error log and no message appear.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2011-10-27
You need to make two more modifications. In model.itop-config- mgmt.php, add your new field to the list of displayed attributes for Device:
MetaModel::Init_SetZListItems('details', array('name', 'status', 'org_id', 'importance', 'brand', 'model', 'serial_number', 'asset_ref', 'buydate','contact_list', 'document_list', 'solution_list', 'contract_list', 'ticket_list', 'nwinterface_list'));
In en.dict.itop-config-mgmt.php (and/or other language files), add translations to the Class: Device section:
'Class:Device/Attribute:buydate' => 'Purchase Date',
'Class:Device/Attribute:buydate+' => 'Date device was purchased',
buydate+ is the tooltip.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi.
I am following the documentation about customizing iTop and the example about adding a NetworkDeviceType, I installed the iTop toolkit to check the integrity of all changes.
What I want:
I need a 'buydate' attribute on some CIs: PC, Servers, NetworkDevice, … so I added the attribute to the common parent class 'Device' adding a line:
MetaModel::Init_AddAttribute(new AttributeDate("buydate", array("allowed_values"=>null, "sql"=>"buydate", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array())));
I tried updating the db table 'device' and tried throught the toolkit too. The toolkit detect correctly the change and propose the SQL commands I apply the commands without error.
But when I go to new CI the new attribute doesn't appear on the GUI.
I search for errors on the apache error log and no message appear.
You need to make two more modifications. In model.itop-config- mgmt.php, add your new field to the list of displayed attributes for Device:
MetaModel::Init_SetZListItems('details', array('name', 'status', 'org_id', 'importance', 'brand', 'model', 'serial_number', 'asset_ref', 'buydate','contact_list', 'document_list', 'solution_list', 'contract_list', 'ticket_list', 'nwinterface_list'));
In en.dict.itop-config-mgmt.php (and/or other language files), add translations to the Class: Device section:
buydate+ is the tooltip.