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

If the user ID and the location ID are the same, then big problems may arise in the future #9216

Closed
2 tasks done
UserGoodtm opened this issue Feb 26, 2021 · 3 comments
Closed
2 tasks done
Assignees
Labels
❓ not sure if bug This issue has not been confirmed as a bug yet

Comments

@UserGoodtm
Copy link

Please confirm you have done the following before posting your bug report:

Describe the bug
Problems arise if the user and the location have the same ID number

To Reproduce
If the user ID and the location ID are the same and if assets are assigned to this location, then when the user is deleted, all assets assigned to the location are released from assignment (returned to the warehouse). For example, a location with id 23 has multiple assets assigned to it. I delete a user with id 23, when deleting a user, I select the asset status-ready for deployment. Even if the user did not have any assigned assets, all the assets assigned to the location with id 23 will be released and they will be assigned the status "ready for deployment".

Probably, this bug can affect everything that has the same id numbers.

I discovered this error a long time ago, wrote here on git, but there was no time to seek the truth from the developers. Someone from the community helped, and said that the error was due to the matching id numbers. I ask the developers to pay attention to this gross error and fix it in new releases of the program.

Screenshots
1
2
3

@UserGoodtm UserGoodtm changed the title ⚠️ If the user ID and the location ID are the same, then big problems may arise in the future If the user ID and the location ID are the same, then big problems may arise in the future Feb 26, 2021
@snipe
Copy link
Owner

snipe commented Feb 26, 2021

@inietov can you take a look at this one?

@snipe snipe added the ❓ not sure if bug This issue has not been confirmed as a bug yet label Feb 26, 2021
@douglasac10
Copy link

I just saw this and was reminded of the issue I had earlier in the year (see here) - just had a look at the logs, and the User and the Location were both ID 26, so same issue - items from both were checked in, even though only the user should have had their items checked in.

@inietov
Copy link
Collaborator

inietov commented Mar 1, 2021

I was checking this and I think is highly unlikely that affects other parts. The issue was caused because when we make the bulk update of the assets belonging to the user, we get their user id and just check in every asset that has that id, but don't check the assigned_type column, to assure that only that user's assets get actually checked in.

@inietov inietov closed this as completed Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❓ not sure if bug This issue has not been confirmed as a bug yet
Projects
None yet
Development

No branches or pull requests

4 participants