Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0031344Openbravo ERPA. Platformpublic2015-11-03 17:402015-11-23 21:17
NaroaIriarte 
NaroaIriarte 
immediatemajoralways
closedfixed 
5
 
3.0PR16Q1 
caristu
Core
Coding ( Testing )
2015-10-27
http://code.openbravo.com/erp/devel/pi/rev/cbf2d65774b8afda5265c76b78642271a0a7246a [^] [^]
No
0031344: The email option does not work if the Attach by default preference is set.
It is not possible to send a document by email by clicking the email button if the "Attach by Default" preference is set as Y or as N.
-Go to Preference window.
-Create a new preference which property is "attach by default".
-Set the value as N.
-close the window and open the "Sales Order" window.
-Select a record and click on the email button.
-Realize that nothing happens.
No tags attached.
related to defect 0031317 closed NaroaIriarte Unexpected error thrown in the log having the Direct Print preference enabled 
caused by feature request 0030783 closed NaroaIriarte reduce the number of clicks to print documents 
Issue History
2015-11-03 17:40NaroaIriarteNew Issue
2015-11-03 17:40NaroaIriarteAssigned To => NaroaIriarte
2015-11-03 17:40NaroaIriarteModules => Core
2015-11-03 17:40NaroaIriarteRegression level => Coding ( Testing )
2015-11-03 17:40NaroaIriarteRegression date => 2015-10-27
2015-11-03 17:40NaroaIriarteRegression introduced by commit => http://code.openbravo.com/erp/devel/pi/rev/cbf2d65774b8afda5265c76b78642271a0a7246a [^] [^]
2015-11-03 17:40NaroaIriarteTriggers an Emergency Pack => No
2015-11-03 17:41NaroaIriarteRelationship addedcaused by 0030783
2015-11-03 17:41NaroaIriarteRelationship addedrelated to 0031317
2015-11-03 18:41caristuNote Added: 0081458
2015-11-03 18:41caristuNote Edited: 0081458bug_revision_view_page.php?bugnote_id=0081458#r10035
2015-11-03 18:41caristuNote Edited: 0081458bug_revision_view_page.php?bugnote_id=0081458#r10036
2015-11-04 09:09alostaleStatusnew => scheduled
2015-11-05 13:46NaroaIriarteReview Assigned To => alostale
2015-11-05 13:46NaroaIriarteIssue Monitored: NaroaIriarte
2015-11-05 13:46NaroaIriarteIssue Monitored: alostale
2015-11-05 13:56hgbotCheckin
2015-11-05 13:56hgbotNote Added: 0081522
2015-11-05 13:56hgbotStatusscheduled => resolved
2015-11-05 13:56hgbotResolutionopen => fixed
2015-11-05 13:56hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/95838980b8006505d39b25031a7a8a96f7e799f0 [^]
2015-11-06 11:02NaroaIriarteNote Added: 0081553
2015-11-09 09:52alostaleReview Assigned Toalostale => caristu
2015-11-09 11:26caristuNote Added: 0081616
2015-11-09 11:26caristuStatusresolved => closed
2015-11-09 11:26caristuFixed in Version => 3.0PR16Q1
2015-11-09 11:27caristuNote Edited: 0081616bug_revision_view_page.php?bugnote_id=0081616#r10109
2015-11-23 21:17hudsonbotCheckin
2015-11-23 21:17hudsonbotNote Added: 0082180

Notes
(0081458)
caristu   
2015-11-03 18:41   
The problem is caused because the PrinterReports servlet is used for both the email and print pop-up.

For this reason, the Attach by Default preference is preventing the appearance of the email pop-up.

To solve this problem, a good idea could be to send a parameter in the client (OB.ToolbarUtils.print) method that will allow PrinterReports to indentify the correct flow.

(0081522)
hgbot   
2015-11-05 13:56   
Repository: erp/devel/pi
Changeset: 95838980b8006505d39b25031a7a8a96f7e799f0
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Thu Nov 05 11:28:55 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/95838980b8006505d39b25031a7a8a96f7e799f0 [^]

Fixed issue 31344: The email option does not work wih attach by default.

When the attach by default preference was set, the email option was not working.
To fix this some classes have bennchanged:
OBViewTab.java to have a new parameter "emailButton" or "printButton" in the view.
In the ob-toolbar.js, in the OB.ToolbarUtils.print function now takes the new parameter and puts
it in the popupParams.
Thanks to that in the PrinterReports.java it is possible to catch that parameter from the
vars variable and if it is "emailButton" the logic which was failing at first is avoided.
That logic is only for the direct print and the attach by default and this has no sense in the case
of an email.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewTab.java
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
M src/org/openbravo/erpCommon/businessUtility/PrinterReports.java
---
(0081553)
NaroaIriarte   
2015-11-06 11:02   
A test in testlink has been added.

https://testlink.openbravo.com/testlink/linkto.php?tprojectPrefix=Communit&item=testcase&id=Communit-9906 [^]
(0081616)
caristu   
2015-11-09 11:26   
(edited on: 2015-11-09 11:27)
Code review + tested OK.

Tested with all the combinations of the preferences that could affect:

1- Direct Print (not defined), Attach by Default (not defined)
2- Direct Print (Y), Attach by Default (not defined)
3- Direct Print (N), Attach by Default (not defined)
4- Direct Print (Y), Attach by Default (Y)
5- Direct Print (Y), Attach by Default (N)
6- Direct Print (not defined), Attach by Default (Y)
7- Direct Print (not defined), Attach by Default (N)

(0082180)
hudsonbot   
2015-11-23 21:17   
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/7b56bebaaa88 [^]
Maturity status: Test