IDEMPIERE-5567 Support of UUID as Key (FHCA-4195) - Record Info Improvements (#2455)
- allow generating permalink also for multi-key tables using UUID - use TableName instead of AD_Table_ID for permalink - add zoom condition to role for access tables on non-system tenants - on copy select, prefer to generate using ID than UUID when possible - is easier when copying a select that is needed to search also for children
This commit is contained in:
parent
30057f7a12
commit
bf3fb64d3b
|
|
@ -0,0 +1,22 @@
|
||||||
|
-- IDEMPIERE-5567 Permalink for UUID multi-key tables
|
||||||
|
SELECT register_migration_script('202409141654_IDEMPIERE-5567.sql') FROM dual;
|
||||||
|
|
||||||
|
SET SQLBLANKLINES ON
|
||||||
|
SET DEFINE OFF
|
||||||
|
|
||||||
|
-- Sep 14, 2024, 4:54:43 PM CEST
|
||||||
|
INSERT INTO AD_ZoomCondition (AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,AD_ZoomCondition_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,SeqNo,Name,AD_ZoomCondition_UU,ZoomLogic,EntityType) VALUES (0,0,201,111,200009,TO_TIMESTAMP('2024-09-14 16:54:42','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2024-09-14 16:54:42','YYYY-MM-DD HH24:MI:SS'),100,10,'Zoom to role on tenants','f8ddf8c5-4bf6-4343-a2f3-c88c1f007344','@#AD_Client_ID@>0','D')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 14, 2024, 4:56:45 PM CEST
|
||||||
|
INSERT INTO AD_ZoomCondition (AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,AD_ZoomCondition_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,SeqNo,Name,AD_ZoomCondition_UU,ZoomLogic,EntityType) VALUES (0,0,378,111,200010,TO_TIMESTAMP('2024-09-14 16:56:45','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2024-09-14 16:56:45','YYYY-MM-DD HH24:MI:SS'),100,10,'Zoom to role on tenants','32bab358-373f-476a-a52c-5c700044478d','@#AD_Client_ID@>0','D')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 14, 2024, 4:57:50 PM CEST
|
||||||
|
INSERT INTO AD_ZoomCondition (AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,AD_ZoomCondition_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,SeqNo,Name,AD_ZoomCondition_UU,ZoomLogic,EntityType) VALUES (0,0,197,111,200011,TO_TIMESTAMP('2024-09-14 16:57:50','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2024-09-14 16:57:50','YYYY-MM-DD HH24:MI:SS'),100,10,'Zoom to role on tenants','ebea9694-6348-444e-8b7f-f5f1c75a3c65','@#AD_Client_ID@>0','D')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 14, 2024, 4:58:46 PM CEST
|
||||||
|
INSERT INTO AD_ZoomCondition (AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,AD_ZoomCondition_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,SeqNo,Name,AD_ZoomCondition_UU,ZoomLogic,EntityType) VALUES (0,0,199,111,200012,TO_TIMESTAMP('2024-09-14 16:58:46','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2024-09-14 16:58:46','YYYY-MM-DD HH24:MI:SS'),100,10,'Zoom to role on tenants','91ce33c0-fb91-4c9e-894e-8e8f49d7677f','@#AD_Client_ID@>0','D')
|
||||||
|
;
|
||||||
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
-- IDEMPIERE-5567 Permalink for UUID multi-key tables
|
||||||
|
SELECT register_migration_script('202409141654_IDEMPIERE-5567.sql') FROM dual;
|
||||||
|
|
||||||
|
-- Sep 14, 2024, 4:54:43 PM CEST
|
||||||
|
INSERT INTO AD_ZoomCondition (AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,AD_ZoomCondition_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,SeqNo,Name,AD_ZoomCondition_UU,ZoomLogic,EntityType) VALUES (0,0,201,111,200009,TO_TIMESTAMP('2024-09-14 16:54:42','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2024-09-14 16:54:42','YYYY-MM-DD HH24:MI:SS'),100,10,'Zoom to role on tenants','f8ddf8c5-4bf6-4343-a2f3-c88c1f007344','@#AD_Client_ID@>0','D')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 14, 2024, 4:56:45 PM CEST
|
||||||
|
INSERT INTO AD_ZoomCondition (AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,AD_ZoomCondition_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,SeqNo,Name,AD_ZoomCondition_UU,ZoomLogic,EntityType) VALUES (0,0,378,111,200010,TO_TIMESTAMP('2024-09-14 16:56:45','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2024-09-14 16:56:45','YYYY-MM-DD HH24:MI:SS'),100,10,'Zoom to role on tenants','32bab358-373f-476a-a52c-5c700044478d','@#AD_Client_ID@>0','D')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 14, 2024, 4:57:50 PM CEST
|
||||||
|
INSERT INTO AD_ZoomCondition (AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,AD_ZoomCondition_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,SeqNo,Name,AD_ZoomCondition_UU,ZoomLogic,EntityType) VALUES (0,0,197,111,200011,TO_TIMESTAMP('2024-09-14 16:57:50','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2024-09-14 16:57:50','YYYY-MM-DD HH24:MI:SS'),100,10,'Zoom to role on tenants','ebea9694-6348-444e-8b7f-f5f1c75a3c65','@#AD_Client_ID@>0','D')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 14, 2024, 4:58:46 PM CEST
|
||||||
|
INSERT INTO AD_ZoomCondition (AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,AD_ZoomCondition_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,SeqNo,Name,AD_ZoomCondition_UU,ZoomLogic,EntityType) VALUES (0,0,199,111,200012,TO_TIMESTAMP('2024-09-14 16:58:46','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2024-09-14 16:58:46','YYYY-MM-DD HH24:MI:SS'),100,10,'Zoom to role on tenants','91ce33c0-fb91-4c9e-894e-8e8f49d7677f','@#AD_Client_ID@>0','D')
|
||||||
|
;
|
||||||
|
|
||||||
|
|
@ -938,7 +938,7 @@ public final class AEnv
|
||||||
*/
|
*/
|
||||||
public static String getZoomUrlTableUU(PO po)
|
public static String getZoomUrlTableUU(PO po)
|
||||||
{
|
{
|
||||||
return getApplicationUrl() + "?Action=Zoom&AD_Table_ID=" + po.get_Table_ID() + "&Record_UU=" + po.get_UUID();
|
return getApplicationUrl() + "?Action=Zoom&TableName=" + po.get_TableName() + "&Record_UU=" + po.get_UUID();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -947,7 +947,7 @@ public final class AEnv
|
||||||
*/
|
*/
|
||||||
public static String getZoomUrlTableID(PO po)
|
public static String getZoomUrlTableID(PO po)
|
||||||
{
|
{
|
||||||
return getApplicationUrl() + "?Action=Zoom&AD_Table_ID=" + po.get_Table_ID() + "&Record_ID=" + po.get_ID();
|
return getApplicationUrl() + "?Action=Zoom&TableName=" + po.get_TableName() + "&Record_ID=" + po.get_ID();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -339,7 +339,6 @@ public class WRecordInfo extends Window implements EventListener<Event>
|
||||||
if (! m_info.toString().contains(uuinfo))
|
if (! m_info.toString().contains(uuinfo))
|
||||||
m_info.append("\n ").append(uuinfo);
|
m_info.append("\n ").append(uuinfo);
|
||||||
}
|
}
|
||||||
if (po.get_KeyColumns().length == 1) {
|
|
||||||
String ticketURL;
|
String ticketURL;
|
||||||
if (Record_ID <= 0)
|
if (Record_ID <= 0)
|
||||||
ticketURL = AEnv.getZoomUrlTableUU(po);
|
ticketURL = AEnv.getZoomUrlTableUU(po);
|
||||||
|
|
@ -354,9 +353,7 @@ public class WRecordInfo extends Window implements EventListener<Event>
|
||||||
Notification.show(Msg.getMsg(Env.getCtx(), "Copied"), Notification.TYPE_INFO, m_permalink, "end_before", 1000);
|
Notification.show(Msg.getMsg(Env.getCtx(), "Copied"), Notification.TYPE_INFO, m_permalink, "end_before", 1000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
final String whereClause = po.get_WhereClause(true);
|
||||||
m_permalink.setVisible(po.get_KeyColumns().length == 1);
|
|
||||||
final String whereClause = po.get_WhereClause(true, Record_UU);
|
|
||||||
m_copySelect.addEventListener(Events.ON_CLICK, new EventListener<Event>() {
|
m_copySelect.addEventListener(Events.ON_CLICK, new EventListener<Event>() {
|
||||||
public void onEvent(Event event) throws Exception {
|
public void onEvent(Event event) throws Exception {
|
||||||
StringBuffer query = new StringBuffer("navigator.clipboard.writeText(\"SELECT * FROM ")
|
StringBuffer query = new StringBuffer("navigator.clipboard.writeText(\"SELECT * FROM ")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue