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

Auto generation of Asset Tags #8385

Open
gitneko opened this issue Aug 28, 2020 · 8 comments
Open

Auto generation of Asset Tags #8385

gitneko opened this issue Aug 28, 2020 · 8 comments

Comments

@gitneko
Copy link

gitneko commented Aug 28, 2020

Server (please complete the following information):

  • Snipe-IT Version 4.9.4
  • OS: [e.g. Ubuntu, CentOS] Linux
  • Web Server: [e.g. Apache, IIS] Apache
  • PHP Version 7.2.29

Is your feature request related to a problem? Please describe.
It should be possible to generate asset tags according to some scheme (i.e. A-Z,0-9). Currently the only way to have an automated way of creating asset tags is through an autoincrement. Many companies use this scheme of asset tags instead of an auto incremented numeric tag.

Describe the solution you'd like
I'd like to be able to generate an asset tag through a randomized string of characters.

Describe alternatives you've considered
I don't think there are any alternatives to this. Doing this all by hand is not intuitive.

@snipe
Copy link
Owner

snipe commented Aug 29, 2020

I don't really understand what you mean here though. How would this actually work?

@kgortmak
Copy link

Although not the proposer :-) you might think of some template variables. I have been working in several copanies and my current one uses a country code, an asset type code, a number and an OS addition to construct an asset ID like USL20117W, which basically means a US (L)aptop, number, (W)indows. Others used a formula with date strings in them so you could determine from the asset ID when it was installed for the first time (20200905_175). So it can be rather complex, but I think that if you just could define them as variables (%YY%, %MM%, %DD%, %Country%, %Type%, %OS% for the ones I named) together with a number that you can enter yourself, or get an auto incremented number would give enough possibilities, however the possibilities can be endless ;-)

@stale
Copy link

stale bot commented Dec 25, 2020

Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Don't take it personally, we just need to keep a handle on things. Thank you for your contributions!

@stale stale bot added the stale label Dec 25, 2020
@theukedge
Copy link

I'd say it's still relevant. I've been running a homegrown system for years, and am now transitioning to Snipe-IT. I would create asset tags based on random 4 character strings, using A-Z and 0-9, but excluding 0, 1, O, I, and L (l). It was the first feature I went looking for while configuring Snipe-IT. @kgortmak kind of nailed it with the implementation idea. For me, I had about 5 different templates, which were as simple as TXXX for tools, EXXX for equipment, DXXX for devices, SXXX for spare parts and BXXX for box (container).

Copy link

stale bot commented Jun 1, 2024

Okay, it looks like this issue or feature request might still be important. We'll re-open it for now. Thank you for letting us know!

@stale stale bot removed the stale label Jun 1, 2024
@snipe
Copy link
Owner

snipe commented Jun 1, 2024

Every time time this comes up, no one can really explain how this would work for the numeric part exactly though? Most people who want a prefix of some kind want it based on company, department, category, etc, followed by an incrementing number - but they also don't want that number to be out of sequence across those various things.

@snipe
Copy link
Owner

snipe commented Jun 1, 2024

@theukedge how do you propose we handle what I mentioned above?

@theukedge
Copy link

I'd say that allowing asset tag format templates would be best. With my asset tags, I prefer them random, rather than sequential, so I'd go for something like DRRR and when the tag is generated, it would choose 3 random characters (RRR) from the character set specified, test whether that tag exists, and if not, assign it (else, try again).

For people who want sequential numbering, I'd allow them to set that. I could see where people would either want it in sync with other tag formats, or not, so I'd allow them to pull in a specific number sequence into their tag template, or create a new one. For example, to keep them in sync, you might allow templates of US-0000 and EU-0000, where 0000 is the sequence, whose most recent value is stored in the database, which might then produce asset tags of:

  • US-1398
  • US-1399
  • EU-1400
  • US-1401
  • EU-1402

If people don't want the number sequence shared, you could track them separately in the database. So, you might have templates of US-0000 and EU-1111, where 0000 and 1111 are tracked separately, generating tags such as:

  • US-1398
  • EU-1921
  • EU-1922
  • US-1399
  • US-1400
  • EU-1923

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

No branches or pull requests

4 participants