Openbravo Issue Tracking System - Modules
View Issue Details
0036155ModulesAnalyticspublic2017-05-31 17:442017-06-19 12:07
ngarcia 
caristu 
urgentmajoralways
closedfixed 
5
 
 
alostale
0036155: Wrong dates shown in OB Analytics if there exists more than one date dimension belonging the same table
Wrong dates shown in OB Analytics if there exists more than one date dimension belonging the same table
As group admin role:
   Create a sales order with a date of 2016
   Create a sales order with a date of 2017
   Create a sales invoice with a date of 2017 and include the previously created two orders
   
   Go to Cube Definition and add orderDate dimension to Sample Purchase/Sales Order Line Cube cube
   Go to OB Analytics window, refresh the cubes, select Sample Purchase/Sales Order Line Cube cube, add Order Date - Year in Rows and a measure
   Check 2017 is shown
   Go to Cube Definition and add invoiceDate dimension to Sample Purchase/Sales Order Line Cube cube
   Go to OB Analytics window, refresh the cubes, select Sample Purchase/Sales Order Line Cube cube, add Order Date - Year in Rows and a measure
   Check 2017 is not shown
No tags attached.
Issue History
2017-05-31 17:44ngarciaNew Issue
2017-05-31 17:44ngarciaAssigned To => platform
2017-05-31 17:44ngarciaResolution time => 1497996000
2017-05-31 17:44ngarciaIssue Monitored: networkb
2017-06-16 09:15caristuAssigned Toplatform => caristu
2017-06-16 09:17hgbotCheckin
2017-06-16 09:17hgbotNote Added: 0097434
2017-06-16 10:00hgbotCheckin
2017-06-16 10:00hgbotNote Added: 0097435
2017-06-16 10:00hgbotStatusnew => resolved
2017-06-16 10:00hgbotResolutionopen => fixed
2017-06-16 10:00hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.client.analytics/rev/b93f9b28254954937df27d922a8c1d7304d4b0de [^]
2017-06-16 10:02caristuReview Assigned To => alostale
2017-06-16 10:02caristuIssue Monitored: alostale
2017-06-19 12:07alostaleNote Added: 0097476
2017-06-19 12:07alostaleStatusresolved => closed

Notes
(0097434)
hgbot   
2017-06-16 09:17   
Repository: erp/pmods/org.openbravo.client.analytics
Changeset: 87b5895eed79145e2f20f5e834d49d8a541606b1
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Fri Jun 16 09:16:49 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.client.analytics/rev/87b5895eed79145e2f20f5e834d49d8a541606b1 [^]

related to issue 36155: apply file formatting

---
M src/org/openbravo/client/analytics/mondrian/Mondrian4SchemaGenerator.java
---
(0097435)
hgbot   
2017-06-16 10:00   
Repository: erp/pmods/org.openbravo.client.analytics
Changeset: b93f9b28254954937df27d922a8c1d7304d4b0de
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Fri Jun 16 09:54:40 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.client.analytics/rev/b93f9b28254954937df27d922a8c1d7304d4b0de [^]

fixes bug 36155: Columns of date dimension not always have the proper name

When having multiple time dimensions referencing to date properties in the same table, the name set for the time columns of the same type (year, month,...) was the same.

This case was being handled properly when generating the SQL query, because the property name is appended to the alias of the column to avoid name collisions. But this was not being applied when generating the columns of the time dimensions.

So, before this fix the attribute for a year was generated as follows:

<Attribute name=orderDate-year nameColumn=theyear_orderdate visible=false table=alias1_1 levelType=TimeYears>
<MemberFormatter className=org.openbravo.client.analytics.mondrian.OBMondrianMemberFormatter/>
<Key>
<Column name=theyear/>
</Key>
</Attribute>

Now, with this changeset the result will be:

<Attribute name=orderDate-year nameColumn=theyear_orderdate visible=false table=alias1_1 levelType=TimeYears>
<MemberFormatter className=org.openbravo.client.analytics.mondrian.OBMondrianMemberFormatter/>
<Key>
<Column name=theyear_orderdate/>
</Key>
</Attribute>

---
M src/org/openbravo/client/analytics/mondrian/Mondrian4SchemaGenerator.java
---
(0097476)
alostale   
2017-06-19 12:07   
reviewed + tested
fixed in 1.4.500