Merge pull request #13344 from snipe/fixes/added_manufacturer_to_licenses

Fixes bug/sc-23509: Added manufacturer back into license importer
This commit is contained in:
snipe 2023-07-20 14:05:19 +01:00 committed by GitHub
commit ee36497acf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -286,6 +286,7 @@ class Importer extends Component
'serial' => trans('general.license_serial'),
'email' => trans('general.importer.checked_out_to_email'),
'username' => trans('general.importer.checked_out_to_username'),
'manufacturer' => trans('general.manufacturer'),
];
$this->users_fields = [

View file

@ -66,6 +66,8 @@ class LicenseImporter extends ItemImporter
$this->item['maintained'] = $this->findCsvMatch($row, 'maintained');
$this->item['purchase_order'] = $this->findCsvMatch($row, 'purchase_order');
$this->item['reassignable'] = $this->findCsvMatch($row, 'reassignable');
$this->item['manufacturer'] = $this->createOrFetchManufacturer($this->findCsvMatch($row, 'manufacturer'));
if($this->item['reassignable'] == "")
{
$this->item['reassignable'] = 1;