IDEMPIERE-1138 Broadcast Message Problems
This commit is contained in:
parent
232649b55e
commit
333c7f9a7f
|
@ -0,0 +1,17 @@
|
|||
-- Aug 6, 2013 1:35:12 PM COT
|
||||
-- IDEMPIERE-1138 Broadcast Message Problems
|
||||
UPDATE AD_Column SET AD_Val_Rule_ID=158, IsToolbarButton='N',Updated=TO_DATE('2013-08-06 13:35:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200990
|
||||
;
|
||||
|
||||
-- Aug 6, 2013 1:36:09 PM COT
|
||||
-- IDEMPIERE-1138 Broadcast Message Problems
|
||||
INSERT INTO AD_Val_Rule (Code,AD_Val_Rule_ID,EntityType,Name,Type,AD_Val_Rule_UU,CreatedBy,UpdatedBy,Updated,Created,IsActive,AD_Org_ID,AD_Client_ID) VALUES ('AD_User.AD_User_ID IN (SELECT AD_User_ID FROM AD_User_Roles WHERE IsActive=''Y'' AND AD_User_Roles.AD_Client_ID=@#AD_Client_ID@)',200052,'D','AD_User of Client','S','db84ffe3-27c1-4a81-85f5-dcb3effecadd',100,100,TO_DATE('2013-08-06 13:36:08','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2013-08-06 13:36:08','YYYY-MM-DD HH24:MI:SS'),'Y',0,0)
|
||||
;
|
||||
|
||||
-- Aug 6, 2013 1:36:29 PM COT
|
||||
-- IDEMPIERE-1138 Broadcast Message Problems
|
||||
UPDATE AD_Column SET AD_Val_Rule_ID=200052, IsToolbarButton='N',Updated=TO_DATE('2013-08-06 13:36:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200991
|
||||
;
|
||||
|
||||
SELECT register_migration_script('20130608133825_IDEMPIERE-1138.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,17 @@
|
|||
-- Aug 6, 2013 1:35:12 PM COT
|
||||
-- IDEMPIERE-1138 Broadcast Message Problems
|
||||
UPDATE AD_Column SET AD_Val_Rule_ID=158, IsToolbarButton='N',Updated=TO_TIMESTAMP('2013-08-06 13:35:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200990
|
||||
;
|
||||
|
||||
-- Aug 6, 2013 1:36:09 PM COT
|
||||
-- IDEMPIERE-1138 Broadcast Message Problems
|
||||
INSERT INTO AD_Val_Rule (Code,AD_Val_Rule_ID,EntityType,Name,Type,AD_Val_Rule_UU,CreatedBy,UpdatedBy,Updated,Created,IsActive,AD_Org_ID,AD_Client_ID) VALUES ('AD_User.AD_User_ID IN (SELECT AD_User_ID FROM AD_User_Roles WHERE IsActive=''Y'' AND AD_User_Roles.AD_Client_ID=@#AD_Client_ID@)',200052,'D','AD_User of Client','S','db84ffe3-27c1-4a81-85f5-dcb3effecadd',100,100,TO_TIMESTAMP('2013-08-06 13:36:08','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2013-08-06 13:36:08','YYYY-MM-DD HH24:MI:SS'),'Y',0,0)
|
||||
;
|
||||
|
||||
-- Aug 6, 2013 1:36:29 PM COT
|
||||
-- IDEMPIERE-1138 Broadcast Message Problems
|
||||
UPDATE AD_Column SET AD_Val_Rule_ID=200052, IsToolbarButton='N',Updated=TO_TIMESTAMP('2013-08-06 13:36:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200991
|
||||
;
|
||||
|
||||
SELECT register_migration_script('20130608133825_IDEMPIERE-1138.sql') FROM dual
|
||||
;
|
|
@ -74,8 +74,12 @@ public class BroadcastMsgUtil
|
|||
int[] userIDs = DB.getIDsEx(null, sql);
|
||||
|
||||
for (int userID : userIDs) {
|
||||
MUser user = MUser.get(Env.getCtx(), userID);
|
||||
if (! user.isActive())
|
||||
continue;
|
||||
MNote note = new MNote(Env.getCtx(), 0, trxName);
|
||||
note.setClientOrg(MUser.get(Env.getCtx(), userID).getAD_Client_ID(), 0);
|
||||
if (MBroadcastMessage.TARGET_Everybody.equals(mbMessage.getTarget()))
|
||||
note.setClientOrg(user.getAD_Client_ID(), 0);
|
||||
note.setAD_BroadcastMessage_ID(messageID);
|
||||
note.setAD_User_ID(userID);
|
||||
note.setAD_Message_ID(0);
|
||||
|
|
|
@ -182,7 +182,8 @@ public class BroadcastMessageWindow extends Window implements IBroadcastMsgPopup
|
|||
for(int i=0; i<mbMessages.size(); i++){
|
||||
if(!mbMessages.get(i).getBroadcastType().equals(MBroadcastMessage.BROADCASTTYPE_Immediate)){
|
||||
MNote note = getMNote(mbMessages.get(i));
|
||||
hashMessages.put(mbMessages.get(i).get_ID(), note.isProcessed());
|
||||
if (note!=null)
|
||||
hashMessages.put(mbMessages.get(i).get_ID(), note.isProcessed());
|
||||
}else{
|
||||
hashMessages.put(mbMessages.get(i).get_ID(), false);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue