Import issues (FWObject only partially implemented)
phpipam open-source IP address management
Brought to you by:
myha
Issue actually concering version 1.2:
Cause: The FWObject has not been implemented everywhere correctly
Prob 1: XLS/CSV import expects FWObject as 5th column. The Download template option creates a template without FWObject column because index is overwritten. Index used twice.
Solution:
Change phpipam/app/subnets/import-subnet/import-template.php
$worksheet->write($lineCount, 3, _('hostname')); $worksheet->write($lineCount, 3, _('fw_object')); $worksheet->write($lineCount, 4, _('mac')); $worksheet->write($lineCount, 5, _('owner')); $worksheet->write($lineCount, 6, _('device')); $worksheet->write($lineCount, 7, _('port')); $worksheet->write($lineCount, 8, _('note'));
into
$worksheet->write($lineCount, 3, _('hostname')); $worksheet->write($lineCount, 4, _('fw_object')); $worksheet->write($lineCount, 5, _('mac')); $worksheet->write($lineCount, 6, _('owner')); $worksheet->write($lineCount, 7, _('device')); $worksheet->write($lineCount, 8, _('port')); $worksheet->write($lineCount, 9, _('note'));
Prob 2: Custom fields are shifted one column and thus types not matching, because additional FWobject column is not counted towards.
Solution;
Change phpipam/app/subnets/import-subnet/import-file.php
// custom fields $currIndex = 8;
into
// custom fields $currIndex = 9;
Anonymous