Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0049780Openbravo ERPB. User interfacepublic2022-07-12 10:462022-09-13 11:51
a_singh 
Triage Platform Base 
normalmajoralways
closedfixed 
5
 
PR22Q4 
User Interface Application
No
0049780: Issue with Read Only Database
The preference Issue with ReadOnly Database is not working as required
Steps to reproduce:
1. duplicate the database: for example, if your database name is "openbravo" you can duplicate it, in pgAdmin:
   CREATE DATABASE openbravo2 TEMPLATE openbravo;

    configure in Openbravo.properties:
    bbdd.readonly.url=jdbc:postgresql://localhost:5432 [^]
    bbdd.readonly.sid=openbravo2
    bbdd.readonly.user=tad
    bbdd.readonly.password=tad
    db.readonly.maxActive=10000

2. compile

3. change one data in openbravo2, for example, the business partner name of Alimentos y Supermercados S.A to Alimentos y Supermercados_RO

4. enable the preference: Default DB Pool used by reports to RO

5. execute report Sales Order Report for date from 01-01-2000 date to 31-12-2022 : BP name is Alimentos y Supermercados_RO > it is OK

6. change the preference Default DB Pool used by reports to DEFAULT

7. execute report Sales Order Report for date from 01-01-2000 date to 31-12-2022: the expected BP name should be Alimentos y Supermercados S.A. but the name appearing as Alimentos y Supermercados_RO, which is is wrong.
No tags attached.
Issue History
2022-07-12 10:46a_singhNew Issue
2022-07-12 10:46a_singhAssigned To => a_singh
2022-07-12 10:46a_singhModules => User Interface Application
2022-07-12 10:46a_singhTriggers an Emergency Pack => No
2022-09-02 13:50egoitzAssigned Toa_singh => Triage Platform Base
2022-09-08 09:15hgbotNote Added: 0140836
2022-09-11 21:06hgbotResolutionopen => fixed
2022-09-11 21:06hgbotStatusnew => closed
2022-09-11 21:06hgbotNote Added: 0140983
2022-09-11 21:06hgbotFixed in Version => PR22Q4
2022-09-11 21:06hgbotNote Added: 0140984
2022-09-11 21:07AugustoMauchNote Added: 0140985
2022-09-12 16:30hgbotNote Added: 0141029
2022-09-13 11:11hgbotNote Added: 0141042
2022-09-13 11:51hgbotNote Added: 0141045
2022-09-13 11:51hgbotNote Added: 0141046

Notes
(0140836)
hgbot   
2022-09-08 09:15   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/704 [^]
(0140983)
hgbot   
2022-09-11 21:06   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/704 [^]
(0140984)
hgbot   
2022-09-11 21:06   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: ce026e7452c5b95c562451299764dc81e91a0663
Author: Gonzalo Fernández García <gonzalo.fernandez@openbravo.com>
Date: 11-09-2022 21:05:43
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/ce026e7452c5b95c562451299764dc81e91a0663 [^]

Fixed ISSUE-49780: Issue with Read Only Database

After discovering that changing OBUIAPP_DefaultDBPoolForReports propertyfrom DEFAULT to RO and again to DEFAULT did not work as expected, a solution wasimplemented using a TimeInvalidatedCache in DataPoolChecker to store the value of the mentioned property.

---
M src-test/src/org/openbravo/test/dal/DalTest.java
M src/org/openbravo/dal/service/DataPoolChecker.java
---
(0140985)
AugustoMauch   
2022-09-11 21:07   
Now this info is stored in a cache that expires after 1 minute. So, when modifying the configuration, it might take up to 1 minute to see it reflected on the backend
(0141029)
hgbot   
2022-09-12 16:30   
Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: bd2c1972cc299844756db288b027236ec5b472bb
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 12-09-2022 16:29:48
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/bd2c1972cc299844756db288b027236ec5b472bb [^]

Related to ISSUE-49780: Fixes condition to check if key is present

---
M src/org/openbravo/dal/service/DataPoolChecker.java
---
(0141042)
hgbot   
2022-09-13 11:11   
Merge Request created: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt/-/merge_requests/36 [^]
(0141045)
hgbot   
2022-09-13 11:51   
Repository: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt [^]
Changeset: 60ab612990c95dde40a58643929be767859ab193
Author: Álvaro Ferraz <alvaro.ferraz@openbravo.com>
Date: 13-09-2022 11:09:55
URL: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt/-/commit/60ab612990c95dde40a58643929be767859ab193 [^]

Related to ISSUE-49780: OBDal.getReadOnlyInstance used by SAFT process now requires weld

---
M src-test/com/practicsbs/saftpt/data/ExportSourceDocsTest.java
---
(0141046)
hgbot   
2022-09-13 11:51   
Merge request merged: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt/-/merge_requests/36 [^]