salesagility / SuiteCRM

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
4.48k stars 2.09k forks source link

Add link to User record with found error when chief looped. #8953

Open mubat opened 3 years ago

mubat commented 3 years ago

Issue

I met a situation when on chief of some user is a chief of himself. And I got an error from https://github.com/salesagility/SuiteCRM/blob/master/modules/Users/User.php#L1459. But chief of saved User was fine. And I spent half hour to realize, that problem in another User

Expected Behavior

Get error message with information about problem and link to user with this problem. Save current user anyway if error not in current user.

Actual Behavior

Get general error message with information about problem. Can't understand what problem with current user (when actual error in other record)

Possible Fix

Add a link to User with looped chief to error message.

Steps to Reproduce

  1. Get user1 with chief user1
  2. Create user2 with chief as user1

Context

Your Environment

pgorod commented 3 years ago

What is a "chief"?

Is it the "Reports to" field?

mubat commented 3 years ago

@pgorod yes.