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

It's possible to delete assets that have licenses/assets checked out to them #15576

Open
2 tasks done
StarlessNights opened this issue Sep 30, 2024 · 2 comments
Open
2 tasks done
Assignees
Labels
✋ bug Confirmed bug

Comments

@StarlessNights
Copy link
Contributor

Debug mode

Describe the bug

Most objects in Snipe-IT are protected from deletion until they're "empty". E.g. you cannot delete a Location which has assets assigned to it, or a Company which contains assets, users etc.

However, Assets themselves are an exception. It is possible to delete an asset that has licenses or other assets checked out to it. Granted that it's a soft delete, but this still feels inconsistent. I would expect the delete button to be greyed out until the asset has been cleared and sorted out.

A follow up question: What happens to these "asset links" if you purge the database?

Reproduction steps

  1. Create two assets A & B
  2. Checkout A to B
  3. Delete B

Expected behavior

Deleting assets should be impossible while there's stuff checked out to them.

Alternatively, the assigned assets and licenses could be checked in at deletion time automatically. This could be nice but it's not in line with other object types.

Screenshots

No response

Snipe-IT Version

7.0.12

Operating System

Ubuntu (Container)

Web Server

Apache (container)

PHP Version

8.1

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

@StarlessNights
Copy link
Contributor Author

StarlessNights commented Sep 30, 2024

It seems like deleting an asset will undo it's own checkout. I.e. deleting as asset that itself is checked out to something, will make it not checked out.

@snipe snipe added the ✋ bug Confirmed bug label Oct 2, 2024
@marcusmoore
Copy link
Collaborator

Confirmed. I'll work on this.

@spencerrlongg spencerrlongg removed their assignment Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✋ bug Confirmed bug
Projects
None yet
Development

No branches or pull requests

4 participants