Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require serial numbers to be unique #5751

Closed
Jarli01 opened this issue Jun 26, 2018 · 12 comments
Closed

Require serial numbers to be unique #5751

Jarli01 opened this issue Jun 26, 2018 · 12 comments

Comments

@Jarli01
Copy link
Contributor

Jarli01 commented Jun 26, 2018

Server (please complete the following information):
Snipe-IT version | v4.4.2 build 3666 (gaa5003d29)
Software License | AGPL3
PHP Version | 7.1.19
Laravel Version | 5.4.35

CentOS 7

Is your feature request related to a problem? Please describe.
As it is now, if a asset tag is removed from a physical device and someone lazily just creates a new asset tag for the device without searching for the serial number you end up with duplicate assets.

By using the serial number as the unique identifier (in my case) we would never have duplicate assets with the same serial number (just wouldn't ever occur in our case).

To protect from laziness, using the serial number as a unique field would protect from the "whoops I was lazy and didn't check" cases.

Describe the solution you'd like
A feature option that is set at the organization level (so different companies within an organization could have the option to individually set) if serial numbers must be unique before a new asset is added/created.

Describe alternatives you've considered
Based on the types of assets we have, our focus is on serial number, everything that is an "Asset" has a unique serial number even if the devices are from different manufacturers. Model numbers can match, sure but the serial is always unique.

For items so trivial that don't have serial numbers they get added to the system as an accessory and just get accounted for in that manner.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@snipe
Copy link
Owner

snipe commented Jul 6, 2018

This is currently on develop. Can you give it a try and test it out? Check the Settings > General box for unique serials, and test with duplicated serials and also nulls.

https://develop.snipeitapp.com

@Jarli01
Copy link
Contributor Author

Jarli01 commented Jul 6, 2018

That'll work exactly as needed! Thanks for the quick turn around!

@sid8000
Copy link

sid8000 commented Jul 6, 2018

@snipe but then what about already created assets?
How does this applicable to those assets?
Can I try this on https://develop.snipeitapp.com?

@snipe
Copy link
Owner

snipe commented Jul 6, 2018

@sid8000 it won’t have any understanding of assets that already exist that have duplicate serials, but if you try to save an existing asset with a pre-existing serial, it will throw an error instead of letting you save it.

@snipe snipe closed this as completed in 339263a Jul 10, 2018
@markwizer
Copy link

what about if you import? with the same serial ? there is no error in it

@Jarli01
Copy link
Contributor Author

Jarli01 commented Jul 11, 2018

@markwizer the expectation is you verify the data before you upload I would assume. Importing isn't an ordeal for me, but you can easily search for duplicates in Excel/LibreCalc etc and correct anything before it goes into the database.

@snipe thanks again!

@markwizer
Copy link

@Jarli01 I think snipe can add that feature that it will not proceed on importing whenever it has the same serila, like an error message serial must be unique

@Jarli01
Copy link
Contributor Author

Jarli01 commented Jul 13, 2018

@markwizer she might be able to add it as a feature of the importer function, but this should be controlled long before the data ever reaches a production database.

Clerical controls can make this a non-issue as it's trivially easy to highlight duplicate values.

@Jarli01
Copy link
Contributor Author

Jarli01 commented Oct 11, 2018

@esspeecy410 you can opt to enable this or not. Full company support allows this to occur in separate companies as well.

Trying to add in the random cases of taking what should be a UUID in the world of serial numbers and saying that it should also account for reasons XYZ doesn't really fit.

P.S. please create your own ticket and reference this one.

@rajtrivedi2001
Copy link

rajtrivedi2001 commented Nov 28, 2019

This is currently on develop. Can you give it a try and test it out? Check the Settings > General box for unique serials, and test with duplicated serials and also nulls.

https://develop.snipeitapp.com

it doesnt worked as i have added ssda with following serial number twice 958b9455-e90a-3590-a9cd-ffecb9214985

@aledr
Copy link

aledr commented Feb 8, 2022

It is not working.
I was also able to add duplicated Serial Number.

@snipe
Copy link
Owner

snipe commented Feb 8, 2022

@aledr Please don’t frankenthread. A lot has changed since the last post here. Open a new issue and fill out the issue template so we can help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants