-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Current location deleted when editing asset #13889
Comments
👋 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. |
Hi @docmedicus, Are you on the latest version? You will want to make sure that the checkbox below is checked if you want the asset's current location to change permanently. If you don't mark this it will just make a note of the location in the audit log. Let me know if you have any more questions or concerns. |
Hi @Godmartinz , yes, I have now recreated the problem on the latest version. We do set the location via auditing and checking "Update Asset Location", since this seems to be the only way to set the current location. (why is that?) If I then edit the asset (e.g. adding supplier informaton and purchase date), the current location is removed from the asset (I can also see this in the assets history). I assume that either the current location is removed, or reset to the default location (which we do not set any more, because we see no practical use for it). Either way I do not understand the behaviour. Is this intended? We are currently silently loosing asset locations when not manually checking them after each asset edit. |
After having a quick look at the code I suspect the following line(s) to be the cause of my confusion:
If the asset is update and not currently checked out, the current location is reset to the default location. What is the reasoning behind this? Can an asset not be at a certain location (as determined by an audit) and then be edited (e.g. to add an invoice). Why does the current location have to be changed in this case? Also, why is it not possible to set the current location apart from forcing it through an audit? |
I'd like to +1 this issue too. having to re-set the location after every edit or sign in/out is not ideal. |
I think the idea is that if an item is not checked out to a user, it would be "on the shelf" at it's default location, no? If you store the item somewhere when it isn't in use, shouldn't that be it's default location? |
Debug mode
Describe the bug
As described in #13682 we almost always loose the current location when editing assets. We set the current location using asset audits to track the assets actual location. When making changes to the asset, the current location seems to get lost and the asset reverts to the default location (if set) or no location.
Is this intended behaviour? We currently have to audit all assets again after editing them just to update the current location.
It would also be great if there was another way to set the current location.
Reproduction steps
Expected behavior
The current location is kept through asset edits.
Screenshots
No response
Snipe-IT Version
6.1.2
Operating System
Ubuntu
Web Server
Apache
PHP Version
8.1.2
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
The text was updated successfully, but these errors were encountered: