snipe / snipe-it

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

Asset entry breaks upon creating multiple assets, if the same serial is used twice. #11755

Open tomirantalankila opened 2 years ago

tomirantalankila commented 2 years ago

Debug mode

Describe the bug

When creating multiple assets at once: if you copy-paste a serial that's been already used in that queue, Snipe IT does not warn you about this and instead, creates only one instance of the asset and skips one asset number. This also causes the auto-increment to break and keep offering the latest asset tag, which has already been used. This can be fixed by either changing the auto-increment to +1 of the offered one or by going through the latest asset tags and manually tracking down which value was skipped and then using it.

Reproduction steps

  1. Create new asset
  2. Add another asset to create from the "+"-icon
  3. Enter a serial to the first asset
  4. Copy-paste the serial to the second asset
  5. Fill out rest for the forms as you please
  6. Press save

Expected behavior

An error message should appear about reusing the serial number.

Screenshots

No response

Snipe-IT Version

v6.0.9 build 8515 (g51f729872)

Operating System

Debian GNU/Linux 11 (bullseye)

Web Server

apache2 2.4.54-1~deb11u1

PHP Version

7.4.30

Operating System

macOS 12.5.1 (21G83)

Browser

Safari

Version

Version 15.6.1 (17613.3.9.1.16)

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

No response

Additional context

No response

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.