Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0045803Openbravo ERPA. Platformpublic2021-01-28 17:542021-01-29 10:08
cberner 
cberner 
normalminorhave not tried
closedfixed 
5
 
PR21Q2 
Core
No
0045803: MessageBar shows on top of all windows when tab is closed and some ActionHandler callback is still pending
A red/green message bar is shown on the top of the ERP(see attached screenshot) when some handler, for example (GetTabMessageActionHandler) finishes after the current tab(that executed that ActionHandler) has been closed.
1. Open ERP and login
2. Add a breakpoint at the start of GetTabMessageActionHandler.execute method
3. Open in ERP, Sales Order window
4. Create a new Order, and don't add any product lines.
5. Press "Book" and "OK" on the popup.
6. Check that the tomcat instance has stopped on the breakpoint placed earlier
7. Close the Sales Order tab in ERP
8. Resume execution in the tomcat instance

A red message bar will appear on top. Check screenshot attached.
Check in ob-standard-view.js in getTabMessage callback if the clientContext.messageBar/window is actually valid and not null. Only setMessage when it is valid.
No tags attached.
png redbarWindow.png (269,408) 2021-01-28 17:55
https://issues.openbravo.com/file_download.php?file_id=15286&type=bug
Issue History
2021-01-28 17:54cbernerNew Issue
2021-01-28 17:54cbernerAssigned To => cberner
2021-01-28 17:54cbernerModules => Core
2021-01-28 17:54cbernerTriggers an Emergency Pack => No
2021-01-28 17:55cbernerFile Added: redbarWindow.png
2021-01-28 18:02hgbotNote Added: 0125839
2021-01-29 10:08hgbotResolutionopen => fixed
2021-01-29 10:08hgbotStatusnew => closed
2021-01-29 10:08hgbotFixed in Version => PR21Q2
2021-01-29 10:08hgbotNote Added: 0125850
2021-01-29 10:08hgbotNote Added: 0125851

Notes
(0125839)
hgbot   
2021-01-28 18:02   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/292 [^]
(0125850)
hgbot   
2021-01-29 10:08   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 831e0eff80ddf49b9a1d5f85bc013e57116eaf6a
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 2021-01-29T10:02:49+01:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/831e0eff80ddf49b9a1d5f85bc013e57116eaf6a [^]

Fixes ISSUE-45803: MessageBar shows on top of all windows when tab is closed before ActionHandler

A red/green message bar appears on top if a tab is closed before a
process ActionHandler had time to return the results. This was due to
how the context is being checked in getTabMessage method, an wrong
clientContext.messageBar was being used without checking if it still
exists in the current window.

This fixes it by checking if the window contains the saved
clientContext element and it's the same as the one who called the
handler.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
---
(0125851)
hgbot   
2021-01-29 10:08   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/292 [^]