IDEMPIERE-294 BroadCast Message / Several fixes:
- Clients <> System cannot expire their messages - Reorganize window and set displaylogic for buttons - Fix names of buttons - Display just messages of client logged in - Display non-expired messages without expiration date
This commit is contained in:
parent
aaf75d8da4
commit
5e5951fe31
|
@ -0,0 +1,104 @@
|
|||
-- Apr 17, 2013 11:37:25 AM COT
|
||||
-- IDEMPIERE-294 BroadCast Message
|
||||
UPDATE AD_Process SET AccessLevel='6',Updated=TO_DATE('2013-04-17 11:37:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=200018
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:38:05 AM COT
|
||||
UPDATE AD_Process SET Description='Expire Broadcast Message', Name='Expire Broadcast Message', Value='AD_ExpireBroadcastMessage',Updated=TO_DATE('2013-04-17 11:38:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=200018
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:41:26 AM COT
|
||||
UPDATE AD_Process SET Name='Test Broadcast Message', Value='AD_TestBroadcastMessage',Updated=TO_DATE('2013-04-17 11:41:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=200020
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:41:45 AM COT
|
||||
UPDATE AD_Process SET Value='AD_PublishBroadcastMessage',Updated=TO_DATE('2013-04-17 11:41:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=200019
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:50:44 AM COT
|
||||
UPDATE AD_Column SET IsToolbarButton='N',Updated=TO_DATE('2013-04-17 11:50:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200994
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:58:33 AM COT
|
||||
UPDATE AD_Field SET SeqNo=40, ColumnSpan=1,Updated=TO_DATE('2013-04-17 11:58:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200876
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:58:33 AM COT
|
||||
UPDATE AD_Field SET SeqNo=50, IsDisplayed='Y', XPosition=4,Updated=TO_DATE('2013-04-17 11:58:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200872
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:58:33 AM COT
|
||||
UPDATE AD_Field SET SeqNo=60, ColumnSpan=1,Updated=TO_DATE('2013-04-17 11:58:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200888
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:58:33 AM COT
|
||||
UPDATE AD_Field SET SeqNo=70, IsDisplayed='Y', XPosition=3,Updated=TO_DATE('2013-04-17 11:58:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200882
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:58:33 AM COT
|
||||
UPDATE AD_Field SET SeqNo=80, IsDisplayed='Y', XPosition=3,Updated=TO_DATE('2013-04-17 11:58:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200887
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:58:33 AM COT
|
||||
UPDATE AD_Field SET SeqNo=90, IsDisplayed='Y', XPosition=3,Updated=TO_DATE('2013-04-17 11:58:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200890
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:58:33 AM COT
|
||||
UPDATE AD_Field SET SeqNo=100, ColumnSpan=1,Updated=TO_DATE('2013-04-17 11:58:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200873
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:58:33 AM COT
|
||||
UPDATE AD_Field SET SeqNo=110, IsDisplayed='Y', XPosition=3, ColumnSpan=2,Updated=TO_DATE('2013-04-17 11:58:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200879
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:58:33 AM COT
|
||||
UPDATE AD_Field SET SeqNo=120, IsDisplayed='Y', XPosition=6, ColumnSpan=1,Updated=TO_DATE('2013-04-17 11:58:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200881
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:58:33 AM COT
|
||||
UPDATE AD_Field SET SeqNo=130, IsDisplayed='Y', XPosition=2, ColumnSpan=2,Updated=TO_DATE('2013-04-17 11:58:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200889
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:58:33 AM COT
|
||||
UPDATE AD_Field SET SeqNo=140, IsDisplayed='Y', XPosition=5,Updated=TO_DATE('2013-04-17 11:58:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200885
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:58:33 AM COT
|
||||
UPDATE AD_Field SET SeqNo=150, IsDisplayed='Y', XPosition=2,Updated=TO_DATE('2013-04-17 11:58:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200878
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:58:33 AM COT
|
||||
UPDATE AD_Field SET SeqNo=160,Updated=TO_DATE('2013-04-17 11:58:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200880
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:58:33 AM COT
|
||||
UPDATE AD_Field SET SeqNo=170,Updated=TO_DATE('2013-04-17 11:58:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200886
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 12:00:12 PM COT
|
||||
UPDATE AD_Field SET EntityType='D', Name='Test Broadcast Message',Updated=TO_DATE('2013-04-17 12:00:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200889
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 12:01:05 PM COT
|
||||
UPDATE AD_Field SET DisplayLogic='@IsPublished@=N', EntityType='D', Description='Publish Broadcast Message', Name='Publish Broadcast Message',Updated=TO_DATE('2013-04-17 12:01:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200885
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 12:01:13 PM COT
|
||||
UPDATE AD_Field SET DisplayLogic='@IsPublished@=N',Updated=TO_DATE('2013-04-17 12:01:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200889
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 12:01:54 PM COT
|
||||
UPDATE AD_Field SET DisplayLogic='@IsPublished@=Y & @Expired@=N',Updated=TO_DATE('2013-04-17 12:01:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200878
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 12:02:05 PM COT
|
||||
UPDATE AD_Field SET EntityType='D',Updated=TO_DATE('2013-04-17 12:02:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200878
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 12:02:39 PM COT
|
||||
UPDATE AD_Tab SET IsSingleRow='Y',Updated=TO_DATE('2013-04-17 12:02:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=200033
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201304171142_IDEMPIERE-294.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
-- Apr 17, 2013 11:37:25 AM COT
|
||||
-- IDEMPIERE-294 BroadCast Message
|
||||
UPDATE AD_Process SET AccessLevel='6',Updated=TO_TIMESTAMP('2013-04-17 11:37:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=200018
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:38:05 AM COT
|
||||
UPDATE AD_Process SET Description='Expire Broadcast Message', Name='Expire Broadcast Message', Value='AD_ExpireBroadcastMessage',Updated=TO_TIMESTAMP('2013-04-17 11:38:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=200018
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:41:26 AM COT
|
||||
UPDATE AD_Process SET Name='Test Broadcast Message', Value='AD_TestBroadcastMessage',Updated=TO_TIMESTAMP('2013-04-17 11:41:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=200020
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:41:45 AM COT
|
||||
UPDATE AD_Process SET Value='AD_PublishBroadcastMessage',Updated=TO_TIMESTAMP('2013-04-17 11:41:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=200019
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:50:44 AM COT
|
||||
UPDATE AD_Column SET IsToolbarButton='N',Updated=TO_TIMESTAMP('2013-04-17 11:50:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200994
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:58:33 AM COT
|
||||
UPDATE AD_Field SET SeqNo=40, ColumnSpan=1,Updated=TO_TIMESTAMP('2013-04-17 11:58:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200876
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:58:33 AM COT
|
||||
UPDATE AD_Field SET SeqNo=50, IsDisplayed='Y', XPosition=4,Updated=TO_TIMESTAMP('2013-04-17 11:58:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200872
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:58:33 AM COT
|
||||
UPDATE AD_Field SET SeqNo=60, ColumnSpan=1,Updated=TO_TIMESTAMP('2013-04-17 11:58:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200888
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:58:33 AM COT
|
||||
UPDATE AD_Field SET SeqNo=70, IsDisplayed='Y', XPosition=3,Updated=TO_TIMESTAMP('2013-04-17 11:58:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200882
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:58:33 AM COT
|
||||
UPDATE AD_Field SET SeqNo=80, IsDisplayed='Y', XPosition=3,Updated=TO_TIMESTAMP('2013-04-17 11:58:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200887
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:58:33 AM COT
|
||||
UPDATE AD_Field SET SeqNo=90, IsDisplayed='Y', XPosition=3,Updated=TO_TIMESTAMP('2013-04-17 11:58:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200890
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:58:33 AM COT
|
||||
UPDATE AD_Field SET SeqNo=100, ColumnSpan=1,Updated=TO_TIMESTAMP('2013-04-17 11:58:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200873
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:58:33 AM COT
|
||||
UPDATE AD_Field SET SeqNo=110, IsDisplayed='Y', XPosition=3, ColumnSpan=2,Updated=TO_TIMESTAMP('2013-04-17 11:58:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200879
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:58:33 AM COT
|
||||
UPDATE AD_Field SET SeqNo=120, IsDisplayed='Y', XPosition=6, ColumnSpan=1,Updated=TO_TIMESTAMP('2013-04-17 11:58:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200881
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:58:33 AM COT
|
||||
UPDATE AD_Field SET SeqNo=130, IsDisplayed='Y', XPosition=2, ColumnSpan=2,Updated=TO_TIMESTAMP('2013-04-17 11:58:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200889
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:58:33 AM COT
|
||||
UPDATE AD_Field SET SeqNo=140, IsDisplayed='Y', XPosition=5,Updated=TO_TIMESTAMP('2013-04-17 11:58:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200885
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:58:33 AM COT
|
||||
UPDATE AD_Field SET SeqNo=150, IsDisplayed='Y', XPosition=2,Updated=TO_TIMESTAMP('2013-04-17 11:58:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200878
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:58:33 AM COT
|
||||
UPDATE AD_Field SET SeqNo=160,Updated=TO_TIMESTAMP('2013-04-17 11:58:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200880
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 11:58:33 AM COT
|
||||
UPDATE AD_Field SET SeqNo=170,Updated=TO_TIMESTAMP('2013-04-17 11:58:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200886
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 12:00:12 PM COT
|
||||
UPDATE AD_Field SET EntityType='D', Name='Test Broadcast Message',Updated=TO_TIMESTAMP('2013-04-17 12:00:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200889
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 12:01:05 PM COT
|
||||
UPDATE AD_Field SET DisplayLogic='@IsPublished@=N', EntityType='D', Description='Publish Broadcast Message', Name='Publish Broadcast Message',Updated=TO_TIMESTAMP('2013-04-17 12:01:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200885
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 12:01:13 PM COT
|
||||
UPDATE AD_Field SET DisplayLogic='@IsPublished@=N',Updated=TO_TIMESTAMP('2013-04-17 12:01:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200889
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 12:01:54 PM COT
|
||||
UPDATE AD_Field SET DisplayLogic='@IsPublished@=Y & @Expired@=N',Updated=TO_TIMESTAMP('2013-04-17 12:01:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200878
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 12:02:05 PM COT
|
||||
UPDATE AD_Field SET EntityType='D',Updated=TO_TIMESTAMP('2013-04-17 12:02:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200878
|
||||
;
|
||||
|
||||
-- Apr 17, 2013 12:02:39 PM COT
|
||||
UPDATE AD_Tab SET IsSingleRow='Y',Updated=TO_TIMESTAMP('2013-04-17 12:02:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=200033
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201304171142_IDEMPIERE-294.sql') FROM dual
|
||||
;
|
||||
|
|
@ -150,9 +150,10 @@ public class BroadcastMsgUtil
|
|||
String sql = "SELECT bm.AD_BroadcastMessage_ID "
|
||||
+ " FROM AD_Note n INNER JOIN AD_BroadcastMessage bm ON (bm.AD_BroadcastMessage_ID=n.AD_BroadcastMessage_ID) "
|
||||
+ " WHERE n.AD_User_ID=?"
|
||||
+ " AND n.AD_Client_ID=?"
|
||||
+ " AND (bm.BroadcastType='IL' OR bm.BroadcastType='L') "
|
||||
+ " AND bm.isPublished='Y' AND n.processed = 'N'"
|
||||
+ " AND ((bm.BroadcastFrequency='U' AND bm.Expired='N' AND bm.expiration > SYSDATE) OR bm.BroadcastFrequency='J')";
|
||||
+ " AND ((bm.BroadcastFrequency='U' AND bm.Expired='N' AND (bm.expiration IS NULL OR bm.expiration > SYSDATE)) OR bm.BroadcastFrequency='J')";
|
||||
|
||||
ArrayList<MBroadcastMessage> mbMessages = new ArrayList<MBroadcastMessage>();
|
||||
PreparedStatement pstmt = null;
|
||||
|
@ -160,6 +161,7 @@ public class BroadcastMsgUtil
|
|||
try {
|
||||
pstmt = DB.prepareStatement(sql, null);
|
||||
pstmt.setInt(1, AD_User_ID);
|
||||
pstmt.setInt(2, Env.getAD_Client_ID(Env.getCtx()));
|
||||
rs = pstmt.executeQuery();
|
||||
while (rs.next()) {
|
||||
mbMessages.add(MBroadcastMessage.get(Env.getCtx(), rs.getInt(1)));
|
||||
|
|
Loading…
Reference in New Issue