Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0024966Openbravo ERPA. Platformpublic2013-10-17 16:332013-10-29 23:40
egoitz 
AugustoMauch 
immediatemajoralways
closedfixed 
5
 
3.0MP29 
AugustoMauch
Core
Production - QA Approved
No
0024966: If you set a sumary function on the grid for a computed column it fails
If you set a sumary function on the grid for a computed column it fails
-Go to sale order window
-Click with the right button of the mouse on the label of a computed column, for example, Delivery status
-Click on set summary function, and select count
*You get an error

After close the error you still get the error when opening againg the window, or changing the order of the data shown


The error on the grid is:

Exception when creating query select count(e.deliveryStatus) from Order as e left join e.businessPartner as join_0 where ( (( upper((COALESCE(to_char(join_0.name),''))) = :alias_0 )) and (e.salesTransaction=true AND e.transactionDocument.return= false AND e.transactionDocument.sOSubType NOT LIKE 'OB') ) and e.organization.id in ('E443A31992CB4635AFCAEABE7183CE85', '0', 'DC206C91AA6A4897B44DA897936E0EC3', '7BABA5FF80494CAFA54DEBD22EC46F01', 'BAE22373FEBE4CCCA24517E23F0C8A48', '19404EAD144C49A0AF37D54377CF452D', 'B843C30461EA4501935CB1D125C9C25A', '2E60544D37534C0B89E765FE29BC0B43') and e.client.id in ('23C59575B9CF467C9620760EB255B389', '0')



No tags attached.
duplicate of defect 00250413.0MP29 closed marvintm Problem when filtering by a computed column with list reference 
Issue History
2013-10-17 16:33egoitzNew Issue
2013-10-17 16:33egoitzAssigned To => AugustoMauch
2013-10-17 16:33egoitzModules => Core
2013-10-17 16:33egoitzTriggers an Emergency Pack => No
2013-10-17 16:33egoitzRegression level => Production - Confirmed Stable
2013-10-17 16:35egoitzSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=5124#r5124
2013-10-17 16:36egoitzRegression levelProduction - Confirmed Stable => Production - QA Approved
2013-10-17 16:39egoitzSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=5125#r5125
2013-10-17 16:41egoitzNote Added: 0061770
2013-10-28 09:33AugustoMauchAssigned ToAugustoMauch => alostale
2013-10-29 23:39AugustoMauchRelationship addedduplicate of 0025041
2013-10-29 23:39AugustoMauchAssigned Toalostale => AugustoMauch
2013-10-29 23:39AugustoMauchStatusnew => scheduled
2013-10-29 23:39AugustoMauchfix_in_branch => pi
2013-10-29 23:40AugustoMauchNote Added: 0061954
2013-10-29 23:40AugustoMauchStatusscheduled => resolved
2013-10-29 23:40AugustoMauchFixed in Version => 3.0MP29
2013-10-29 23:40AugustoMauchFixed in SCM revision => https://code.openbravo.com/erp/devel/pi/rev/67e80e28874b0d93cd69094cec39febc89a03b11 [^]
2013-10-29 23:40AugustoMauchResolutionopen => fixed
2013-10-29 23:40AugustoMauchReview Assigned To => AugustoMauch
2013-10-29 23:40AugustoMauchNote Added: 0061955
2013-10-29 23:40AugustoMauchStatusresolved => closed

Notes
(0061770)
egoitz   
2013-10-17 16:41   
ON the log the error is:

2013-10-17 16:40:40,007 [ajp-localhost%2F127.0.0.1-8809-5] ERROR org.openbravo.base.exception.OBException - Exception when creating query select count(e.deliveryStatus) from Order as e where ( e.salesTransaction=true AND e.transactionDocument.return= false AND e.transactionDocument.sOSubType NOT LIKE 'OB' ) and e.organization.id in ('E443A31992CB4635AFCAEABE7183CE85', '0', 'DC206C91AA6A4897B44DA897936E0EC3', '7BABA5FF80494CAFA54DEBD22EC46F01', 'BAE22373FEBE4CCCA24517E23F0C8A48', '19404EAD144C49A0AF37D54377CF452D', 'B843C30461EA4501935CB1D125C9C25A', '2E60544D37534C0B89E765FE29BC0B43') and e.client.id in ('23C59575B9CF467C9620760EB255B389', '0')
org.hibernate.QueryException: could not resolve property: deliveryStatus of: Order [select count(e.deliveryStatus) from Order as e where ( e.salesTransaction=true AND e.transactionDocument.return= false AND e.transactionDocument.sOSubType NOT LIKE 'OB' ) and e.organization.id in ('E443A31992CB4635AFCAEABE7183CE85', '0', 'DC206C91AA6A4897B44DA897936E0EC3', '7BABA5FF80494CAFA54DEBD22EC46F01', 'BAE22373FEBE4CCCA24517E23F0C8A48', '19404EAD144C49A0AF37D54377CF452D', 'B843C30461EA4501935CB1D125C9C25A', '2E60544D37534C0B89E765FE29BC0B43') and e.client.id in ('23C59575B9CF467C9620760EB255B389', '0')]
    at org.hibernate.persister.entity.AbstractPropertyMapping.propertyException(AbstractPropertyMapping.java:81)
    at org.hibernate.persister.entity.AbstractPropertyMapping.toType(AbstractPropertyMapping.java:75)
    at org.hibernate.persister.entity.AbstractEntityPersister.toType(AbstractEntityPersister.java:1465)
    at org.hibernate.hql.ast.tree.FromElementType.getPropertyType(FromElementType.java:315)
    at org.hibernate.hql.ast.tree.FromElement.getPropertyType(FromElement.java:487)
    at org.hibernate.hql.ast.tree.DotNode.getDataType(DotNode.java:611)
    at org.hibernate.hql.ast.tree.DotNode.prepareLhs(DotNode.java:263)
    at org.hibernate.hql.ast.tree.DotNode.resolve(DotNode.java:210)
    at org.hibernate.hql.ast.tree.FromReferenceNode.resolve(FromReferenceNode.java:117)
    at org.hibernate.hql.ast.tree.FromReferenceNode.resolve(FromReferenceNode.java:113)
    at org.hibernate.hql.ast.HqlSqlWalker.resolve(HqlSqlWalker.java:880)
    at org.hibernate.hql.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1330)
    at org.hibernate.hql.antlr.HqlSqlBaseWalker.aggregateExpr(HqlSqlBaseWalker.java:3273)
    at org.hibernate.hql.antlr.HqlSqlBaseWalker.count(HqlSqlBaseWalker.java:2780)
    at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectExpr(HqlSqlBaseWalker.java:2275)
    at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectExprList(HqlSqlBaseWalker.java:2121)
    at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectClause(HqlSqlBaseWalker.java:1522)
    at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:593)
    at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:301)
    at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:244)
    at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:254)
    at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:185)
    at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136)
    at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:101)
    at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:80)
    at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:124)
    at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156)
    at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135)
    at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1770)
    at org.openbravo.dal.service.OBQuery.createQuery(OBQuery.java:230)
    at org.openbravo.service.json.DefaultJsonDataService.fetch(DefaultJsonDataService.java:150)
    at org.openbravo.service.datasource.DefaultDataSourceService.fetch(DefaultDataSourceService.java:72)
    at org.openbravo.service.datasource.DataSourceServlet.doFetch(DataSourceServlet.java:256)
    at org.openbravo.service.datasource.DataSourceServlet.doPost(DataSourceServlet.java:678)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at org.openbravo.base.HttpBaseServlet.serviceInitialized(HttpBaseServlet.java:225)
    at org.openbravo.base.secureApp.HttpSecureAppServlet.service(HttpSecureAppServlet.java:440)
    at org.openbravo.client.kernel.BaseKernelServlet.callServiceInSuper(BaseKernelServlet.java:87)
    at org.openbravo.client.kernel.BaseKernelServlet.service(BaseKernelServlet.java:63)
    at org.openbravo.service.datasource.DataSourceServlet.service(DataSourceServlet.java:138)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.openbravo.utils.SessionExpirationFilter.doFilter(SessionExpirationFilter.java:66)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.openbravo.utils.CharsetFilter.doFilter(CharsetFilter.java:35)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.openbravo.client.kernel.KernelFilter$1.doAction(KernelFilter.java:62)
    at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:46)
    at org.openbravo.client.kernel.KernelFilter.doFilter(KernelFilter.java:71)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.openbravo.dal.core.DalRequestFilter$1.doAction(DalRequestFilter.java:81)
    at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:46)
    at org.openbravo.dal.core.DalRequestFilter.doFilter(DalRequestFilter.java:103)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:448)
    at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:399)
    at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
    at java.lang.Thread.run(Thread.java:679)
2013-10-17 16:40:40,013 [ajp-localhost%2F127.0.0.1-8809-5] ERROR org.openbravo.service.json.DefaultJsonDataService - Exception when creating query select count(e.deliveryStatus) from Order as e where ( e.salesTransaction=true AND e.transactionDocument.return= false AND e.transactionDocument.sOSubType NOT LIKE 'OB' ) and e.organization.id in ('E443A31992CB4635AFCAEABE7183CE85', '0', 'DC206C91AA6A4897B44DA897936E0EC3', '7BABA5FF80494CAFA54DEBD22EC46F01', 'BAE22373FEBE4CCCA24517E23F0C8A48', '19404EAD144C49A0AF37D54377CF452D', 'B843C30461EA4501935CB1D125C9C25A', '2E60544D37534C0B89E765FE29BC0B43') and e.client.id in ('23C59575B9CF467C9620760EB255B389', '0')
org.openbravo.base.exception.OBException: Exception when creating query select count(e.deliveryStatus) from Order as e where ( e.salesTransaction=true AND e.transactionDocument.return= false AND e.transactionDocument.sOSubType NOT LIKE 'OB' ) and e.organization.id in ('E443A31992CB4635AFCAEABE7183CE85', '0', 'DC206C91AA6A4897B44DA897936E0EC3', '7BABA5FF80494CAFA54DEBD22EC46F01', 'BAE22373FEBE4CCCA24517E23F0C8A48', '19404EAD144C49A0AF37D54377CF452D', 'B843C30461EA4501935CB1D125C9C25A', '2E60544D37534C0B89E765FE29BC0B43') and e.client.id in ('23C59575B9CF467C9620760EB255B389', '0')
    at org.openbravo.dal.service.OBQuery.createQuery(OBQuery.java:243)
    at org.openbravo.service.json.DefaultJsonDataService.fetch(DefaultJsonDataService.java:150)
    at org.openbravo.service.datasource.DefaultDataSourceService.fetch(DefaultDataSourceService.java:72)
    at org.openbravo.service.datasource.DataSourceServlet.doFetch(DataSourceServlet.java:256)
    at org.openbravo.service.datasource.DataSourceServlet.doPost(DataSourceServlet.java:678)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at org.openbravo.base.HttpBaseServlet.serviceInitialized(HttpBaseServlet.java:225)
    at org.openbravo.base.secureApp.HttpSecureAppServlet.service(HttpSecureAppServlet.java:440)
    at org.openbravo.client.kernel.BaseKernelServlet.callServiceInSuper(BaseKernelServlet.java:87)
    at org.openbravo.client.kernel.BaseKernelServlet.service(BaseKernelServlet.java:63)
    at org.openbravo.service.datasource.DataSourceServlet.service(DataSourceServlet.java:138)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.openbravo.utils.SessionExpirationFilter.doFilter(SessionExpirationFilter.java:66)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.openbravo.utils.CharsetFilter.doFilter(CharsetFilter.java:35)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.openbravo.client.kernel.KernelFilter$1.doAction(KernelFilter.java:62)
    at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:46)
    at org.openbravo.client.kernel.KernelFilter.doFilter(KernelFilter.java:71)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.openbravo.dal.core.DalRequestFilter$1.doAction(DalRequestFilter.java:81)
    at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:46)
    at org.openbravo.dal.core.DalRequestFilter.doFilter(DalRequestFilter.java:103)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:448)
    at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:399)
    at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
    at java.lang.Thread.run(Thread.java:679)
Caused by: org.hibernate.QueryException: could not resolve property: deliveryStatus of: Order [select count(e.deliveryStatus) from Order as e where ( e.salesTransaction=true AND e.transactionDocument.return= false AND e.transactionDocument.sOSubType NOT LIKE 'OB' ) and e.organization.id in ('E443A31992CB4635AFCAEABE7183CE85', '0', 'DC206C91AA6A4897B44DA897936E0EC3', '7BABA5FF80494CAFA54DEBD22EC46F01', 'BAE22373FEBE4CCCA24517E23F0C8A48', '19404EAD144C49A0AF37D54377CF452D', 'B843C30461EA4501935CB1D125C9C25A', '2E60544D37534C0B89E765FE29BC0B43') and e.client.id in ('23C59575B9CF467C9620760EB255B389', '0')]
    at org.hibernate.persister.entity.AbstractPropertyMapping.propertyException(AbstractPropertyMapping.java:81)
    at org.hibernate.persister.entity.AbstractPropertyMapping.toType(AbstractPropertyMapping.java:75)
    at org.hibernate.persister.entity.AbstractEntityPersister.toType(AbstractEntityPersister.java:1465)
    at org.hibernate.hql.ast.tree.FromElementType.getPropertyType(FromElementType.java:315)
    at org.hibernate.hql.ast.tree.FromElement.getPropertyType(FromElement.java:487)
    at org.hibernate.hql.ast.tree.DotNode.getDataType(DotNode.java:611)
    at org.hibernate.hql.ast.tree.DotNode.prepareLhs(DotNode.java:263)
    at org.hibernate.hql.ast.tree.DotNode.resolve(DotNode.java:210)
    at org.hibernate.hql.ast.tree.FromReferenceNode.resolve(FromReferenceNode.java:117)
    at org.hibernate.hql.ast.tree.FromReferenceNode.resolve(FromReferenceNode.java:113)
    at org.hibernate.hql.ast.HqlSqlWalker.resolve(HqlSqlWalker.java:880)
    at org.hibernate.hql.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1330)
    at org.hibernate.hql.antlr.HqlSqlBaseWalker.aggregateExpr(HqlSqlBaseWalker.java:3273)
    at org.hibernate.hql.antlr.HqlSqlBaseWalker.count(HqlSqlBaseWalker.java:2780)
    at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectExpr(HqlSqlBaseWalker.java:2275)
    at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectExprList(HqlSqlBaseWalker.java:2121)
    at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectClause(HqlSqlBaseWalker.java:1522)
    at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:593)
    at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:301)
    at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:244)
    at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:254)
    at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:185)
    at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136)
    at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:101)
    at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:80)
    at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:124)
    at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156)
    at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135)
    at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1770)
    at org.openbravo.dal.service.OBQuery.createQuery(OBQuery.java:230)
    ... 39 more
2013-10-17 16:40:40,016 [ajp-localhost%2F127.0.0.1-8809-5] INFO org.openbravo.erpCommon.utility.ErrorTextParserPOSTGRE - did not find constraint name for error message: Exception when creating query select count(e.deliveryStatus) from Order as e where ( e.salesTransaction=true AND e.transactionDocument.return= false AND e.transactionDocument.sOSubType NOT LIKE 'OB' ) and e.organization.id in ('E443A31992CB4635AFCAEABE7183CE85', '0', 'DC206C91AA6A4897B44DA897936E0EC3', '7BABA5FF80494CAFA54DEBD22EC46F01', 'BAE22373FEBE4CCCA24517E23F0C8A48', '19404EAD144C49A0AF37D54377CF452D', 'B843C30461EA4501935CB1D125C9C25A', '2E60544D37534C0B89E765FE29BC0B43') and e.client.id in ('23C59575B9CF467C9620760EB255B389', '0')
(0061954)
AugustoMauch   
2013-10-29 23:40   
Repository: erp/devel/pi
Changeset: 67e80e28874b0d93cd69094cec39febc89a03b11
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Tue Oct 29 13:12:22 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/67e80e28874b0d93cd69094cec39febc89a03b11 [^] [^]

Fixed issue 25041. Computed columns with list references will now work correctly when the user filters by them in the grid.

---
M modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java
(0061955)
AugustoMauch   
2013-10-29 23:40   
Code reviewed and verified in pi@67e80e28874b