snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

Commandline importer missing Serial Number

Open bjorntk opened this issue 8 years ago • 3 comments

This was working fine on v3 before the upgrade to v4

When I run "php artisan snipeit:import /home/csv/T15845.csv" from command line it says:

======= Importing Items from /home/csv/T15845.csv =========
 1/1 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%All Items imported successfully!

This is the content of T15845.csv:

Asset Tag,Category,Model Name,Manufacturer,Model Number,Serial Number,MAC Address,Status
T15845,Tynnklient,HP t530 Thin Client,HP,,8CG739507K,AC:E2:D1:0D:AF:CA,Lager

All fields here except Serial Number is populated in Snipe-IT.

I have tested some variants but could not find any way to solve it. When using the GUI importer this is working fine. Updated: This happens with all imports from commandline.

Expected Behavior

List all fields of asset

Actual Behavior

Missing Serial Number

Please confirm you have done the following before posting your bug report:


Provide answers to these questions:

  • Is this a fresh install or an upgrade? Upgrade

  • Version of Snipe-IT you're running v4.1.10-pre build 3185 (g5b15a2f)

  • Version of PHP you're running 5.6.33-0+deb8u1

  • Version of MySQL/MariaDB you're running MySql Ver 14.14 Distrib 5.5.58

  • What OS and web server you're running Snipe-IT on Debian, Apache

  • What method you used to install Snipe-IT (install.sh, manual installation, docker, etc) Git

  • Include any additional information you can find in app/storage/logs and your webserver's logs.

[2018-01-16 11:00:43] production.INFO: Found a match in our custom map: category is category
[2018-01-16 11:00:43] production.INFO: Custom Key: category
[2018-01-16 11:00:43] production.INFO: A matching category: Tynnklient already exists
[2018-01-16 11:00:43] production.INFO: Found a match in our custom map: company is company
[2018-01-16 11:00:43] production.INFO: Custom Key: company
[2018-01-16 11:00:43] production.INFO: Found a match in our custom map: location is location
[2018-01-16 11:00:43] production.INFO: Custom Key: location
[2018-01-16 11:00:43] production.INFO: Found a match in our custom map: manufacturer is manufacturer
[2018-01-16 11:00:43] production.INFO: Custom Key: manufacturer
[2018-01-16 11:00:43] production.INFO: Manufacturer HP already exists
[2018-01-16 11:00:43] production.INFO: Found a match in our custom map: status is status
[2018-01-16 11:00:43] production.INFO: Custom Key: status
[2018-01-16 11:00:43] production.INFO: A matching Status Lager already exists
[2018-01-16 11:00:43] production.INFO: Found a match in our custom map: supplier is supplier
[2018-01-16 11:00:43] production.INFO: Custom Key: supplier
[2018-01-16 11:00:43] production.INFO: Found a match in our custom map: item_name is item name
[2018-01-16 11:00:43] production.INFO: Custom Key: item name
[2018-01-16 11:00:43] production.INFO: Found a match in our custom map: notes is notes
[2018-01-16 11:00:43] production.INFO: Custom Key: notes
[2018-01-16 11:00:43] production.INFO: Found a match in our custom map: order_number is order number
[2018-01-16 11:00:43] production.INFO: Custom Key: order number
[2018-01-16 11:00:43] production.INFO: Found a match in our custom map: purchase_cost is purchase cost
[2018-01-16 11:00:43] production.INFO: Custom Key: purchase cost
[2018-01-16 11:00:43] production.INFO: Found a match in our custom map: purchase_date is purchase date
[2018-01-16 11:00:43] production.INFO: Custom Key: purchase date
[2018-01-16 11:00:43] production.INFO: Custom Key: quantity
[2018-01-16 11:00:43] production.INFO: Found a match in our custom map: requestable is requestable
[2018-01-16 11:00:43] production.INFO: Custom Key: requestable
[2018-01-16 11:00:43] production.INFO: Custom Key: serial
[2018-01-16 11:00:43] production.INFO: Found a match in our custom map: name is name
[2018-01-16 11:00:43] production.INFO: Custom Key: name
[2018-01-16 11:00:43] production.INFO: Found a match in our custom map: email is email
[2018-01-16 11:00:43] production.INFO: Custom Key: email
[2018-01-16 11:00:43] production.INFO: Found a match in our custom map: username is username
[2018-01-16 11:00:43] production.INFO: Custom Key: username
[2018-01-16 11:00:43] production.INFO: No user data provided - skipping user creation, just adding asset
[2018-01-16 11:00:43] production.INFO: Custom Field MAC Address: AC:E2:D3:0D:AF:CA
[2018-01-16 11:00:43] production.INFO: Found a match in our custom map: asset_tag is asset tag
[2018-01-16 11:00:43] production.INFO: Custom Key: asset tag
[2018-01-16 11:00:43] production.INFO: No Matching Asset, Creating a new one
[2018-01-16 11:00:43] production.INFO: Found a match in our custom map: image is image
[2018-01-16 11:00:43] production.INFO: Custom Key: image
[2018-01-16 11:00:43] production.INFO: Found a match in our custom map: warranty_months is warranty
[2018-01-16 11:00:43] production.INFO: Custom Key: warranty
[2018-01-16 11:00:43] production.INFO: Found a match in our custom map: asset_model is model name
[2018-01-16 11:00:43] production.INFO: Custom Key: model name
[2018-01-16 11:00:43] production.INFO: Found a match in our custom map: model_number is model number
[2018-01-16 11:00:43] production.INFO: Custom Key: model number
[2018-01-16 11:00:43] production.INFO: A matching model already exists, returning it.
[2018-01-16 11:00:43] production.INFO: Asset  with serial number  was created
[2018-01-16 11:00:43] production.INFO: ------------- Action Summary ----------------
  • Include what you've done so far in the installation, and if you got any error messages along the way. No errormessages.
  • Indicate whether or not you've manually edited any data directly in the database No

bjorntk avatar Jan 16 '18 10:01 bjorntk

@dmeltzer do you remember offhand if that column needs to be called something else now?

snipe avatar Jan 17 '18 14:01 snipe

It is now called just "Serial", and not "Serial Number".

I thought I tried that the first time, but I must have done something else wrong then. Anyways, it is working now :)

bjorntk avatar Jan 20 '18 12:01 bjorntk

Thanks helped me alot

pknutti avatar Mar 26 '19 08:03 pknutti