Role with view = owner doesn't show any records anymore

There seems to be a problem with Roles where listview is set to ‘Owner’.
Example: we have a role where Leads listview is set to Owner. When such a role is applied to a User and this user creates a Lead, or a Lead is assigned to this user, the User can’t see this Lead. Moreover: the user can’t see any Leads at all, even though multiple are assigned to this User.

When removing this role for the user, or when removing the listview=owner setting, the role seems to be working fine. For example, when I keep editing on owner-only, I can only edit those that are assigned to the user.

When setting the log to debug, I can see the following relevant Queries happening when opening Leads Listview:


Wed Mar 29 09:54:35 2017 [10088][17dcda44-64d2-827e-9eef-58db5f3dcbb9][DEBUG] Retrieve Lead : SELECT leads.*,leads_cstm.* FROM leads  LEFT JOIN leads_cstm ON leads.id = leads_cstm.id_c  WHERE leads.id = '[SELECT_ID_LIST]' AND leads.deleted=0
Wed Mar 29 09:54:35 2017 [10088][17dcda44-64d2-827e-9eef-58db5f3dcbb9][DEBUG] Limit Query:SELECT leads.*,leads_cstm.* FROM leads  LEFT JOIN leads_cstm ON leads.id = leads_cstm.id_c  WHERE leads.id = '[SELECT_ID_LIST]' AND leads.deleted=0 Start: 0 count: 1
Wed Mar 29 09:54:35 2017 [10088][17dcda44-64d2-827e-9eef-58db5f3dcbb9][INFO] Query:SELECT leads.*,leads_cstm.* FROM leads  LEFT JOIN leads_cstm ON leads.id = leads_cstm.id_c  WHERE leads.id = '[SELECT_ID_LIST]' AND leads.deleted=0 LIMIT 0,1

What strikes me, is the “WHERE leads.id = ‘[SELECT_ID_LIST]’”. That looks to me like some variable isn’t filled in properly.

hi did you manage to solve this or is this a bug?

This is (was) a bug.
See this issue: https://github.com/salesagility/SuiteCRM/issues/3354

Resolved in 7.8.2 or with a very small code change.