MDashboardPreference.getForSessionQuery: add client filter and remove order by ad_client_id

Description

Minor refinement for MDashboardPreference.getForSessionQuery:

  • Add client id filter. Probably not a must but it is good to have to defend against bad data in DB.

  • Remove order by ad_client_id. Since it should retrieve for current client only, the order by ad_client_id clause is actually not doing anything.

Environment

None

Activity

Show:

Carlos Ruiz May 30, 2023 at 10:36 PM

OK - in such case the change makes sense

Heng Sin Low May 30, 2023 at 10:28 PM

hi , that shouldn’t be possible with current code, the filter includes ad_role_id which is by tenant only.

Carlos Ruiz May 30, 2023 at 10:21 PM

Hi - I have not tested, but wondering if the intention is to allow having preferences set in System? In such case instead of setClient_ID() we would need to use “AND AD_Client_ID IN (0,?)”

But I don’t know the development deeply, not sure if it makes sense to have preferences set in System as well as in Tenant, maybe can clarify if that’s allowed? how is that configured?

Fixed

Details

Assignee

Reporter

Components

Fix versions

Priority

Created May 30, 2023 at 8:32 AM
Updated August 1, 2023 at 5:26 PM
Resolved May 30, 2023 at 10:37 PM