Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036170Openbravo ERP03. Procurement managementpublic2017-06-02 12:542017-06-08 17:12
vmromanos 
markmm82 
normalmajoralways
closedfixed 
5
 
3.0PR17Q3 
aferraz
Core
No
0036170: Improvements in GrantAccessToProcessDefinition module script to fix CI inestability
The GrantAccessToProcessDefinition module script is now in charge of:

1. Automatically add access to new Purchase Order Report (process definition) to manually created roles that previously had access to old Purchase Order Report (report and process). This part is working fine and should be kept as it is.

2. Show a warning message in the compilation when detecting that a role created from a dataset had access to the old Purchase Order Report, encouraging the user to either apply the dataset update or to manually set the access for the new report.

This part should be adapted. Instead of showing the warning, an alert should be created and assigned to the admin role and each of the affected roles. The alert will be text only (no SQL) informing about the problem


Note that test case "[porm-09] Verify modulescript comming from an old version" https://testlink.openbravo.com/testlink/linkto.php?tprojectPrefix=Communit&item=testcase&id=Communit-10638 [^] should be adapted accordingly
1. Get a 17Q2 instance and run install.source
2. Update it to PI
3. Run smartbuild -Dlocal=no
4. A Warning message will be shown in the GrantAccessToProcessDefinition execution.
Instead of a warning, an alert should be created for the affected roles and the admin role.
No tags attached.
depends on defect 0035718 closed airaceburu API Break on Purchase Order Report Modifications project (try-api 4815) 
depends on feature request 0033035 closed airaceburu New filters in Purchase Order Report 
depends on defect 0036171 closed vmromanos API Break on Purchase Order Report Modifications project 
Issue History
2017-06-02 12:54vmromanosNew Issue
2017-06-02 12:54vmromanosAssigned To => Triage Finance
2017-06-02 12:54vmromanosModules => Core
2017-06-02 12:54vmromanosTriggers an Emergency Pack => No
2017-06-02 12:55vmromanosRelationship addeddepends on 0035718
2017-06-02 12:55vmromanosRelationship addeddepends on 0033035
2017-06-02 13:09vmromanosRelationship addeddepends on 0036171
2017-06-02 13:11vmromanosDescription Updatedbug_revision_view_page.php?rev_id=15286#r15286
2017-06-02 13:36aferrazAssigned ToTriage Finance => markmm82
2017-06-02 14:51markmm82Statusnew => scheduled
2017-06-05 19:56markmm82Note Added: 0097151
2017-06-06 14:12hgbotCheckin
2017-06-06 14:12hgbotNote Added: 0097167
2017-06-06 18:01hgbotCheckin
2017-06-06 18:01hgbotNote Added: 0097170
2017-06-06 18:01hgbotStatusscheduled => resolved
2017-06-06 18:01hgbotResolutionopen => fixed
2017-06-06 18:01hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/0dd46aacb8d38571a1825ecaf4cd0ab2f125d82a [^]
2017-06-06 18:46aferrazReview Assigned To => aferraz
2017-06-06 18:46aferrazNote Added: 0097172
2017-06-06 18:46aferrazStatusresolved => closed
2017-06-06 18:46aferrazFixed in Version => 3.0PR17Q3
2017-06-08 17:12hudsonbotCheckin
2017-06-08 17:12hudsonbotNote Added: 0097246
2017-06-08 17:12hudsonbotCheckin
2017-06-08 17:12hudsonbotNote Added: 0097247

Notes
(0097151)
markmm82   
2017-06-05 19:56   
Test Plan:
Without apply the patch:
1. Get a 17Q2 instance and run install.source
2. Update it to PI, without apply the fix for this issue.
3. Run smartbuild -Dlocal=no
   Notice modulescript was skipped and was no applied. In log you can find "Skipped modulescripts..." message.
4. Run install.sample.data task
   This time the modulescript is applied and a Warning message will be shown in the GrantAccessToProcessDefinition execution with following message:
 "Role 'F&B España, S.A - Procurement (F&B International Group)' has access to legacy report 'Purchase Order Report'. You should either apply the dataset update on module 'Standard Roles' or manually grant access to new Process Definition, otherwise users belonging to this role won't be able to launch the report anymore."

5. Now, repeat steps 1 and 2.
6. Apply the fix.
7. Run smartbuild -Dlocal=no
8. Run install.sample.data task to execute the modulescript.
   Notice that warning explained in step 4 is not shown anymore.
9. Access as F&B Group Admin role.
   Check a new alert was created, and it is accessible at the menu.
10 Access the Alert Management window, in New alerts section you will find the created alert:
Alert rule: Grant Access To Process Definition.
Description: Role 'F&B España, S.A - Procurement (F&B International Group)' has access to legacy report 'Purchase
     Order Report'. You should either apply the dataset update on module 'Standard Roles' or manually grant access
    to new Process Definition, otherwise users belonging to this role won't be able to launch the report anymore.
Role: F&B España, S.A - Procurement.
11. Access as F&B España, S.A - Procurement.
   Check the new alert was accessible at the menu.
12. Change to other roles than F&B International Group Admin and F&B España, S.A - Procurement, and you will notice that alert is not available for them.
(0097167)
hgbot   
2017-06-06 14:12   
Repository: erp/devel/pi
Changeset: 7e8422bd22c033f97a98cdeae0a0efc6d6d1c6e7
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Jun 06 14:10:29 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/7e8422bd22c033f97a98cdeae0a0efc6d6d1c6e7 [^]

Related to issue 36170: Disable warning until issue is fixed

---
M src-util/modulescript/build/classes/org/openbravo/modulescript/GrantAccessToProcessDefinition.class
M src-util/modulescript/src/org/openbravo/modulescript/GrantAccessToProcessDefinition.java
---
(0097170)
hgbot   
2017-06-06 18:01   
Repository: erp/devel/pi
Changeset: 0dd46aacb8d38571a1825ecaf4cd0ab2f125d82a
Author: Mark <markmm82 <at> gmail.com>
Date: Mon Jun 05 13:39:41 2017 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/0dd46aacb8d38571a1825ecaf4cd0ab2f125d82a [^]

Fixes issue 36170: Improvements in GrantAccessToProcessDefinition modulescript

Instead of showing the warning when modulescript is applied, an alert is
created and assigned to the admin role and each of the affected roles informing
about the problem.

---
M src-util/modulescript/build/classes/org/openbravo/modulescript/GrantAccessToProcessDefinition.class
M src-util/modulescript/build/classes/org/openbravo/modulescript/GrantAccessToProcessDefinitionData.class
M src-util/modulescript/src/org/openbravo/modulescript/GrantAccessToProcessDefinition.java
M src-util/modulescript/src/org/openbravo/modulescript/GrantAccessToProcessDefinition_data.xsql
---
(0097172)
aferraz   
2017-06-06 18:46   
Code review + Testing OK
(0097246)
hudsonbot   
2017-06-08 17:12   
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/fda0f16ab470 [^]
Maturity status: Test
(0097247)
hudsonbot   
2017-06-08 17:12   
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/fda0f16ab470 [^]
Maturity status: Test