snipe / snipe-it

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

Update existing values giving result the serial must be unique #11845

Open x3inspire opened 2 years ago

x3inspire commented 2 years ago

Debug mode

Describe the bug

Getting "Warning Some Errors occured while importing" : The serial must be unique.

Reproduction steps

  1. Uploading .csv file for importing giving error "The serial must be unique."
  2. Before click import button i already checked "Update Existing Values?:"

Expected behavior

I tried to import and update asset tag. The problem now is after i tried to import even i checked the "Update Existing Values", it's not allowed. It say "The serial must be unique."

Possible to allowed we changed or updated asset tag without replace the serial number and mac address under custom field using .csv file?

Screenshots

2022 09 18-21_26_10

Snipe-IT Version

v6.0.10

Operating System

Centos

Web Server

Litespeed

PHP Version

7.4.30

Operating System

No response

Browser

No response

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

No response

Additional context

No response

SourSpoon commented 2 years ago

Aset IP/ mac lan/ mac wifi need to be tied to a field in the Snipe IT database.

x3inspire commented 2 years ago

Aset IP/ mac lan/ mac wifi need to be tied to a field in the Snipe IT database.

Sorry i uploaded wrong screenshot. It's okay for Asset IP and MAC Address. But asset tag should be allowed for updated/replaced if we checked the "Update Existing Values?:" right?

I know we can edit the asset tag manually from the asset list, but i have a lot of asset need to edited and planning to import from csv file.

SourSpoon commented 2 years ago

Typically, asset tag is the primary key.

If you are trying to change the asset tag then things may get messy, is this what you are trying to do?

x3inspire commented 2 years ago

Typically, asset tag is the primary key.

If you are trying to change the asset tag then things may get messy, is this what you are trying to do?

Yes, i want to update the asset tag later because right now our real asset details is messed up. So what can i do now is use or put dummy aset tag number and after i collect the real asset tag i will update it soon using import .csv file.

SourSpoon commented 2 years ago

When you use the importer it uses the asset tag to check if it exists in the database or not.

If it doesn't (in this case) it will try to create a new asset.

There is a python module that may be able to help you, that uses asset name as it's primary key, but im not sure how well supported it is here.

https://snipe-it.readme.io/docs/external-libraries-scripts

Snipe-IT Documentation
Third-Party Integrations
Since the release of the JSON REST API, several third-party developers have been developing modules and libraries to work with Snipe-IT. Python Module by @jbloomerSnipeSharp - .NET module in C# by @barrycareyInQRy (unmaintained) - by @MicrosoftSnipeitPS by @snazy2000 - Powershell API Wrapper for Sni...
x3inspire commented 2 years ago

When you use the importer it uses the asset tag to check if it exists in the database or not.

If it doesn't (in this case) it will try to create a new asset.

There is a python module that may be able to help you, that uses asset name as it's primary key, but im not sure how well supported it is here.

https://snipe-it.readme.io/docs/external-libraries-scripts

Snipe-IT DocumentationThird-Party IntegrationsSince the release of the JSON REST API, several third-party developers have been developing modules and libraries to work with Snipe-IT. Python Module by @jbloomerSnipeSharp - .NET module in C# by @barrycareyInQRy (unmaintained) - by @MicrosoftSnipeitPS by @snazy2000 - Powershell API Wrapper for Sni...

So if i have multiple item with same Asset Tag i cannot save right? I have multiple item with same asset code number here, so what can i do :(

Snipe-IT Documentation
Third-Party Integrations
Since the release of the JSON REST API, several third-party developers have been developing modules and libraries to work with Snipe-IT. Python Module by @jbloomerSnipeSharp - .NET module in C# by @barrycareyInQRy (unmaintained) - by @MicrosoftSnipeitPS by @snazy2000 - Powershell API Wrapper for Sni...
snipe commented 2 years ago

I have multiple item with same asset code number here, so what can i do :(

Asset tag is required to be unique within the Snipe-IT system.