Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#2718 Performance goal

open
nobody
5
2012-03-28
2012-03-28
Alan Rodrigo
No

Window: Performance goal

The field User doesn`t work. The goal is displayed to the role.
I've changed model/MGoal.java and it is now working.

Old:
String sql = "SELECT * FROM PA_Goal g "
+ "WHERE IsActive='Y'"
+ " AND AD_Client_ID=?" // #1
+ " AND ((AD_User_ID IS NULL AND AD_Role_ID IS NULL)"
+ " OR AD_User_ID=?" // #2
+ " OR EXISTS (SELECT * FROM AD_User_Roles ur "
+ "WHERE ur.AD_User_ID=? AND g.AD_Role_ID=ur.AD_Role_ID AND ur.IsActive='Y')) "
+ "ORDER BY SeqNo";

New:
String sql = "SELECT * FROM PA_Goal g "
+ "WHERE IsActive='Y'"
+ " AND AD_Client_ID=?" // #1
+ " AND ((AD_User_ID IS NULL AND AD_Role_ID IS NULL)"
+ " OR (AD_User_ID=? AND AD_Role_ID IS NULL)" // #2
+ " OR (AD_User_ID IS NULL AND EXISTS (SELECT * FROM AD_User_Roles ur "
+ "WHERE ur.AD_User_ID=? AND g.AD_Role_ID=ur.AD_Role_ID AND ur.IsActive='Y')) "
+ " OR (AD_User_ID=? AND EXISTS (SELECT * FROM AD_User_Roles ur "
+ "WHERE ur.AD_User_ID=? AND g.AD_Role_ID=ur.AD_Role_ID AND ur.IsActive='Y'))) "
+ "ORDER BY SeqNo";

Discussion