From 931881e153633db35896602368a7c5d4076e42b4 Mon Sep 17 00:00:00 2001 From: teo_sarca Date: Wed, 6 Feb 2008 20:12:05 +0000 Subject: [PATCH] BF [ 1760482 ] New Dashboard broke old functionality --- base/src/org/compiere/model/MGoal.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/base/src/org/compiere/model/MGoal.java b/base/src/org/compiere/model/MGoal.java index 459c2abf8a..5d7857424f 100644 --- a/base/src/org/compiere/model/MGoal.java +++ b/base/src/org/compiere/model/MGoal.java @@ -32,6 +32,7 @@ import org.compiere.util.*; * * @author Teo Sarca, SC ARHIPAC SERVICE SRL *
  • BF [ 1887674 ] Deadlock when try to modify PA Goal's Measure Target + *
  • BF [ 1760482 ] New Dashboard broke old functionality */ public class MGoal extends X_PA_Goal { @@ -52,7 +53,7 @@ public class MGoal extends X_PA_Goal + " 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 g.AD_User_ID=ur.AD_User_ID AND g.AD_Role_ID=ur.AD_Role_ID AND ur.IsActive='Y')) " + + "WHERE ur.AD_User_ID=? AND g.AD_Role_ID=ur.AD_Role_ID AND ur.IsActive='Y')) " + "ORDER BY SeqNo"; PreparedStatement pstmt = null; ResultSet rs = null; @@ -61,6 +62,7 @@ public class MGoal extends X_PA_Goal pstmt = DB.prepareStatement (sql, null); pstmt.setInt (1, Env.getAD_Client_ID(ctx)); pstmt.setInt (2, AD_User_ID); + pstmt.setInt (3, AD_User_ID); rs = pstmt.executeQuery (); while (rs.next ()) {