Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020277Openbravo ERPA. Platformpublic2012-04-16 15:262012-05-28 10:19
rgoris 
guilleaer 
normalminoralways
closedfixed 
5
 
 
Core
No
0020277: Attachment upload process keeps on going when navigating away
This is mostly an issue for large attachments. When it takes more than a few secs to upload an attachment, and the user navigates to another tab or record during the upload, the uploading process seems to continue (as indicated by the spinning loading button on the attachment button in the toolbar) but in fact it is suspended.
Upload a large file. While in progress, close the form view or navigate to the workspace.
Either kill the process (and warn the user before doing so: "An attachment is being uploaded at the moment. Navigating away aborts the upload. Do you want to continue? Continue | Cancel "

or

Continue uploading in the background. This is desired behavior and would be an excellent example of multi-tasking in a browser in OB. Can we have this please?
No tags attached.
png AttachmentKeepsOnGoing.PNG (47,794) 2012-04-16 15:26
https://issues.openbravo.com/file_download.php?file_id=5135&type=bug
png

png UploadProblem.png (35,411) 2012-05-10 11:32
https://issues.openbravo.com/file_download.php?file_id=5207&type=bug
png
Issue History
2012-04-16 15:26rgorisNew Issue
2012-04-16 15:26rgorisAssigned To => alostale
2012-04-16 15:26rgorisFile Added: AttachmentKeepsOnGoing.PNG
2012-04-16 15:26rgorisModules => Core
2012-04-19 08:44alostaleAssigned Toalostale => guilleaer
2012-05-10 08:49guilleaerNote Added: 0048532
2012-05-10 11:31rgorisNote Added: 0048547
2012-05-10 11:32rgorisFile Added: UploadProblem.png
2012-05-10 11:40rgorisNote Added: 0048548
2012-05-15 09:15hgbotCheckin
2012-05-15 09:15hgbotNote Added: 0048641
2012-05-15 09:15hgbotStatusnew => resolved
2012-05-15 09:15hgbotResolutionopen => fixed
2012-05-15 09:15hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/eea6e57d240485e04bec6afe341dd85e00986c9b [^]
2012-05-15 09:45guilleaerNote Added: 0048642
2012-05-22 10:40rgorisNote Added: 0048849
2012-05-22 10:40rgorisStatusresolved => closed
2012-05-25 12:12hudsonbotCheckin
2012-05-25 12:12hudsonbotNote Added: 0049128
2012-05-28 10:19AugustoMauchNote Added: 0049340

Notes
(0048532)
guilleaer   
2012-05-10 08:49   
I was checking the attachments upload behavior and it doesn't match with the issue description.

When a large upload is being uploaded, close the window is not a problem because the upload continues. The problem is that you will not see anything that indicates that the upload is in process. Another problem is that you will never see anything that indicates that the upload process has finished. It happens because the callback function belongs to the tab which started the upload, but t if this window was closed the callback doesn't exist.

Other problem that I could reproduce is the concurrent upload. OB framework doesn't allow to upload two files at the same time (regardless the tab or window). If a file is being uploaded and the user uploads another file, the upload process of the first file is cancelled.

Proposed solution: Receive the reponse of the uploads in a new general callback which will call to the specific callback of the tab. This new callback can manage the number of upload in progress.

Do a research to show the uploads in progress in a new UI component which will be visible always (until the upload is finished).

Inform to user that one upload is in progress before upload a new file and block this action until the upload is completed.
(0048547)
rgoris   
2012-05-10 11:31   
Yes, i agree. Here´s my suggestion to resolve this issue in a simple manner:

- Upload in progress on a tab is indicated by a spinner that replaces the paperclip button icon in the toolbar. This is OK currently, no change needed.
- When you try to upload another attachment while the current upload is still in progress, then the user must be informed: The preferred feedback style is using a modal popup (as it is about cross-tabs), see image attached.
(0048548)
rgoris   
2012-05-10 11:40   
(pasted text for message above)

Attachment Upload Problem

The attachment cannot be uploaded because another
attachment is being uploaded on a different tab.
Wait before the other upload finishes and try again.
(0048641)
hgbot   
2012-05-15 09:15   
Repository: erp/devel/pi
Changeset: eea6e57d240485e04bec6afe341dd85e00986c9b
Author: Guillermo Álvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Tue May 15 09:10:03 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/eea6e57d240485e04bec6afe341dd85e00986c9b [^]

Fixed issue 20277: Two files cannot be uploaded simultaneously

A new general callback has been added to manage the uploads and to avoid undesired cancelation of uploads which are in progress.

---
M modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form-attachments.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js
M src/org/openbravo/erpCommon/businessUtility/TabAttachments.java
---
(0048642)
guilleaer   
2012-05-15 09:45   
Test plan:

Because in a local environment the file upload is too fast, this test should be done using a remote connection to the server.

1. Logged as F&B Int Group Admin
2. Go to products window
3. Open the product header tab in view form (Electricity)
4. Open the associated price in view form (Other services)
5. Attach a big file in the product header
6. During the upload process try to upload an attachment for the price
7. A pop up should be shown
8. If "No" is selected the new upload will not be done and the previous upload will continue.
9. If "yes" is selected the previous upload will be cancelled and the new upload will start
10. The toolbar icons and the list of attachments of the tab where the upload has been cancelled indicates that upload has finished. (with this tab has the focus)
11. The toolbar icons and the list of attachments of the tab where the new upload has been done indicates that upload is in progress

This test can also be done with tabs from different windows.

This fix is not risky
(0048849)
rgoris   
2012-05-22 10:40   
Tested and approved
(0049128)
hudsonbot   
2012-05-25 12: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/5401e185a8b0 [^]

Maturity status: Test
(0049340)
AugustoMauch   
2012-05-28 10:19   
Code reviewed and verified in pi@520938516719