-
-
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
User asset history mistakes software log entries for hardware #937
Comments
I'm not familiar with the ORM that snipe-it uses (or much PHP, for that matter), but looking at the code for ActionLog, I think the fix would be to replace:
with
|
How about you start with telling me what version of Snipe-IT you're using, and where you're seeing the bug? |
Is this only on the user page? |
Sorry, I meant to post my version details, but forgot. v1.2.7 running on Ubuntu. I've only noticed it in the user page. I'm checking other pages to see if it happens elsewhere. |
I could only get it to happen on the user page. |
This is in the log at the bottom of the user detail view page, correct? |
This is fixed in 2.0 |
On a user page, their asset history is displayed. The grid seems to think that every entry in the asset_logs table is hardware-related (essentially ignoring the asset_type column). The SQL it generates must be something along these lines:
If there is a license and an an asset with the same ID, the query will interpret a software entry to be for the piece of hardware that is completely unrelated. Thus, we could have servers show up in users' histories :).
I think the query should look something more like this:
or maybe exclude the software ones, if that's easier:
The text was updated successfully, but these errors were encountered: