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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0029329
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2015-03-18 10:452016-06-17 19:36
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PrioritynormalResolutionfixedFixed in Version3.0PR15Q2
StatusclosedFix in branchFixed in SCM revision05e26fa3fabe
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned ToAugustoMauch
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0029329: can't download attachments for 2 files with same name and without extension

DescriptionIf two different records have attached a file with the same name which has not extension, it fails when trying to download attachments for the two files at once.
Steps To Reproduce-Crate file: echo a > /tmp/a
-Open Sales Order
-Attach /tmp/a to record with docNo 1000000
-Attach /tmp/a to record with docNo 1000001
-Go to grid view and select records 1000000 and 1000001
-Click on attachments toolbar button and try to download
  --> ERROR: openbravo.log shows:
867f0e26 1041029 [http-8080-1] ERROR org.openbravo.erpCommon.businessUtility.TabAttachments - Error while downloading attachments
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(String.java:1911)
    at org.openbravo.erpCommon.businessUtility.TabAttachments.printPageFileMultiple(TabAttachments.java:311)

- Try to open downloaded zip file
  --> ERROR: it can't be opened as it is currupt
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00293133.0PR15Q2 closedalostale Download attachments selecting several records is not working fine 

-  Notes
(0075727)
hgbot (developer)
2015-03-18 10:51

Repository: erp/devel/pi
Changeset: e7c1d9e51ba80ec128229240fcd37cdb020ad051
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed Mar 18 10:50:25 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/e7c1d9e51ba80ec128229240fcd37cdb020ad051 [^]

fixed bug 29329: can't download attachments for 2 rows with same name & no ext

  When trying to download at once attachemnts for different records that have the
  same name and it does not have extension, it fails.

  The problem is in case of duplicated names to be included within the zipped file,
  a number is appended to the file name before the extension. Extesion is present
  is assumed, failing if not.

  Fix: don't assume file name has extension.

---
M src/org/openbravo/erpCommon/businessUtility/TabAttachments.java
---
(0075788)
AugustoMauch (manager)
2015-03-20 12:20

Code reviewed and verified in pi@b7fd6844f03f
(0075830)
hudsonbot (developer)
2015-03-20 19:23

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/a670497786d1 [^]
Maturity status: Test
(0085697)
hgbot (developer)
2016-04-18 13:02

Repository: erp/devel/pi
Changeset: 05e26fa3fabe5a8585f931e2d5a7381068ab5def
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed Mar 18 10:50:25 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/05e26fa3fabe5a8585f931e2d5a7381068ab5def [^]

fixed bug 29329: can't download attachments for 2 rows with same name & no ext

  When trying to download at once attachemnts for different records that have the
  same name and it does not have extension, it fails.

  The problem is in case of duplicated names to be included within the zipped file,
  a number is appended to the file name before the extension. Extesion is present
  is assumed, failing if not.

  Fix: don't assume file name has extension.

---
M src/org/openbravo/erpCommon/businessUtility/TabAttachments.java
---
(0085735)
gorkaion (developer)
2016-04-19 09:55

issue reopened by attachment enhancement project merge. checked that it is not reproduced.
(0087456)
hudsonbot (developer)
2016-06-17 19:36

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/0dc7be081b1c [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2015-03-18 10:45 alostale New Issue
2015-03-18 10:45 alostale Assigned To => alostale
2015-03-18 10:45 alostale Modules => Core
2015-03-18 10:45 alostale Triggers an Emergency Pack => No
2015-03-18 10:45 alostale Relationship added related to 0029313
2015-03-18 10:46 alostale Review Assigned To => AugustoMauch
2015-03-18 10:51 hgbot Checkin
2015-03-18 10:51 hgbot Note Added: 0075727
2015-03-18 10:51 hgbot Status new => resolved
2015-03-18 10:51 hgbot Resolution open => fixed
2015-03-18 10:51 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e7c1d9e51ba80ec128229240fcd37cdb020ad051 [^]
2015-03-20 12:20 AugustoMauch Note Added: 0075788
2015-03-20 12:20 AugustoMauch Status resolved => closed
2015-03-20 12:20 AugustoMauch Fixed in Version => 3.0PR15Q2
2015-03-20 19:23 hudsonbot Checkin
2015-03-20 19:23 hudsonbot Note Added: 0075830
2016-04-18 13:02 hgbot Checkin
2016-04-18 13:02 hgbot Note Added: 0085697
2016-04-18 13:02 hgbot Status closed => resolved
2016-04-18 13:02 hgbot Fixed in SCM revision http://code.openbravo.com/erp/devel/pi/rev/e7c1d9e51ba80ec128229240fcd37cdb020ad051 [^] => http://code.openbravo.com/erp/devel/pi/rev/05e26fa3fabe5a8585f931e2d5a7381068ab5def [^]
2016-04-19 09:55 gorkaion Note Added: 0085735
2016-04-19 09:55 gorkaion Status resolved => closed
2016-06-17 19:36 hudsonbot Checkin
2016-06-17 19:36 hudsonbot Note Added: 0087456


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker