IDEMPIERE-5241 : bugfixes for charts (#1262)

* IDEMPIERE-5241 : bugfixes for charts

fix WhereClause, WinHeight, TimeUnit (see details in ticket)

* IDEMPIERE-5214 : Bugfixes for charts - fix TabEditor when no chart is defined on field
This commit is contained in:
Nicolas Micoud 2022-03-25 12:01:05 +01:00 committed by GitHub
parent ab0db6e9aa
commit 0b54d2f4c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 179 additions and 6 deletions

View File

@ -0,0 +1,90 @@
-- IDEMPIERE-5241
SELECT register_migration_script('202203241011_IDEMPIERE-5241.sql') FROM dual;
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Mar 24, 2022, 10:11:28 AM CET
UPDATE AD_Column SET ValueMin='1', IsToolbarButton='N',Updated=TO_TIMESTAMP('2022-03-24 10:11:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=59698
;
-- Mar 24, 2022, 10:11:43 AM CET
UPDATE AD_Column SET MandatoryLogic='@IsTimeSeries@ = Y', IsToolbarButton='N',Updated=TO_TIMESTAMP('2022-03-24 10:11:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=59903
;
-- Mar 24, 2022, 10:12:26 AM CET
UPDATE AD_Column SET DefaultValue=NULL, IsMandatory='N', IsToolbarButton='N',Updated=TO_TIMESTAMP('2022-03-24 10:12:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=59685
;
-- Mar 24, 2022, 10:12:28 AM CET
ALTER TABLE AD_ChartDatasource MODIFY WhereClause VARCHAR2(2000 CHAR) DEFAULT NULL
;
-- Mar 24, 2022, 10:12:28 AM CET
ALTER TABLE AD_ChartDatasource MODIFY WhereClause NULL
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=getDate(), UpdatedBy=0 WHERE AD_Field_ID=59597
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y', Updated=getDate(), UpdatedBy=0 WHERE AD_Field_ID=59596
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y', Updated=getDate(), UpdatedBy=0 WHERE AD_Field_ID=59598
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y', Updated=getDate(), UpdatedBy=0 WHERE AD_Field_ID=59599
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y', Updated=getDate(), UpdatedBy=0 WHERE AD_Field_ID=59600
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y', Updated=getDate(), UpdatedBy=0 WHERE AD_Field_ID=59673
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y', Updated=getDate(), UpdatedBy=0 WHERE AD_Field_ID=59679
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=70,IsDisplayedGrid='Y', Updated=getDate(), UpdatedBy=0 WHERE AD_Field_ID=202479
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=80,IsDisplayedGrid='Y', Updated=getDate(), UpdatedBy=0 WHERE AD_Field_ID=59601
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=90,IsDisplayedGrid='Y', Updated=getDate(), UpdatedBy=0 WHERE AD_Field_ID=59602
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=100,IsDisplayedGrid='Y', Updated=getDate(), UpdatedBy=0 WHERE AD_Field_ID=59674
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=110,IsDisplayedGrid='Y', Updated=getDate(), UpdatedBy=0 WHERE AD_Field_ID=59680
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=120,IsDisplayedGrid='Y', Updated=getDate(), UpdatedBy=0 WHERE AD_Field_ID=59675
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=130,IsDisplayedGrid='Y', Updated=getDate(), UpdatedBy=0 WHERE AD_Field_ID=59676
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=140,IsDisplayedGrid='Y', Updated=getDate(), UpdatedBy=0 WHERE AD_Field_ID=59677
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=150,IsDisplayedGrid='Y', Updated=getDate(), UpdatedBy=0 WHERE AD_Field_ID=59603
;

View File

@ -0,0 +1,87 @@
-- IDEMPIERE-5241
SELECT register_migration_script('202203241011_IDEMPIERE-5241.sql') FROM dual;
-- Mar 24, 2022, 10:11:28 AM CET
UPDATE AD_Column SET ValueMin='1', IsToolbarButton='N',Updated=TO_TIMESTAMP('2022-03-24 10:11:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=59698
;
-- Mar 24, 2022, 10:11:43 AM CET
UPDATE AD_Column SET MandatoryLogic='@IsTimeSeries@ = Y', IsToolbarButton='N',Updated=TO_TIMESTAMP('2022-03-24 10:11:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=59903
;
-- Mar 24, 2022, 10:12:26 AM CET
UPDATE AD_Column SET DefaultValue=NULL, IsMandatory='N', IsToolbarButton='N',Updated=TO_TIMESTAMP('2022-03-24 10:12:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=59685
;
-- Mar 24, 2022, 10:12:28 AM CET
INSERT INTO t_alter_column values('ad_chartdatasource','WhereClause','VARCHAR(2000)',null,'NULL')
;
-- Mar 24, 2022, 10:12:28 AM CET
INSERT INTO t_alter_column values('ad_chartdatasource','WhereClause',null,'NULL',null)
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=statement_timestamp(), UpdatedBy=0 WHERE AD_Field_ID=59597
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=0 WHERE AD_Field_ID=59596
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=0 WHERE AD_Field_ID=59598
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=0 WHERE AD_Field_ID=59599
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=0 WHERE AD_Field_ID=59600
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=0 WHERE AD_Field_ID=59673
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=0 WHERE AD_Field_ID=59679
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=70,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=0 WHERE AD_Field_ID=202479
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=80,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=0 WHERE AD_Field_ID=59601
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=90,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=0 WHERE AD_Field_ID=59602
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=100,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=0 WHERE AD_Field_ID=59674
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=110,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=0 WHERE AD_Field_ID=59680
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=120,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=0 WHERE AD_Field_ID=59675
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=130,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=0 WHERE AD_Field_ID=59676
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=140,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=0 WHERE AD_Field_ID=59677
;
-- Mar 24, 2022, 10:12:58 AM CET
UPDATE AD_Field SET SeqNoGrid=150,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=0 WHERE AD_Field_ID=59603
;

View File

@ -31,7 +31,7 @@ public class X_AD_ChartDatasource extends PO implements I_AD_ChartDatasource, I_
/** /**
* *
*/ */
private static final long serialVersionUID = 20220322L; private static final long serialVersionUID = 20220324L;
/** Standard Constructor */ /** Standard Constructor */
public X_AD_ChartDatasource (Properties ctx, int AD_ChartDatasource_ID, String trxName) public X_AD_ChartDatasource (Properties ctx, int AD_ChartDatasource_ID, String trxName)
@ -46,8 +46,6 @@ public class X_AD_ChartDatasource extends PO implements I_AD_ChartDatasource, I_
setFromClause (null); setFromClause (null);
setName (null); setName (null);
setValueColumn (null); setValueColumn (null);
setWhereClause (null);
// WHERE ...
} */ } */
} }
@ -64,8 +62,6 @@ public class X_AD_ChartDatasource extends PO implements I_AD_ChartDatasource, I_
setFromClause (null); setFromClause (null);
setName (null); setName (null);
setValueColumn (null); setValueColumn (null);
setWhereClause (null);
// WHERE ...
} */ } */
} }

View File

@ -155,7 +155,7 @@ public class WChartEditor extends WEditor
public void onEvent(Event event) throws Exception public void onEvent(Event event) throws Exception
{ {
if (event instanceof AfterSizeEvent) if (event instanceof AfterSizeEvent && chartModel != null && chartModel.getAD_Chart_ID() > 0)
{ {
AfterSizeEvent ase = (AfterSizeEvent) event; AfterSizeEvent ase = (AfterSizeEvent) event;
chartWidth = ase.getWidth(); chartWidth = ase.getWidth();