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

CSV import not setting Checkout Date field

Open ronmarion25 opened this issue 10 years ago • 5 comments

Expected Behavior (or desired behavior if a feature request)

When I include Checkout date in the import file with a status set to Deployed and a Username associated with the asset, the Checkout Date should either be set by the relevant column in the CSV or set automatically based on the date of the import.


Actual Behavior

The asset gets marked Deployed and is properly assigned to the User, but the Checkout Date is blank. Note that there is no Checkout Date in the import file template on the web site, so it's possible that the column header would work if changed to something else.


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


Please provide answers to these questions before posting your bug report:

  • Version of Snipe-IT you're running v3.4-14-g2a8ab06
  • What OS and web server you're running Snipe-IT on CentOS 7
  • What method you used to install Snipe-IT (install.sh, manual installation, docker, etc) Manual installation
  • If you're getting an error in your browser, include that error No error message
  • What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error N/A
  • If a stacktrace is provided in the error, include that too. N/A
  • Any errors that appear in your browser's error console. N/A
  • Confirm whether the error is reproduceable on the demo. Reproduceable
  • Include any additional information you can find in app/storage/logs and your webserver's logs. N/A
  • Include what you've done so far in the installation, and if you got any error messages along the way. N/A
  • Indicate whether or not you've manually edited any data directly in the database No

ronmarion25 avatar Nov 01 '16 15:11 ronmarion25

We don't currently import a checkout_date field. It would be fairly easy to add though, I'll try to get to it in the next few days.

mnemonicly avatar Nov 01 '16 16:11 mnemonicly

We really like SnipeIT so for, however we have thousands of old records from another asset management solution that need to be imported, and not being able to import the checkout_date is fairly detrimental. We don't want to import so many records without having all of the data clean and appropriate values in place. The only thing holding us back is this checkout_date.

I have looked into the code, and as far as I can tell the following is true:

  • The order of columns in the CSV is important
  • The order seems to require [Name, Email, Username, Asset Name?, Category, Model Name, Manufacturer, Model Number, Serial Number, Asset Tag, Location, Notes, Purchase Date, Purchase Cost, Company Name

I'm referencing code available at: https://github.com/snipe/snipe-it/blob/master/app/Console/Commands/AssetImportCommand.php

I would contribute a fix to add Checkout Date, however I am fairly confused about the above reliance on column order. It seems to me that the UI Importer is calling the same command as the CLI Importer (snipeit:asset-import)

BAGELreflex avatar Mar 09 '17 17:03 BAGELreflex

Have you looked into the Import History option? https://snipe-it.readme.io/docs/importing-history

snipe avatar Mar 11 '17 00:03 snipe

I have the same problem.

I have used the Import History function as suggested with 3 columns Date, Name, Tag and everything works, assets are checked out to users and I can see the correct Checkout Date in the history log of the asset, but no date is actually displayed in the Checkout Date column of the Assets view. If I manually check an asset back in and out again, the Checkout Date column populates as expected. Looks to be a bug.

slinkoff avatar Apr 26 '17 22:04 slinkoff

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions!

stale[bot] avatar Jan 20 '18 11:01 stale[bot]