snipe / snipe-it

A free open source IT asset/license management system
https://snipeitapp.com
GNU Affero General Public License v3.0
10.97k stars 3.16k forks source link

MAC Address #11429

Closed JManDoo closed 2 years ago

JManDoo commented 2 years ago

Debug mode

Describe the bug

When importing assets from CSV, the MAC Address field is filled in, but the imported Asset does not have the MAC Address added to it

Reproduction steps

Import a CSV Map the MAC Address Field Import

Look at imported Asset -> Missing MAC Address

Expected behavior

I would expect that the Imported Asset's MAC Address field should contain the MAC Address from the CSV Import

Screenshots

image

image

Snipe-IT Version

v6.0.5 Build 8230 (g393c32558)

Operating System

Debian 10 - Docker

Web Server

Apache

PHP Version

7.4.3

Operating System

Windows

Browser

Edge

Version

Version 103.0.1264.37 (Official build) (64-bit)

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

No response

Additional context

Fresh Docker Deployment MAC Address Format in CSV uses Colons: 6C:6A:77:4C:E4:21

welcome[bot] commented 2 years ago

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

mikeroq commented 2 years ago

Can you provide a sample of the CSV file you are importing? I did a sample import and MAC address came in fine.

snipe commented 2 years ago

Yeah, I don't think we've seen any other users/customers with this issue. I'd be curious to see your data as well.

JManDoo commented 2 years ago

During the import, as shown in the Screen Cap above, the MAC Address shows as an example

Either way....here is a sample of the CSV File

item Name,Username,MACAddress,Serial Number,Manufacturer,Model Name,Asset Tag L3041HQ,abc123,E8:9E:B4:5B:F2:BD,17RWLH2,Dell Inc.,Latitude 7480,L3041HQ W2798HQ,def345,48:4D:7E:EF:AF:61,FFJKP52,Dell Inc.,OptiPlex 3040,W2798HQ W3081MP,jkl567,50:9A:4C:5B:58:0E,JBPCH8A,Dell Inc.,OptiPlex 3050,W3081MP

mikeroq commented 2 years ago

Did you already create these asset models?

When importing without the models existing, they are created on demand. Since these models don't have the "Asset with MAC Address" fieldset, the MAC is not imported.

If you create the model first and give it that fieldset, the MAC address is imported. If you update the model, and process the import with update existing values, the MAC address is imported.

Edit: According to docs:

You'll still need to create Custom Fieldsets, assign your new Custom Fields to those field sets, and assign them to your newly imported models once you're done with your import. We don't currently try to create your fields on the fly, or try to assign them to Custom Fieldsets and Asset Models because bad data could make a real mess of things if we did. Future versions will have a nicer Web UI interface that will allow you to handle some of those tasks on the import.

https://snipe-it.readme.io/docs/importing#importing-custom-fields

Edit 2: I had to move the MAC Address field to the end of the columns on the CSV for it to import.

snipe commented 2 years ago

Hi there - We haven't heard back in a bit, so I'm going to close this ticket for now, but will re-open it if you're still having issues.

hackerman-hacking

projects-tslit commented 2 months ago

same issue.. unable to import mac address its getting imported but not reflecting in the imports of the file .

projects-tslit commented 2 months ago

can anybody help for the same issue. did anyone else try and make the import custom fields video on youtube or anywhere ?

snipe commented 2 months ago

@projects-tslit you have to make sure the asset's model has the right fieldset associated with it.