Deleted Users still listed in User Relate Field in filter

In filter, there’s a filter field - assigned to . I found that the users I have deleted were still listed in the field options, which is misleading.

I have created an issue in github (https://github.com/salesagility/SuiteCRM/issues/5380), but there’s no response.
Could anybody give me some help?

Have you looked in the database to see what’s happening? Is the user getting a “deleted=1”? Or is he “deactivated” in a different way?

Is the list of users in a filter really coming from “select from users” or is it a list of users found in the “assigned to” column of the original record?

Yes, I have checked my database that the users are getting a “deleted=1”.
It seems the problem only happens in the field “assigned to” in the filter. In a filter, “assigned to” options are list in a multi-select field that contains the deleted users. However, the list in “select from users” doesn’t contain deleted users.

On which module are you trying to set the filter? I know this is probably a problem on all modules, but I want the two of us to be trying things in the same place, to prevent confusions.

So in that module (let’s say it’s Contacts) check the database to see if you have records with “assigned_user_id” with the id of the deleted user. You probably do.

Try changing ALL of them to a different id, and see if the deleted user still comes up in the filter.

Yes, the problem is on all modules. Let’s take Contacts for test.
Here are my step and screenshot according to what you mentioned.
step 1. Find out one of the deleted user in Contacts filter.

step 2. Let’s have a check in DB to confirm it’s a deleted user.

Here we can find “deleted = 1” and the user id=‘a73b5c14-c552-5ea9-9983-5923f9c72201’ .
step 3. Check DB is there any contacts assigned to the deleted user .

Here we can see there’s no contact assigned to the user.

I don’t know why my screenshot couldn’t show.
Here are img links:
Step 1: https://pasteboard.co/HbDkWpe.png
step 2: https://pasteboard.co/HbDnhsm.png
setp 3: https://pasteboard.co/HbDpWP4.png

And where exactly do you see that user name still showing?

Is it Contact’s List View, Filter, Advanced Filter, “Assigned to” list box?

Yes, exactly ! It’s Contact’s List View, Filter, Advanced Filter, “Assigned to” list box.

I was starting to investigate this, but I couldn’t find a way to delete a user! :ohmy:

How did you delete it? Did you just set him as not “active”?

You can kindly find in User DetailView - Actions - Delete.
No need to set him as not “active”. I belive that if just set him as not “active” instead of deletion, there would not be “delete = 1" in DB.

Ok, I could swear the button wasn’t there yesterday, but now after an upgrade to 7.10.2, it is. So I went ahead and deleted the user, but then the username does NOT appear in the filter… so I can’t reproduce the situation you’re getting :frowning: