Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0035536 | Openbravo ERP | B. User interface | public | 2017-03-15 21:31 | 2017-04-01 12:06 |
|
Reporter | rbianchini | |
Assigned To | inigosanchez | |
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | 3.0PR16Q3.3 | |
Target Version | | Fixed in Version | 3.0PR17Q2 | |
Merge Request Status | |
Review Assigned To | alostale |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0035536: Problem to use summary function in a computed column that has a selector as reference |
Description | When 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 Reproduce | Steps 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
|
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | defect | 0034324 | | closed | inigosanchez | Summary function does not function for WIndow's created using hql tables. | related to | design defect | 0029765 | | acknowledged | Triage Platform Base | Cannot add summary functions to formula fields |
|
Attached Files | issueFiles.zip (20,949) 2017-03-15 21:31 https://issues.openbravo.com/file_download.php?file_id=10574&type=bug |
|
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 | |
Notes |
|
|
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. |
|
|
|
Added a test in testlink: Platform > Summary, Grouping and Filter > Summary > Disable Summary functions for Computed Columns |
|
|
|
|
|
(0095628)
|
hgbot
|
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
---
|
|
|
|
|
|
|
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
|
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
---
|
|
|
|
|
|
|
|