Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0038069Openbravo ERPA. Platformpublic2018-03-07 13:522018-03-12 13:27
alostale 
alostale 
immediatemajoralways
closedfixed 
5
 
3.0PR17Q4.23.0PR17Q4.2 
caristu
Core
Production - Confirmed Stable
2016-11-08
3.0PR17Q1
https://code.openbravo.com/erp/devel/pi/rev/7acec5407733 [^]
No
0038069: incorrect view cache in browse for windows with server display logic
View definition for windows that have at least a field with server side display logic are not correctly cached in browser if there is no preference configuring that field.

The affected windows are:

select distinct w.name from ad_field f, ad_tab t, ad_window w where displaylogic_server is not null and f.ad_Tab_id = t.ad_tab_id and w.ad_window_id = t.ad_window_id order by 1;
            name
-----------------------------
 Create Purchase Order Lines
 Goods Movements
 Goods Receipt
 Goods Shipment
 Manage Requisitions
 Purchase Invoice
 Purchase Order
 Referenced Inventory
 Requisition
 Return from Customer
 Return Material Receipt
 Return to Vendor
 Return to Vendor Shipment
 Sales Invoice
 Sales Order
 Sales Quotation
(16 rows)
1. Log in as Openbravo
2. Open dev tools to check requests
3. Open Sales Order window
   -> OK: a request to View?viewId=_143 is triggered with response code 200 (success)
4. Close Sales Order window and reopen it in the same session
   -> OK: no request is perfomed
5. Close session and log in again with Openbravo user in the same browser
6. Open Sales Order window
   -> GOT: a request to View?viewId=_143 is triggered with response code 200
      EXPECTED: a request to View?viewId=_143 with response code 304 (not modified)

No tags attached.
blocks defect 0038066 closed alostale incorrect view cache in browser for windows with server display logic 
Issue History
2018-03-07 14:18alostaleTypedefect => backport
2018-03-07 14:18alostaleTarget Version => 3.0PR17Q4.2
2018-03-08 10:20hgbotCheckin
2018-03-08 10:20hgbotNote Added: 0103079
2018-03-08 10:20hgbotStatusscheduled => resolved
2018-03-08 10:20hgbotResolutionopen => fixed
2018-03-08 10:20hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR17Q4.2/rev/4c4adeaf70ca041e83f108d4442640551df485e8 [^]
2018-03-12 13:27caristuNote Added: 0103158
2018-03-12 13:27caristuStatusresolved => closed
2018-03-12 13:27caristuFixed in Version => 3.0PR17Q4.2

Notes
(0103079)
hgbot   
2018-03-08 10:20   
Repository: erp/backports/3.0PR17Q4.2
Changeset: 4c4adeaf70ca041e83f108d4442640551df485e8
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed Mar 07 14:26:09 2018 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR17Q4.2/rev/4c4adeaf70ca041e83f108d4442640551df485e8 [^]

fixed bug 38069: no view cache in browser for windows with server display logic

  Window having at least a field with server side display logic were not cached
  in browser if there was no preference configuring that display logic.

  The problem was cuased by an incorrect eTag calculation that if not preference
  was set a date in future was set including current hour.

  The fix:
   * Simplifies eTag calculation for this case: if no preference defined, no need
     to add any date.
   * Uses for StringBuilder for String concatenation to slightly improve performance

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/ViewComponent.java
---
(0103158)
caristu   
2018-03-12 13:27   
Code reviewed + tested OK.