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

Bulk delete not checking the assigned_to type

Open UserGoodtm opened this issue 6 years ago • 6 comments

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

Describe the bug I just got a glitch. Deleted the disabled user. Deleted via check and delete. The user did not have any assigned assets. In the magazine, I was horrified to see that a lot of assets were released to the warehouse. These assets were never assigned to the dismissed user. Assets were previously assigned to the location.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots 5 6 7 8

Server (please complete the following information):

  • Snipe-IT Version v4.9.2
  • OS: CentOS
  • Web Server: Apache
  • PHP Version 7.3.9

**Desktop (please complete the following information):

OS: [e.g. iOS] Windows 10 Browser chrome, firefox Version Last Ver

Error Messages

  • WITH DEBUG TURNED ON, if you're getting an error in your browser, include that error
  • If a stacktrace is provided in the error, include that too.
  • Any errors that appear in your browser's error console.
  • Confirm whether the error is reproducible on the demo: https://snipeitapp.com/demo.
  • Include any additional information you can find in storage/logs and your webserver's logs.

Additional context

  • Is this a fresh install or an upgrade? upgrade
  • What OS and web server you're running Snipe-IT on
  • What method you used to install Snipe-IT (install.sh, manual installation, docker, etc) install.sh
  • Include what you've done so far in the installation, and if you got any error messages along the way.
  • Indicate whether or not you've manually edited any data directly in the database

Add any other context about the problem here.

Please do not post an issue without answering the related questions above. If you have opened a different issue and already answered these questions, answer them again, once for every ticket. It will be next to impossible for us to help you.

UserGoodtm avatar Jun 09 '20 09:06 UserGoodtm

I can reproduce this error in Version v4.9.2 - build 4352 (master).

If you "bulk delete" users, the assets checked out to the locations with the same location ID as the user's ID are bulk checked in. There seems to be a check missing wether the ID in the assigned_to field is a user ID or location / asset ID when bulk deleting users.

Please be aware about the severity of this bug since it did lead to several hundreds of assets erroneously checked in from locations in my installation upon deleting users.

Greetings,

      ^.^ Dingo

-- 

Treyfane avatar Jun 11 '20 15:06 Treyfane

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[bot] avatar Aug 22 '20 20:08 stale[bot]

Still relevant.

Treyfane avatar Aug 23 '20 10:08 Treyfane

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[bot] avatar Aug 23 '20 10:08 stale[bot]

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[bot] avatar Dec 25 '20 20:12 stale[bot]

Closing as this is already fixed in https://github.com/snipe/snipe-it/commit/d64b35c348022933edc74796b7095ed49fcd7b12

inietov avatar Jun 07 '22 18:06 inietov