snipe / snipe-it

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

Problem with Bulk Checkin #15109

Closed qu1dam closed 3 months ago

qu1dam commented 3 months ago

Debug mode

Describe the bug

When an individual user has Accessories and/or Consumables on him and after I want to do Bulk Checkin / Delete Users by clicking on that user, a list of everything he has on him appears. When I click on the box that I want to bulk check in on that user, I select the status and click submit. on the Dashboard and under Recent Activity as well as under user history, it does not show me the correct checkin Accessories and/or Consumables, but writes random ones that were not under that user at all.

Reproduction steps

I've checked the above with multiple versions of the app as well as the latest available, but the problem still persists.

Expected behavior

Under Recent Activity as well as under User History after Bulk Checkin / Delete Users it should show the exact Accessories and/or Consumables or anything else that was actually on it.

Screenshots

No response

Snipe-IT Version

v7.0.9

Operating System

Ubuntu, Windows

Web Server

Apache, IIS

PHP Version

8.1.2 or greater

Operating System

No response

Browser

No response

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

No response

Additional context

No response

welcome[bot] commented 3 months 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.

snipe commented 3 months ago

I'm not able to reproduce this.

Screenshot 2024-07-20 at 12 06 44 AM Screenshot 2024-07-20 at 12 08 10 AM Screenshot 2024-07-20 at 12 09 31 AM Screenshot 2024-07-20 at 12 09 55 AM Screenshot 2024-07-20 at 12 10 19 AM
qu1dam commented 3 months ago

Totally clean installation, without any previous editing. Manually added three accessories that were assigned to the user, then removed and not even the name of the exact accessories is shown, as can be seen in the photos below 1 2 3 4

snipe commented 3 months ago

Can you reproduce it on the demo? https://demo.snipeitapp.com

Snipe-IT Asset Management Demo
qu1dam commented 3 months ago

I want to try that before, and try right now but i can't, because Bulk Checkin has been disabled for the demo installation.

snipe commented 3 months ago

Ah, rats, you're right. (We have to do that because folks otherwise try to delete the demo users. Sigh.)

qu1dam commented 3 months ago

Can you temporarily enable that option or create an additional instance? In addition, I see that you did the test only with licenses, but not with Accessories and/or Consumables

snipe commented 3 months ago

I can't - people will do all kinds of awful things on the demo.

I did the test with everything locally, multiple times.

snipe commented 3 months ago

https://github.com/user-attachments/assets/d85e069a-2aff-4612-a8e9-468133c5e2d1

snipe commented 3 months ago

@marcusmoore @bzeus can you see if you can reproduce this?

qu1dam commented 3 months ago

Thank you for your effort. But I really don't understand how this is possible with me? And I say, whether I installed a new instance of SnipeIT or an already used one, sometimes the Accessories and/or Consumables get mixed up and show the wrong ones that the user had after bulk checkin, while sometimes they are blank as I sent in the last photos.

snipe commented 3 months ago

I don't know either. I showed you my video. I'll have Marcus and Birgit take a look on Monday.

qu1dam commented 3 months ago

I have tested several times and it seems that assets Bulk Checkout works, but unfortunately not on Accessories and/or Consumables

marcusmoore commented 3 months ago

I was able to trigger it after it seemingly working just fine for a few attempts.

Check out the blank spots in the history table on the user's page: user history

You can see it worked ok until the 11:59PM attempt and then blanks started appearing.

Check out the item_ids that are being stored on the last chunk of action log items: database

Those item_ids don't match at all. I don't even have accessories or consumables in my database with an id higher than 4.

There is some weird mapping or something happening. Still diving in.

qu1dam commented 3 months ago

Hello Marcus, thank you for your efforts in reproducing the error.

If you don't have a lot of items, sometimes blank spots appear.

While there are several items, although I'm not 100% sure if it has anything to do with it, the Accessories are completely mixed up and appear totally different from those that were added to the user during the bulk checkout.

marcusmoore commented 3 months ago

FYI: I have started a fix for this on this branch.

qu1dam commented 3 months ago

Great, thanks for the effort

huifei0129 commented 3 months ago

Can we "Bulk Checkin" some of the user items, not all items ? For example, user has 100 items, but i only want to check in 90 items one time. thank you

marcusmoore commented 3 months ago

Thanks for reporting this @qu1dam. It is fixed in #15221 and will be included in the next release, v7.0.11, so I'm going to close this. Please re-open or tag me if you still have issues after upgrading.

@huifei0129 please open a feature request so we can talk about and track.