-
-
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
Fixed Asset acceptance error when user company and asset company don't match #13400
Fixed Asset acceptance error when user company and asset company don't match #13400
Conversation
…enabled and companies not match
…d companies not match
PR Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this idea 👍🏾
Two things that stand out regarding "I tried to mitigate the issue by not showing any asset to accept/deny if this case already happened":
The landing page still shows they have an item to accept or decline:
And, a smaller issue, is although the item isn't displayed on the accept assets screen, the number still shows:
I'm not sure those are easy fixes but it would be nice to not show it if they cannot accept the item. Keeping in mind that this is only for the users that have had assets checked out to them before this PR goes in, it might be ok to skip the fixes if they are time consuming?
I'm gonna approve this code-wise but @snipe should decide on the UX.
…an\'t accept nor deny the asset
@marcusmoore thanks for your review! I just add a message so the number doesn't feel like an error, because it could happen that a user have 3 assets assigned and for this 3, for some reason, 2 are from another company so they can't accept/deny it, and the number wouldn't match. So now looks something like this: |
Kindly pinging @snipe, this looks ok to you? or need some more work? |
resources/lang/en/general.php
Outdated
@@ -452,6 +452,8 @@ | |||
'serial_number' => 'Serial Number', | |||
'item_notes' => ':item Notes', | |||
'item_name_var' => ':item Name', | |||
'error_user_company' => 'User and Asset companies missmatch', | |||
'error_user_company_accpept_view' => 'An Asset assigned to you belongs to a different company so you can\'t accept nor deny it, please check with your manager', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor typo in this string: accpept
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:S thanks
Description
With full company support activated if an asset is checked out from company A to an user from company B, then when the user from B tries to accept the asset, it appears the 'Error: insufficient permission' sign.
In this PR I tried to mitigate the issue by not showing any asset to accept/deny if this case already happened, so the users doesn't have to deal with that. And in the asset checkout method I check if full company support is enabled, and if it is now it doesn't allow the checkout to happen. Also it shows a more explicit error message "User and asset companies missmatch".
Fixes internal freshdesk 37131
Type of change
How Has This Been Tested?
Test Configuration: