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

Asset checked out to user without a location retains default location #15997

Open
wurzelton opened this issue Dec 23, 2024 · 1 comment
Open

Comments

@wurzelton
Copy link

wurzelton commented Dec 23, 2024

Description of issue:
When an asset is checked out to a user who does not have an assigned location (i.e., the location is null), the asset’s location field still inherits the “default location” instead of being set to null (as derived from the user).
wrongly derived from default location

Why this is a problem:
As the IT department, we do not track the physical locations of our users. When an asset is assigned to a user, we only know that the user is responsible for it, but we have no knowledge of the device’s actual location. However, we know for certain that the device is not in the “default location” (which is usually our IT office). The current behavior creates confusion, as the location field incorrectly suggests that the asset remains in the default location.

Workaround with default-user-location not working neither:
As a workaround, we attempted to assign a default location called “user-specific” to all users. The idea was that this value would populate the asset’s location field when the asset is checked out to a user. To implement this, we used the ldap-sync command:
php artisan snipeit:ldap-sync --location=user-specific --summary

While this workaround correctly sets the location to “user-specific” for assets checked out to users, it also incorrectly assigns “user-specific” to assets checked out to a specific location. This behavior is problematic because assets explicitly checked out to a location should retain that location in the location field, not “user-specific.”

ldap-sync sets location wrong

If this second issue (the incorrect overwrite of location-specific assets with “user-specific”) could be resolved, it might reduce the need to address the first issue for us. However, it would still be beneficial to understand the logic behind the current behavior, in case there is a deliberate reason for it.

Copy link

welcome bot commented Dec 23, 2024

👋 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant