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

License Import - Not importing Product Key

Open Tommoh opened this issue 9 years ago • 5 comments

Expected Behavior (or desired behavior if a feature request)

Import license from CSV by matching header and import field.


Actual Behavior

All fields seeem to import except the actual product key. The only import field that matches a product key is the field "Serial Key" from the drop down box. I think serial key is not the same as product key but a serial number of an asset so the imported license product key get's never imported and does not show in the inventory. This is all done via the web import and not CLI.


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 Version v4.0.4 build 1 (geca5a05)

  • What OS and web server you're running Snipe-IT on Debian 9, MariaDB and Apache 2, PHP 7

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

  • WITH DEBUG TURNED ON, if you're getting an error in your browser, include that error No errors. Import completes with no errors.

  • Confirm whether the error is reproduceable on the demo. Import disabled on demo.

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

  • Include what you've done so far in the installation, and if you got any error messages along the way. Tried matching any valid field with the product key and none of them would populate the license product key once imported. Also made sure that Import type has been set to License.

  • Indicate whether or not you've manually edited any data directly in the database No.

Tommoh avatar Sep 29 '17 08:09 Tommoh

Hello,

The "serial number" field should be used for the product key. Does it work if you use this field? Or is that the issue

mnemonicly avatar Sep 29 '17 11:09 mnemonicly

I have originally tried to use "serial number" but this value is not being imported. The import is successful with no errors, but once I visit the license inventory, the product key is empty.

I have tried to associate each import field and none of them would import/populate the product key.

I have also looked whether serial number is being used at all for the license type and even with a dummy value, the license inventory does not make use of the data so it almost looks like the field is being ignored when License import type is being used and serial number.

Many thanks

Tom

Tommoh avatar Sep 29 '17 12:09 Tommoh

I'm still having trouble reproducing this.

If I import a file of licenses (MOCK_LICENSES.csv in the sample_csvs folder fex) and map the serial number to the Serial Number field (or in your case, map the product key to the Serial Number field) it imports happily and the string appears in the product key.

One of the confusing parts is that while it's called a "product key" in the UI, it's stored in the database as a serial number. I'll look at making the text say product key in the importer, but I think if you map your product key to the serial number field it should work without issues. Can you try this?

Thanks

mnemonicly avatar Sep 30 '17 00:09 mnemonicly

Hi Dmeltzer,

Thank you for taking the time to look into this.

I didn't realise there was a mock CSV in the install directory. I have used the same CSV and I can import the license fine.

The original CSV that I used was from the documentation page which is completely different and maybe this is the reason. I did check that version was v4 but I think the documenation page isn't up to date.

I assume that the header titles in the CSV can be anything as long as they are matched within the UI?

Either way, I think I can proceed with the import now. So thank you again.

Tom

Tommoh avatar Oct 02 '17 08:10 Tommoh

I'll take a look at the documentation page and see if we can update it. The headers can indeed be anything.

mnemonicly avatar Oct 02 '17 10:10 mnemonicly