snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

Asset tag reset to 1 after upgrade to 4.0.9. Incorrect autoincrement

Open sydit opened this issue 9 years ago • 7 comments

#3104 Expected Behavior (or desired behavior if a feature request)

Create asset with next auto increment value.


Actual Behavior

My total assets are 850. After upgrading to 4.0.9 when I create asset , the tag reset to 1. However I can see all myprevious assets on dashboard and also its possible to set asset tag manually. I had this issue earlier( #3104 ) which was solved by editing app/Models/Asset.php But this time it doesn't work. I also tried fresh install with imported data but the issue remains.


Please confirm you have done the following before posting your bug report:


Provide answers to these questions:

  • Tried both fresh install and upgrade with imported DB
  • 4.0.9
  • PHP 7.0
  • MariaDB 10.1.28
  • OS Ubuntu 16.04, manual install with Debug ON

sydit avatar Oct 11 '17 08:10 sydit

Did you set the auto-increment number in Settings > Asset Tags?

snipe avatar Oct 11 '17 08:10 snipe

Yes currently auto increment value is 1. I can set manually on create asset page with last tag but next time when I create asset incremented value is HW0002 instead of HW0852.

sydit avatar Oct 11 '17 08:10 sydit

You have to set the auto-increment in Admin > Settings > Asset Tags.

snipe avatar Oct 11 '17 08:10 snipe

image

Yep its all set. Total assets are 850. But still facing issue image

sydit avatar Oct 11 '17 08:10 sydit

Then your next auto-increment shouldn't be set to 1, it should be whatever your next number is.

snipe avatar Oct 11 '17 08:10 snipe

Sorry I'll try it now and let you know.....

sydit avatar Oct 11 '17 08:10 sydit

Yes it's working. :+1: So simple settings which I missed. I'm closing the issue. Thanks snipe for your help

sydit avatar Oct 11 '17 08:10 sydit