Menu

#234 Import issues (FWObject only partially implemented)

version 0.8
open
nobody
import (1)
1
2016-08-31
2016-08-31
Anonymous
No

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;

Discussion

Anonymous
Anonymous

Add attachments
Cancel