Notes |
|
|
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
---
|
|
|
|
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
|
|
|
|
|
|
|
|
Code reviewed and verified in pi@520938516719 |
|