diff --git a/migration/iD11/oracle/202404041759_IDEMPIERE-6087.sql b/migration/iD11/oracle/202404041759_IDEMPIERE-6087.sql new file mode 100644 index 0000000000..d792027306 --- /dev/null +++ b/migration/iD11/oracle/202404041759_IDEMPIERE-6087.sql @@ -0,0 +1,34 @@ +-- IDEMPIERE-6087 Users cannot delete their own User Queries +SELECT register_migration_script('202404041759_IDEMPIERE-6087.sql') FROM dual; + +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- Apr 4, 2024, 5:59:29 PM CEST +UPDATE AD_Tab SET WhereClause='(''@#ShowAdvanced:N@''=''Y'' OR AD_User_ID=@#AD_User_ID@)', OrderByClause='AD_UserQuery.Name', ReadOnlyLogic=NULL,Updated=TO_TIMESTAMP('2024-04-04 17:59:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=200275 +; + +-- Apr 4, 2024, 6:00:09 PM CEST +UPDATE AD_Field SET ReadOnlyLogic='@#ShowAdvanced@=N',Updated=TO_TIMESTAMP('2024-04-04 18:00:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206303 +; + +-- Apr 4, 2024, 6:00:13 PM CEST +UPDATE AD_Field SET ReadOnlyLogic='@#ShowAdvanced@=N',Updated=TO_TIMESTAMP('2024-04-04 18:00:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206309 +; + +-- Apr 4, 2024, 6:00:17 PM CEST +UPDATE AD_Field SET ReadOnlyLogic='@#ShowAdvanced@=N',Updated=TO_TIMESTAMP('2024-04-04 18:00:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206308 +; + +-- Apr 4, 2024, 6:00:20 PM CEST +UPDATE AD_Field SET ReadOnlyLogic='@#ShowAdvanced@=N',Updated=TO_TIMESTAMP('2024-04-04 18:00:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206306 +; + +-- Apr 4, 2024, 6:00:26 PM CEST +UPDATE AD_Field SET ReadOnlyLogic='@#ShowAdvanced@=N',Updated=TO_TIMESTAMP('2024-04-04 18:00:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206304 +; + +-- Apr 4, 2024, 6:00:35 PM CEST +UPDATE AD_Field SET IsAdvancedField='Y',Updated=TO_TIMESTAMP('2024-04-04 18:00:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206305 +; + diff --git a/migration/iD11/postgresql/202404041759_IDEMPIERE-6087.sql b/migration/iD11/postgresql/202404041759_IDEMPIERE-6087.sql new file mode 100644 index 0000000000..037d324912 --- /dev/null +++ b/migration/iD11/postgresql/202404041759_IDEMPIERE-6087.sql @@ -0,0 +1,31 @@ +-- IDEMPIERE-6087 Users cannot delete their own User Queries +SELECT register_migration_script('202404041759_IDEMPIERE-6087.sql') FROM dual; + +-- Apr 4, 2024, 5:59:29 PM CEST +UPDATE AD_Tab SET WhereClause='(''@#ShowAdvanced:N@''=''Y'' OR AD_User_ID=@#AD_User_ID@)', OrderByClause='AD_UserQuery.Name', ReadOnlyLogic=NULL,Updated=TO_TIMESTAMP('2024-04-04 17:59:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=200275 +; + +-- Apr 4, 2024, 6:00:09 PM CEST +UPDATE AD_Field SET ReadOnlyLogic='@#ShowAdvanced@=N',Updated=TO_TIMESTAMP('2024-04-04 18:00:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206303 +; + +-- Apr 4, 2024, 6:00:13 PM CEST +UPDATE AD_Field SET ReadOnlyLogic='@#ShowAdvanced@=N',Updated=TO_TIMESTAMP('2024-04-04 18:00:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206309 +; + +-- Apr 4, 2024, 6:00:17 PM CEST +UPDATE AD_Field SET ReadOnlyLogic='@#ShowAdvanced@=N',Updated=TO_TIMESTAMP('2024-04-04 18:00:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206308 +; + +-- Apr 4, 2024, 6:00:20 PM CEST +UPDATE AD_Field SET ReadOnlyLogic='@#ShowAdvanced@=N',Updated=TO_TIMESTAMP('2024-04-04 18:00:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206306 +; + +-- Apr 4, 2024, 6:00:26 PM CEST +UPDATE AD_Field SET ReadOnlyLogic='@#ShowAdvanced@=N',Updated=TO_TIMESTAMP('2024-04-04 18:00:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206304 +; + +-- Apr 4, 2024, 6:00:36 PM CEST +UPDATE AD_Field SET IsAdvancedField='Y',Updated=TO_TIMESTAMP('2024-04-04 18:00:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206305 +; + diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java index 59d7b1daa5..0fa9af9f01 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java @@ -766,7 +766,7 @@ public class FindWindow extends Window implements EventListener, ValueCha tabPanel.setStyle("height: 100%; width: 100%"); tabPanel.appendChild(winAdvanced); tabPanel.setId("advancedSearch"); - winMain.addTab(tabPanel, Msg.getMsg(Env.getCtx(), "Advanced").replaceAll("&", ""), false, false); + winMain.addTab(tabPanel, Msg.getMsg(Env.getCtx(), "Advanced"), false, false); initSimple(); initAdvanced(); @@ -2053,11 +2053,13 @@ public class FindWindow extends Window implements EventListener, ValueCha String code = userQuery.getCode(); if (code.startsWith(MColumn.VIRTUAL_UI_COLUMN_PREFIX)) { + winMain.getComponent().getTabpanel(1) .getLinkedTab().setLabel(Msg.getMsg(Env.getCtx(), "SQL")); m_whereUserQuery = "(" + code.substring(code.indexOf("=")+1, code.length()) + ")"; if (log.isLoggable(Level.INFO)) log.log(Level.INFO, m_whereUserQuery); hideAdvanced(); } else { + winMain.getComponent().getTabpanel(1) .getLinkedTab().setLabel(Msg.getMsg(Env.getCtx(), "Advanced")); String[] segments = code.split(Pattern.quote(SEGMENT_SEPARATOR)); List rowList = advancedPanel.getChildren();