diff --git a/migration/iD11/oracle/202409141654_IDEMPIERE-5567.sql b/migration/iD11/oracle/202409141654_IDEMPIERE-5567.sql new file mode 100644 index 0000000000..e0f93c97e0 --- /dev/null +++ b/migration/iD11/oracle/202409141654_IDEMPIERE-5567.sql @@ -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') +; + diff --git a/migration/iD11/postgresql/202409141654_IDEMPIERE-5567.sql b/migration/iD11/postgresql/202409141654_IDEMPIERE-5567.sql new file mode 100644 index 0000000000..0d2ae8e785 --- /dev/null +++ b/migration/iD11/postgresql/202409141654_IDEMPIERE-5567.sql @@ -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') +; + diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AEnv.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AEnv.java index f2373144ea..fe5ece4fba 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AEnv.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AEnv.java @@ -938,7 +938,7 @@ public final class AEnv */ 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) { - 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(); } /** diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WRecordInfo.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WRecordInfo.java index 2fbbadcb44..911e295632 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WRecordInfo.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WRecordInfo.java @@ -339,24 +339,21 @@ public class WRecordInfo extends Window implements EventListener if (! m_info.toString().contains(uuinfo)) m_info.append("\n ").append(uuinfo); } - if (po.get_KeyColumns().length == 1) { - String ticketURL; - if (Record_ID <= 0) - ticketURL = AEnv.getZoomUrlTableUU(po); - else - ticketURL = AEnv.getZoomUrlTableID(po); - m_permalink.addEventListener(Events.ON_CLICK, new EventListener() { - public void onEvent(Event event) throws Exception { - StringBuffer sb = new StringBuffer("navigator.clipboard.writeText(\"") + String ticketURL; + if (Record_ID <= 0) + ticketURL = AEnv.getZoomUrlTableUU(po); + else + ticketURL = AEnv.getZoomUrlTableID(po); + m_permalink.addEventListener(Events.ON_CLICK, new EventListener() { + public void onEvent(Event event) throws Exception { + StringBuffer sb = new StringBuffer("navigator.clipboard.writeText(\"") .append(ticketURL) .append("\");"); - Clients.evalJavaScript(sb.toString()); - Notification.show(Msg.getMsg(Env.getCtx(), "Copied"), Notification.TYPE_INFO, m_permalink, "end_before", 1000); - } - }); - } - m_permalink.setVisible(po.get_KeyColumns().length == 1); - final String whereClause = po.get_WhereClause(true, Record_UU); + Clients.evalJavaScript(sb.toString()); + Notification.show(Msg.getMsg(Env.getCtx(), "Copied"), Notification.TYPE_INFO, m_permalink, "end_before", 1000); + } + }); + final String whereClause = po.get_WhereClause(true); m_copySelect.addEventListener(Events.ON_CLICK, new EventListener() { public void onEvent(Event event) throws Exception { StringBuffer query = new StringBuffer("navigator.clipboard.writeText(\"SELECT * FROM ")