Openbravo Issue Tracking System - POS2
View Issue Details
0046914POS2POSpublic2021-06-01 08:202021-06-23 16:20
caristu 
prakashmurugesan88 
highmajorhave not tried
closedfixed 
5
 
 
No
0046914: Errors sending email must be caught
If there is an error during the processing of OBPOS2_SendEmail error (for example because the template generation failed), the message generated to make this processing is never deleted by the synchronization buffer as it will try to reprocess it forever. Thus, the subsequent messages to be synchronized in the backend will not be processed and they will be kept in the queue.

Besides all this issue happens silently, nothing is displayed in the UI to inform that there is a problem
0) Apply the attached patch in pos2 module which simulates an error processing the send email message
1) Configure pos to use the send email feature[1]
2) Send an email (it will fail due to the applied patch). Note that starting from this moment all the messages to be synchronized in the backend are kept in the queue and never processed...see attached image

[1] https://docs.google.com/document/d/1QhygcFWnc2rwRUe8EaC02e5c91xXeEA3w6XUplhTn5Q/edit#heading=h.mpsw99anuiy6 [^]
Do not allow sendEmail[1] to throw errors:

- In case of error it should be catched. This way the message will be processed by the synchronization buffer without errors and eventually deleted from the queue.

- In addition to catching the error, it should be managed and a message should be displayed to the user in order to inform about the problem

[1] https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/blob/master/web-jspack/org.openbravo.pos2/src/services/emailHandler.js#L34 [^]
No tags attached.
depends on backport 0047007TAP closed prakashmurugesan88 Errors sending email must be caught 
related to defect 0046915 closed jarmendariz No UI feedback in case of having failed messages in the synchronization buffer queue 
diff forceError_46914.diff (501) 2021-06-01 08:22
https://issues.openbravo.com/file_download.php?file_id=15862&type=bug
Issue History
2021-06-01 08:20caristuNew Issue
2021-06-01 08:20caristuAssigned To => Retail
2021-06-01 08:20caristuTriggers an Emergency Pack => No
2021-06-01 08:20caristuFile Added: errorQueue.png
2021-06-01 08:21caristuFile Deleted: errorQueue.png
2021-06-01 08:22caristuFile Added: forceError_46914.diff
2021-06-01 08:37caristuIssue cloned0046915
2021-06-01 08:37caristuRelationship addedrelated to 0046915
2021-06-01 08:38caristuResolution time => 1624312800
2021-06-01 10:32caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=22645#r22645
2021-06-07 15:06guilleaerStatusnew => scheduled
2021-06-07 15:06guilleaerStatusscheduled => acknowledged
2021-06-21 09:18prakashmurugesan88Assigned ToRetail => prakashmurugesan88
2021-06-21 09:18prakashmurugesan88Statusacknowledged => scheduled
2021-06-21 15:01hgbotNote Added: 0129695
2021-06-23 16:20hgbotResolutionopen => fixed
2021-06-23 16:20hgbotStatusscheduled => closed
2021-06-23 16:20hgbotNote Added: 0129745
2021-06-23 16:20hgbotNote Added: 0129746

Notes
(0129695)
hgbot   
2021-06-21 15:01   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/571 [^]
(0129745)
hgbot   
2021-06-23 16:20   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 0eef08d4e51a00cf1baa72b79761352cbdea30ac
Author: Prakash M <prakash@qualiantech.com>
Date: 2021-06-23T14:20:28+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/0eef08d4e51a00cf1baa72b79761352cbdea30ac [^]

Fixed BUG-46914: Caught errors in sending email and showed error message to user.
* Therefore message will be removed from synchronization buffer

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M web-jspack/org.openbravo.pos2/src/services/emailHandler.js
---
(0129746)
hgbot   
2021-06-23 16:20   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/571 [^]