Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0035536
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] B. User interfacemajoralways2017-03-15 21:312017-04-01 12:06
ReporterrbianchiniView Statuspublic 
Assigned Toinigosanchez 
PrioritynormalResolutionfixedFixed in Version3.0PR17Q2
StatusclosedFix in branchFixed in SCM revisione10bc2fc5f83
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version3.0PR16Q3.3SCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0035536: Problem to use summary function in a computed column that has a selector as reference

DescriptionWhen you want to use a summary function in a computed column with selector reference trhows the next error.

Error
Exception When creating query select max (e.tESTISUTABLETHREEID._computedColumns.tESTISUTABLETHREEID.text) from TESTISU_TABLEONE and left join as e._computedColumns.tESTISUTABLETHREEID as join_0 Where e.organization.id in ('E443A31992CB4635AFCAEABE7183CE85', '0', 'DC206C91AA6A4897B44DA897936E0EC3' '7BABA5FF80494CAFA54DEBD22EC46F01', 'BAE22373FEBE4CCCA24517E23F0C8A48', '19404EAD144C49A0AF37D54377CF452D', 'B843C30461EA4501935CB1D125C9C25A', '2E60544D37534C0B89E765FE29BC0B43') and e.client.id in ('23C59575B9CF467C9620760EB255B389', '0')

The log is attached
Steps To ReproduceSteps to reproduce error
1-Install module com.precognis.testisues.obx (in issueFiles.zip) This module contains three tables:
*TESTISUTABLETHREE: contains in addition to the mandatory columns, a column of
type text.
*TESTISUTABLETWO: contains in addition to the mandatory columns, a column of type text and a reference to TESTISUTABLETHREE.
*TESTISUTABLEONE: contains in addition to the mandatory columns, a column of type text, a reference to TESTISUTABLETWO and also a computed column of reference type selector, which takes the field TESTISUTABLETHREE from the record of the table TESTISUTABLETWO referenced in this record.
2-Create a regiter in the table TESTISUTABLETHREE.
3-Create a regiter in the table TESTISUTABLETWO that points to the record created previously.
4-Create a regiter in the table TESTISUTABLEONE that points to the registry created previously.
5-Go to table TESTISUTABLEONE and set a summary function max in column TESTISUTABLETHREE_ID
6-You get the error
TagsNo tags attached.
Attached Fileszip file icon issueFiles.zip [^] (20,949 bytes) 2017-03-15 21:31

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0034324 closedinigosanchez Summary function does not function for WIndow's created using hql tables. 
related to design defect 0029765 acknowledgedTriage Platform Base Cannot add summary functions to formula fields 

-  Notes
(0095354)
alostale (manager)
2017-03-17 09:28

Summary functions require to execute in DB the query that populates current grid without any pagination in order to perform the aggregation, this is known to be potentially problematic in performance, depending on the window and volume of data.

As computed columns allow to be defined with any arbitrary sql statement, the risk of underperformance when included in a summary function is much bigger.

Because of this, the proposal is to not support computed columns to be included as summary functions.
(0095607)
inigosanchez (developer)
2017-03-28 15:49

Added a test in testlink: Platform > Summary, Grouping and Filter > Summary > Disable Summary functions for Computed Columns
(0095614)
inigosanchez (developer)
2017-03-28 17:57

Updated wiki http://wiki.openbravo.com/wiki/User_Interface_Introduction#Grid_Summaries [^]
(0095628)
hgbot (developer)
2017-03-29 09:46

Repository: erp/devel/pi
Changeset: e10bc2fc5f83a9ebb3dcbdc6ce936e79756973ce
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Tue Mar 28 17:55:09 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e10bc2fc5f83a9ebb3dcbdc6ce936e79756973ce [^]

Fixed issue 35536: Deactivated summary function in computed columns.

The summary functions didn't work as expected in computed columns.

As computed columns allow to be defined with any arbitrary sql statement,
the risk of underperformance when included in a summary function is much
bigger.

Because of this, to avoid this problem, it has been resolved by blocking
the use of the summary functions in computed columns.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-field.js.ftl
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewFieldHandler.java
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0095683)
hudsonbot (developer)
2017-03-30 00:04

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/8a8b60d9776c [^]
Maturity status: Test
(0095747)
alostale (manager)
2017-03-31 09:27

Reopening:

Before this fix it was possible to set a computed column as summary function. If having at least one computed column as summary the grid status was persisted or the view was saved, after the fix the columns still appears with its summary. Even worse, when in this situation it is not possible to manually remove summary because the contextual menu now does not allow it because it is computed.
(0095766)
hgbot (developer)
2017-03-31 13:21

Repository: erp/devel/pi
Changeset: dd9323a820c07e28dde4ed19a19c55cc6cb22863
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Fri Mar 31 13:20:15 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/dd9323a820c07e28dde4ed19a19c55cc6cb22863 [^]

Related with issue 35536: summary functions are not allowed in computed columns

The problem found in the code review was if having at least one computed column as summary
the grid status was persisted or the view was saved, after the fix the columns still
appears with its summary. This happened because the original fix did not take this scenario
into account. It means summary functions applied to computed columns in older versions are
not managed properly.

The problem has been resolved by take into account when a computed column had a summary
function defined in older versions. When take place this situation the summary function is
not displayed anymore. Besides, it is not possible to define a new summary function in a
computed column.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0095769)
alostale (manager)
2017-03-31 14:27

code reviewed + tested
(0095780)
hudsonbot (developer)
2017-04-01 12:06

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/44185ff76d75 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2017-03-15 21:31 rbianchini New Issue
2017-03-15 21:31 rbianchini Assigned To => platform
2017-03-15 21:31 rbianchini File Added: issueFiles.zip
2017-03-15 21:31 rbianchini Modules => Core
2017-03-15 21:31 rbianchini Resolution time => 1491361200
2017-03-15 21:31 rbianchini Triggers an Emergency Pack => No
2017-03-16 09:41 alostale Relationship added related to 0034324
2017-03-16 09:41 alostale Relationship added related to 0029765
2017-03-17 09:28 alostale Note Added: 0095354
2017-03-17 09:29 alostale Status new => acknowledged
2017-03-27 12:38 inigosanchez Assigned To platform => inigosanchez
2017-03-28 15:49 inigosanchez Status acknowledged => scheduled
2017-03-28 15:49 inigosanchez Note Added: 0095607
2017-03-28 17:57 inigosanchez Note Added: 0095614
2017-03-29 09:42 inigosanchez Review Assigned To => alostale
2017-03-29 09:42 inigosanchez Resolution time 1491361200 => 1491343200
2017-03-29 09:46 hgbot Checkin
2017-03-29 09:46 hgbot Note Added: 0095628
2017-03-29 09:46 hgbot Status scheduled => resolved
2017-03-29 09:46 hgbot Resolution open => fixed
2017-03-29 09:46 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e10bc2fc5f83a9ebb3dcbdc6ce936e79756973ce [^]
2017-03-30 00:04 hudsonbot Checkin
2017-03-30 00:04 hudsonbot Note Added: 0095683
2017-03-31 09:27 alostale Note Added: 0095747
2017-03-31 09:27 alostale Status resolved => new
2017-03-31 09:27 alostale Resolution fixed => open
2017-03-31 09:53 inigosanchez Status new => scheduled
2017-03-31 13:21 hgbot Checkin
2017-03-31 13:21 hgbot Note Added: 0095766
2017-03-31 13:21 inigosanchez Status scheduled => resolved
2017-03-31 13:21 inigosanchez Resolution open => fixed
2017-03-31 14:27 alostale Note Added: 0095769
2017-03-31 14:27 alostale Status resolved => closed
2017-03-31 14:27 alostale Fixed in Version => 3.0PR17Q2
2017-04-01 12:06 hudsonbot Checkin
2017-04-01 12:06 hudsonbot Note Added: 0095780


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker