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

Assets number/count mismatch on the "View User" screen #15289

Open
2 tasks done
ma540x opened this issue Aug 13, 2024 · 13 comments
Open
2 tasks done

Assets number/count mismatch on the "View User" screen #15289

ma540x opened this issue Aug 13, 2024 · 13 comments
Labels
✋ bug Confirmed bug

Comments

@ma540x
Copy link

ma540x commented Aug 13, 2024

Debug mode

Describe the bug

I'm seeing on my snipe-it install that the "Assets" count is different then the number of Assets I currently have checked out to my name. I apologize if this is a super simple fix, but I can't find anywhere where I can just simply fix this issue. This occurs for pretty much all of my "users" in my database.
Assets_mismatch

Reproduction steps

  1. Navigate to snipe-it instance
    2.Login
    3.Click on People
  2. Search for a user
  3. Click on the User's name

...

Expected behavior

The Tab name/title of "Assets" follows by a number that needs to match the actual assets that are listed below the tab. But what I see (as pictured) is Assets is showing number 38 (on tab on top), but the body of the page is showing "14" total Assets assigned to me.
Thank you!

Screenshots

No response

Snipe-IT Version

Version v7.0.10 - build 14684 (master)

Operating System

Windows 10

Web Server

Apache

PHP Version

8.2.12

Operating System

Windows 11

Browser

Edge

Version

126.0.2592.87

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

No response

Additional context

No response

Copy link

welcome bot commented Aug 13, 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.

@ma540x
Copy link
Author

ma540x commented Aug 13, 2024

Assets_mismatch2

More screenshots, but basically the same idea, the Assets number does not match the assets that I see on the page.

Thanks!

@snipe
Copy link
Owner

snipe commented Aug 14, 2024

Are any of those assets archived (or belong to an archived status?)

@snipe
Copy link
Owner

snipe commented Aug 14, 2024

Also are using full multiple company support, and is it possible that those assets don't belong to the same company as the user?

@ma540x
Copy link
Author

ma540x commented Aug 14, 2024

Hiya, I only have 18 assets that are marked as "Archived" (from what i can tell, attaching screenshot), which wouldn't account for the delta in numbers, as these were assigned as Archived > Lost just yesterday. Looking into the multiple company support issue (although when i imported all the assets, they were in the same xls, same format, but i'll look).

Snipe_support2

@ma540x
Copy link
Author

ma540x commented Aug 14, 2024

Did not define any companies at all (so using Default settings) for everything basically.
Snipe_support3

@ma540x
Copy link
Author

ma540x commented Aug 14, 2024

Snipe_support4

Checkbox is not enabled

@ma540x
Copy link
Author

ma540x commented Aug 14, 2024

Ok so i just solved this by --> Purge "Deleted" data from the system, i don't know why the Assets were showing up that were marked as "Delete", but after purging all Deleted data, now the Assets match.

If this is a defect, then please fix this for future :)

And thanks Snipe for a quick response on this!!

@snipe
Copy link
Owner

snipe commented Aug 14, 2024

I think it definitely seems like a defect. I'll do a little more digging, but I suspect that's the situation.

@snipe
Copy link
Owner

snipe commented Aug 14, 2024

i don't know why the Assets were showing up that were marked as "Delete", but after purging all Deleted data, now the Assets match.

We use soft deletes (until you purge), so it's likely we have a relationship that's being used that is using ->withTrashed() to give more accurate counts overall but ones that are not helpful here. I'll dig in deeper this week.

@ma540x
Copy link
Author

ma540x commented Aug 14, 2024

Thank You Snipe!

And thanks for creating this wonderful tool :)

@snipe snipe added the ✋ bug Confirmed bug label Aug 14, 2024
@snipe
Copy link
Owner

snipe commented Aug 15, 2024

Well, what's stranger here is that this situation would arise at all. You can't delete an asset if it's still assigned to someone, you can only checkin and delete, so I'm not sure how you ended up here in the first place. Do you know how those deleted items got deleted? (API, GUI, etc)

@ma540x
Copy link
Author

ma540x commented Aug 15, 2024

GUI only, and now i can't remember if i deleted the import file first or just went ahead and deleted all of the previous assets first, but I wasn't happy with the info/values for the first couple of uploads/imports, so deleted those items.

Sorry no concrete repro steps.

image

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

2 participants