Fixed department id on asset import with users

This commit is contained in:
snipe 2018-11-07 17:36:34 -08:00
parent f2478d813c
commit db7e0b56f2

View file

@ -266,7 +266,8 @@ abstract class Importer
$user_array = [
'full_name' => $this->findCsvMatch($row, "full_name"),
'email' => $this->findCsvMatch($row, "email"),
'manager_id'=> $this->fetchManager($this->findCsvMatch($row, 'manager_first_name'), $this->findCsvMatch($row, 'manager_last_name')) ? $this->fetchManager($this->findCsvMatch($row, 'manager_first_name'), $this->findCsvMatch($row, 'manager_last_name')) : null,
'manager_id'=> $this->fetchManager($this->findCsvMatch($row, 'manager_first_name'), $this->findCsvMatch($row, 'manager_last_name')) ? $this->fetchManager($this->findCsvMatch($row, 'manager_first_name'), $this->findCsvMatch($row, 'manager_last_name')) : null,
'department_id' => $this->createOrFetchDepartment($this->findCsvMatch($row, 'department')) ? $this->createOrFetchDepartment($this->findCsvMatch($row, 'department')) : null,
'username' => $this->findCsvMatch($row, "username"),
'activated' => $this->fetchHumanBoolean($this->findCsvMatch($row, 'activated')),
];