Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036245Openbravo ERP09. Financial managementpublic2017-06-13 15:452018-01-03 12:38
collazoandy4 
collazoandy4 
normalmajoralways
closedfixed 
5
 
3.0PR18Q1 
dmiguelez
Core
No
0036245: Prevent user to launch Journal Entries Report more than one time
User is able to run Journal Entries Report several times. In case this is done in an environment with huge amount of accounting data system will crash
1. Access to Journal Entries Report and set any filtering criteria
2. Press Search button and realize that button is not disabled so report can be launched several times. In case this is done in an environment with huge amount of data server could crash
No tags attached.
related to design defect 0035947 new Triage Omni OMS Prevent user to launch accounting reports more than one time 
diff 36245.diff (55,098) 2017-06-16 11:47
https://issues.openbravo.com/file_download.php?file_id=10858&type=bug
Issue History
2017-06-13 15:45collazoandy4New Issue
2017-06-13 15:45collazoandy4Assigned To => Triage Finance
2017-06-13 15:45collazoandy4Modules => Core
2017-06-13 15:45collazoandy4Triggers an Emergency Pack => No
2017-06-13 15:47collazoandy4Relationship addedrelated to 0035947
2017-06-14 15:52collazoandy4Statusnew => scheduled
2017-06-14 15:53collazoandy4Assigned ToTriage Finance => collazoandy4
2017-06-16 11:47aferrazFile Added: 36245.diff
2017-11-13 09:25dmiguelezNote Added: 0100467
2017-11-13 09:29dmiguelezNote Added: 0100468
2017-11-13 09:30hgbotCheckin
2017-11-13 09:30hgbotNote Added: 0100469
2017-11-13 09:30hgbotStatusscheduled => resolved
2017-11-13 09:30hgbotResolutionopen => fixed
2017-11-13 09:30hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/baf17a45d7488c08ebc212f24ac60b4ddc9d9ab4 [^]
2017-11-13 09:30hgbotCheckin
2017-11-13 09:30hgbotNote Added: 0100470
2017-11-13 09:30dmiguelezReview Assigned To => dmiguelez
2017-11-13 09:30dmiguelezNote Added: 0100471
2017-11-13 09:30dmiguelezStatusresolved => closed
2017-11-13 09:56dmiguelezFixed in Version => 3.0PR18Q1
2018-01-03 12:38hudsonbotCheckin
2018-01-03 12:38hudsonbotNote Added: 0101413
2018-01-03 12:38hudsonbotCheckin
2018-01-03 12:38hudsonbotNote Added: 0101414

Notes
(0100467)
dmiguelez   
2017-11-13 09:25   
Test Plan (Needs To be able to debug):

Set Up

As System Administrator
Go to Preferences window and select the record with Attribute: ReportsUserExecutionsLimit
  Set it's value to: 3
Select the record with Attribute: ReportsExecutionsLimit
  Set it's value to: 2

In the IDE (Eclipse) open the class ReportGeneralLedgerJournal and set a breakpoint in line 215:
" String strcAcctSchemaId = vars.getRequestGlobalVariable("inpcAcctSchemaId",
            "ReportGeneralLedger|cAcctSchemaId");"


Enable users

As F&B Admin
Go to User Window
  Set active='Y' for users QAAdmin and F&B Admin
  Set 'openbravo' as password for both of them


Test 1 (Executions per user)

As F&B Admin
Go to General Ledger Journal Report
  Launch the report with any parameters.
  (Since there is a debug point, no report will be shown)
Try to launch the report 3 more times
  A warning message is shown stating that the number of executions per user has been reached


Test 2 (Executions in total)

With three different browser sessions (can be achieved by using different browsers or different users in crhome or by using incognito mode)

Openbravo user:
  Go to General Ledger Journal Report
  Launch the report with any parameters.
  (Since there is a debug point, no report will be shown)

QAAdmin user:
  Go to General Ledger Journal Report
  Launch the report with any parameters.
  (Since there is a debug point, no report will be shown)

F&B Admin user:
  Try to launch the report again
  A warning message is shown stating that the number of executions in total has been reached


Test 3 (Mix of both previous tests)

With two different browser sessions (can be achieved by using different browsers or different users in crhome or by using incognito mode)

Openbravo user:
  Go to General Ledger Journal Report
  Launch the report with any parameters.
  (Since there is a debug point, no report will be shown)

QAAdmin user:
  Go to General Ledger Journal Report
  Launch the report with any parameters.
  (Since there is a debug point, no report will be shown)
  Try to launch the report 3 more times
  A warning message is shown stating that the number of executions per user has been reached
(0100468)
dmiguelez   
2017-11-13 09:29   
Test Plan (Needs To be able to debug):

Set Up

As System Administrator
Go to Preferences window and select the record with Attribute: ReportsUserExecutionsLimit
  Set it's value to: 0
Select the record with Attribute: ReportsExecutionsLimit
  Set it's value to: 0

In the IDE (Eclipse) open the class ReportGeneralLedgerJournal and set a breakpoint in line 215:
" String strcAcctSchemaId = vars.getRequestGlobalVariable("inpcAcctSchemaId",
            "ReportGeneralLedger|cAcctSchemaId");"


Enable users

As F&B Admin
Go to User Window
  Set active='Y' for users QAAdmin and F&B Admin
  Set 'openbravo' as password for both of them


Test 1 (Executions per user)

As F&B Admin
Go to General Ledger Journal Report
  Launch the report with any parameters.
  (Since there is a debug point, no report will be shown)
Try to launch the report as many times as possible, there is no warning shown.


Test 2 (Executions in total)

With three different browser sessions (can be achieved by using different browsers or different users in crhome or by using incognito mode)

Openbravo user:
  Go to General Ledger Journal Report
  Launch the report with any parameters.
  (Since there is a debug point, no report will be shown)

QAAdmin user:
  Go to General Ledger Journal Report
  Launch the report with any parameters.
  (Since there is a debug point, no report will be shown)

F&B Admin user:
  Try to launch the report again
  No warning is shown regardless how many times the report is launched and regardless the number of users that are launching it.
(0100469)
hgbot   
2017-11-13 09:30   
Repository: erp/devel/pi
Changeset: baf17a45d7488c08ebc212f24ac60b4ddc9d9ab4
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Thu Nov 09 21:45:55 2017 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/baf17a45d7488c08ebc212f24ac60b4ddc9d9ab4 [^]

Fixes issue 36245: Prevent user to launch Journal Entries Report more than once

User is able to run Journal Entries Report several times. In case this is
done in an environment with huge amount of accounting data system will crash.

Now two new preferences are created to limit the user report runs.
Preferences will have a value of 0 to avoid changing the default behaviour.

The report now show an error message when the user exceeds the
ReportsUserExecutionsLimit or ReportsExecutionsLimit preference
values when he runs the report.

Use advise() to show error when launching in HTML and advisePopUp
when launching in PDF/XLS.

Run report only if execution limit error was not thrown.
Execution number will be increased always before checking
if limits are reached and they will be decreased always after
throwing the error or running the report, inside finally statement.
reportExecutions variable will be initialized again to zero in case
it goes to negative by mistake.

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M src-db/database/sourcedata/AD_PREFERENCE.xml
M src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.java
---
(0100470)
hgbot   
2017-11-13 09:30   
Repository: erp/devel/pi
Changeset: cac8d0129e63f774f31244d770c9a4ccf0f4488e
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Mon Nov 13 09:28:20 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/cac8d0129e63f774f31244d770c9a4ccf0f4488e [^]

Related to Issue 36245. When the preferences values are 0, behave
as previously. This means that the preferences should not be checked
in this case.

---
M src-db/database/sourcedata/AD_PREFERENCE.xml
M src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.java
---
(0100471)
dmiguelez   
2017-11-13 09:30   
Code Review + Testing Ok
(0101413)
hudsonbot   
2018-01-03 12:38   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/c81e0d3cbab5 [^]
Maturity status: Test
(0101414)
hudsonbot   
2018-01-03 12:38   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/c81e0d3cbab5 [^]
Maturity status: Test