Openbravo Issue Tracking System - Modules
View Issue Details
0038624ModulesAnalyticspublic2018-05-24 18:392018-06-07 11:30
ngarcia 
AtulOpenbravo 
urgentmajoralways
closedfixed 
5
 
 
dmiguelez
0038624: Records in OBANALY_FACT_ORDER previous to forward start date are removed if they are updated
Records in OBANALY_FACT_ORDER previous to forward start date are removed if they are updated
As System Admin role:
   In Process Request window schedule 'Update Time Dimension Refs + Tree Closure Table' to be run immediately

As group admin role:
   In Process Request window schedule 'Clear Analytics Fact Table' to be run immediately
   Create a record in Analytics Process Configuration window:
      Forward Start Date: yesterday

   Create two Sales Order with yesterday's date and POS Order document type, add a product with stock and book them
   Create a Sales Order with today's date and POS Order document type, add a product with stock and book it

   In Process Request window schedule 'Forward Update Analytics Fact Tables' to be run immediately
   Go to Analytics Sales Detail View and check the three sales orders are shown

   Pay only one of the invoices related with a yesterday's order (the invoice will be updated)

   Modify the record in Analytics Process Configuration window:
      Forward Start Date: today

   In Process Request window schedule 'Forward Update Analytics Fact Tables' to be run immediately
   Go to Analytics Sales Detail View and check the paid order is not shown
No tags attached.
Issue History
2018-05-24 18:39ngarciaNew Issue
2018-05-24 18:39ngarciaAssigned To => platform
2018-05-24 18:39ngarciaResolution time => 1528927200
2018-05-24 18:39ngarciaIssue Monitored: networkb
2018-05-24 19:22eugeniIssue Monitored: eugeni
2018-05-25 10:19ngarciaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17183#r17183
2018-05-25 10:20ngarciaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17184#r17184
2018-05-25 10:21ngarciaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17185#r17185
2018-05-29 13:27ngarciaAssigned Toplatform => Triage Finance
2018-05-31 16:32dmiguelezAssigned ToTriage Finance => AtulOpenbravo
2018-06-04 14:34AtulOpenbravoStatusnew => scheduled
2018-06-05 22:21AtulOpenbravoNote Added: 0104967
2018-06-06 21:12AtulOpenbravoNote Added: 0104989
2018-06-07 11:27hgbotCheckin
2018-06-07 11:27hgbotNote Added: 0104997
2018-06-07 11:27hgbotStatusscheduled => resolved
2018-06-07 11:27hgbotResolutionopen => fixed
2018-06-07 11:27hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.client.analytics/rev/296d7c34d7b96d98420841fc41558f33e947c1bc [^]
2018-06-07 11:27hgbotCheckin
2018-06-07 11:27hgbotNote Added: 0104998
2018-06-07 11:30dmiguelezReview Assigned To => dmiguelez
2018-06-07 11:30dmiguelezNote Added: 0104999
2018-06-07 11:30dmiguelezStatusresolved => closed

Notes
(0104967)
AtulOpenbravo   
2018-06-05 22:21   
Test Plan

- Login as System Admin role:
- In Process Request window schedule 'Update Time Dimension Refs + Tree Closure Table' to be run immediately
- Wait for process to complete and Logout.

- Login as F&B International Group Admin role:
- In Process Request window schedule 'Clear Analytics Fact Table' to be run immediately
- Create a record in Analytics Process Configuration window:
  Forward Start Date: yesterday

- Create two Sales Order with yesterday's date and POS Order document type, add a product with stock and book them.
- Create a Sales Order with today's date and POS Order document type, add a product with stock and book it

- In Process Request window schedule 'Forward Update Analytics Fact Tables' to be run immediately
- Go to Analytics Sales Detail View and check the three sales orders are shown

- Pay only one of the invoices related with a yesterday's order (the invoice will be updated)

- Modify the record in Analytics Process Configuration window:
  Forward Start Date: Today

- In Process Request window schedule 'Forward Update Analytics Fact Tables' to be run immediately

- Go to Analytics Sales Detail View and check that paid order is still shown.
(0104989)
AtulOpenbravo   
2018-06-06 21:12   
Test Plan

- Login as System Admin role:
- In Process Request window schedule 'Update Time Dimension Refs + Tree Closure Table' to be run immediately
- Wait for process to complete and Logout.

- Login as F&B International Group Admin role:
- In Process Request window schedule 'Clear Analytics Fact Table' to be run immediately
- Create a record in Analytics Process Configuration window:
  Forward Start Date: Yesterday

- Navigate to Discount and Promotion window and create a new record with name Discount 10%,
  set Discount % = 10, Start Date: 01/01/2018, Included Products: Only those defined.
- In the product tab add all the Vino products i.e Blanco, Rosado, Tinto, etc.
- Create a Sales Order with Yesterday's date as Order date as well as Scheduled Delivery Date, business partner = Hoteles Buenas Noches, S.A. and Standard Order document type, add a Vino Blanco product with Qty = 10
  and book it.
- Create a Shipment for above order with Movement Date = Order Date.
- Create a Invoice for above order with Invoice Date = Order Date.
- Create a Sales Order with Yesterday's date as Order date as well as Scheduled Delivery Date, business partner = Hoteles Buenas Noches, S.A. and Standard Order document type, add a Vino Rosado product with Qty = 10
  and book it.
- Create a Shipment for above order with Movement Date = Order Date.
- Create a Invoice for above order with Invoice Date = Order Date.
- Create a Sales Order with Today's date as Order date as well as Scheduled Delivery Date, business partner = Hoteles Buenas Noches, S.A. and POS Order document type, add a Vino Tinto product with Qty 10
  and book it.

- In Process Request window schedule 'Forward Update Analytics Fact Tables' to be run immediately
- Go to Analytics Sales Discount View and check all three sales orders are shown.

- Reactivate the one of Sales invoice with Yesterday's Date as Invoice Date.
- Modify the Line qty as 5 and complete the invoice again.
- Go to Analytics Sales Discount View and check that order for which the invoice was modified is not shown.
- Modify the record in Analytics Process Configuration window:
  Forward Start Date: Today

- In Process Request window schedule 'Forward Update Analytics Fact Tables' to be run immediately
- Go to Analytics Sales Discount View and check that order for which the invoice was modified is shown.
(0104997)
hgbot   
2018-06-07 11:27   
Repository: erp/pmods/org.openbravo.client.analytics
Changeset: 296d7c34d7b96d98420841fc41558f33e947c1bc
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Thu Jun 07 10:21:12 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.client.analytics/rev/296d7c34d7b96d98420841fc41558f33e947c1bc [^]

Fixes Issue 0038624: Records in OBANALY_FACT_ORDER previous to forward
start date are removed if they are updated

PurgeFacts() method deletes the orders from OBANALY_FACT_ORDER whose
related invoice or invoice line's updated property is greater than
the updated property of OBANALY_FACT_ORDER record. Because a reloading
of data in OBANALY_FACT_ORDER is required after any modifications to
the invoice or invoice line. Hence the date criteria to select the
invoice is now changed to consider the invoices whose Updated
property is greater than or equal to Forward Start Date.

Similarly in case of discount and promotions are applied and invoice
is reactivated by editing invoiceline qty, and again processing the
invoice, deletes the record in invoicelineoffer as well as
OBANALY_FACT_DISCOUNTS. For reloading the data, date criteria to
select the invoice is now changed to consider the invoices (related
to invoiceline offer via invoiceline) whose Updated property is
greater than or equal to Forward Start Date.

---
M src/org/openbravo/client/analytics/fact/OBAnalyticsFactDiscountsUpdater.java
M src/org/openbravo/client/analytics/fact/OBAnalyticsFactOrderUpdater.java
---
(0104998)
hgbot   
2018-06-07 11:27   
Repository: erp/pmods/org.openbravo.client.analytics
Changeset: cc56ab0b72dd976772825a6fcca8182af64034e4
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Jun 07 10:22:16 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.client.analytics/rev/cc56ab0b72dd976772825a6fcca8182af64034e4 [^]

Related to Issue 38624. Updated module version

---
M src-db/database/sourcedata/AD_MODULE.xml
---
(0104999)
dmiguelez   
2018-06-07 11:30   
Code Review + Testing Ok