Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0031317
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminoralways2015-10-30 14:252015-11-23 21:17
ReportercaristuView Statuspublic 
Assigned ToNaroaIriarte 
PriorityimmediateResolutionfixedFixed in Version3.0PR16Q1
StatusclosedFix in branchFixed in SCM revision8834bc491f13
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
ModulesCore
Regression levelCoding ( Testing )
Regression date2015-10-27
Regression introduced in releasepi
Regression introduced by commithttp://code.openbravo.com/erp/devel/pi/rev/cbf2d65774b8afda5265c76b78642271a0a7246a [^]
Triggers an Emergency PackNo
Summary

0031317: Unexpected error thrown in the log having the Direct Print preference enabled

DescriptionThe following error is raised in the log having the Direct Print preference enabled:

ERROR org.openbravo.erpCommon.utility.reporting.printing.PrintOrders - Error captured:
javax.servlet.ServletException: Configuration Error no sender defined
    at org.openbravo.erpCommon.utility.reporting.printing.PrintController.post(PrintController.java:291)
    at org.openbravo.erpCommon.utility.reporting.printing.PrintOrders.doPost(PrintOrders.java:55)
    at org.openbravo.base.HttpBaseServlet.doGet(HttpBaseServlet.java:280)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
Steps To Reproduce1) Go to the [Preference] window and create a new record with the following information:

  - Property: Direct Print
  - Value: Y
  - Window: Sales Order
  - User: Openbravo

2) Log-out and log-in with Openbravo user.
3) Go to the [Sales Order] window, select any record in the header.
4) Click on the print button of the toolbar
Proposed SolutionThis is caused because having this preference enabled, in the PrintController class the getServletPath() of the request does not contain "print.html" but "printoptions.html". So the servlet is interpreting that we are trying to email the document because of this:

request.getServletPath().toLowerCase().indexOf("print.html")

Proposed fix attached.
TagsNo tags attached.
Attached Filesdiff file icon issue31317.diff [^] (2,030 bytes) 2015-10-30 14:50 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to feature request 0030783 closedNaroaIriarte reduce the number of clicks to print documents 
related to defect 0031344 closedNaroaIriarte The email option does not work if the Attach by default preference is set. 

-  Notes
(0081459)
hgbot (developer)
2015-11-04 09:01

Repository: erp/devel/pi
Changeset: 8834bc491f13275f291dfe0f4b5f9fed3bd3c302
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Tue Nov 03 18:00:53 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/8834bc491f13275f291dfe0f4b5f9fed3bd3c302 [^]

Fixed issue 31317: The error shown in the log is fixed.

There was an error shown in the log because the servlet was interpreting that it was an email.
That was caused because a condition was not taking into account nothing else but the request.getServletPath as
"print.html".
This has been changed and now "printoptions.html" is taken into account.

---
M src/org/openbravo/erpCommon/utility/reporting/printing/PrintController.java
---
(0081611)
caristu (developer)
2015-11-09 10:24

This check when the input command is ADD should be removed:

else if (request.getServletPath().toLowerCase().indexOf(SEND_PATH) != -1) {

Because it is causing the add attachment feature on emailing to stop working.
(0081612)
caristu (developer)
2015-11-09 10:28

Reopening to delete the (not needed) check for "ADD" command on PrintController.
(0081629)
hgbot (developer)
2015-11-09 17:04

Repository: erp/devel/pi
Changeset: 710400f712640e3e88b904d32a7bb8e508014c22
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Mon Nov 09 12:58:54 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/710400f712640e3e88b904d32a7bb8e508014c22 [^]

Related with issue 31317: The condition when the command is ADD is removed.

The "else if (request.getServletPath().toLowerCase().indexOf(SEND_PATH) != -1) {"
Condition should be removed for the correct behaviour of the attachments in the email sending.

---
M src/org/openbravo/erpCommon/utility/reporting/printing/PrintController.java
---
(0081646)
caristu (developer)
2015-11-10 13:02
edited on: 2015-11-10 13:02

Code review + tested OK:

- The error is not shown in the log.
- Both email and print dialogs are displayed correctly. The pop-up is not broken after attach a file to be sent by email.
- The print direct feature works fine.

(0082170)
hudsonbot (developer)
2015-11-23 21:16

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
(0082190)
hudsonbot (developer)
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

- Issue History
Date Modified Username Field Change
2015-10-30 14:25 caristu New Issue
2015-10-30 14:25 caristu Assigned To => caristu
2015-10-30 14:25 caristu Modules => Core
2015-10-30 14:25 caristu Triggers an Emergency Pack => No
2015-10-30 14:26 caristu Relationship added related to 0030783
2015-10-30 14:28 caristu Assigned To caristu => platform
2015-10-30 14:50 caristu File Added: issue31317.diff
2015-10-30 14:50 caristu Proposed Solution updated
2015-10-30 14:52 caristu Proposed Solution updated
2015-11-02 13:33 alostale Assigned To platform => NaroaIriarte
2015-11-02 13:33 alostale Priority normal => immediate
2015-11-02 13:33 alostale Status new => acknowledged
2015-11-02 13:35 alostale Regression level => Coding ( Testing )
2015-11-02 13:35 alostale Regression date => 2015-10-27
2015-11-02 13:35 alostale Regression introduced in release => pi
2015-11-02 13:35 alostale Regression introduced by commit => http://code.openbravo.com/erp/devel/pi/rev/cbf2d65774b8afda5265c76b78642271a0a7246a [^]
2015-11-02 13:36 alostale Status acknowledged => scheduled
2015-11-03 17:41 NaroaIriarte Relationship added related to 0031344
2015-11-04 09:01 hgbot Checkin
2015-11-04 09:01 hgbot Note Added: 0081459
2015-11-04 09:01 hgbot Status scheduled => resolved
2015-11-04 09:01 hgbot Resolution open => fixed
2015-11-04 09:01 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/8834bc491f13275f291dfe0f4b5f9fed3bd3c302 [^]
2015-11-04 09:16 alostale Review Assigned To => alostale
2015-11-09 09:52 alostale Review Assigned To alostale => caristu
2015-11-09 10:24 caristu Note Added: 0081611
2015-11-09 10:28 caristu Note Added: 0081612
2015-11-09 10:28 caristu Status resolved => new
2015-11-09 10:28 caristu Resolution fixed => open
2015-11-09 17:04 hgbot Checkin
2015-11-09 17:04 hgbot Note Added: 0081629
2015-11-10 09:43 NaroaIriarte Status new => scheduled
2015-11-10 09:43 NaroaIriarte Status scheduled => resolved
2015-11-10 09:43 NaroaIriarte Fixed in Version => pi
2015-11-10 09:43 NaroaIriarte Resolution open => fixed
2015-11-10 13:02 caristu Note Added: 0081646
2015-11-10 13:02 caristu Status resolved => closed
2015-11-10 13:02 caristu Fixed in Version pi => 3.0PR16Q1
2015-11-10 13:02 caristu Note Edited: 0081646 View Revisions
2015-11-23 21:16 hudsonbot Checkin
2015-11-23 21:16 hudsonbot Note Added: 0082170
2015-11-23 21:17 hudsonbot Checkin
2015-11-23 21:17 hudsonbot Note Added: 0082190


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker