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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0055974
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[POS2] Coremajorhave not tried2024-07-11 09:372024-07-15 11:28
ReporterAugustoMauchView Statuspublic 
Assigned Toablasco 
PrioritynormalResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0055974: An exception on a OnAppRenderAction will result in others not being executed, application starting "normally"

DescriptionDevelopers can define functions as OnAppRenderActions, that will be executed once the application is initially rendered, before the user can interact with it.

If any of those functions throw an exception, the other OnAppRenderActions that would be executed after, won't be, and the application will start normally. The application should not start normally, as there might be relevant business logic in the OnAppRenderActions that were not executed
Steps To Reproduce- Add an new OnAppRenderAction below this one: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/blob/master/web-jspack/org.openbravo.pos2/src/ob-init.js#L3311 [^]
- Put a breakpoint on the new OnAppRenderAction
- Log in vallblanca's with the current default POS role (VallBlancaUser). Check that the new OnAppRenderAction is executed (this is OK)
- Change vallblanca's default POS role to use VallBlancaManual. Log in again. Check that the new OnAppRenderAction is not executed (this is NOT OK). It is not executed because the openInitialCount threw an exception, because the VallBlancaManual role does not have access to a user action that is executed as part of that function.
Proposed Solution- Wrap this code on a try/catch block: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/blob/master/web-jspack/org.openbravo.core2/src/components/App/App.jsx#L36 [^]
- If the catch block captures an exception, show its message using the askConfirmation API and then log out
- Contact the POS team so that they decide what should be done about the exception in the openInitialCount OnAppRenderAction
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0166967)
hgbot (developer)
2024-07-15 11:28

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1543 [^]

- Issue History
Date Modified Username Field Change
2024-07-11 09:37 AugustoMauch New Issue
2024-07-11 09:37 AugustoMauch Assigned To => ablasco
2024-07-11 09:37 AugustoMauch Triggers an Emergency Pack => No
2024-07-15 11:28 hgbot Note Added: 0166967


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker