snipe / snipe-it

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

Double tag prefix on assets when prefix is a number and auto-increment is enabled #15152

Open GustelDE opened 1 month ago

GustelDE commented 1 month ago

Debug mode

Describe the bug

We have set an Asset-Tag prefix, it's always the year like "24-" for 2024. After this, we have a 4-digit number, like 24-1234.

When we duplicate an asset (eg. 24-1234), the new asset tag will be 24-241235, 24-241236 and so on. We have to manully edit each asset-tag and remove the "second 24".

Reproduction steps

  1. Duplicate asset
  2. click the "+" behind the Asset Tag line.

Expected behavior

Should no duplicate the prefix, not 24-241234, should be 24-1234

Screenshots

Screenshot 2024-07-24 132437 Screenshot 2024-07-24 132450

Snipe-IT Version

7.0.9

Operating System

Docker

Web Server

Docker

PHP Version

Docker

Operating System

Windows

Browser

Firefox

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

No response

Additional context

No response

snipe commented 1 month ago

This seems like it only happens when the prefix is a number. Hmm.