Openbravo Issue Tracking System - POS2
View Issue Details
0046505POS2Corepublic2021-05-05 09:332021-05-05 09:42
guilleaer 
guilleaer 
normalcriticalhave not tried
closedfixed 
5
 
TAPTAP 
caristu
No
0046505: action preparation order is modified when the action fails
When an action fails, the action preparation rollback mechanism is executed[1].

This mechanism executes all the rollback functions of each action preparation in reverse order.

In order to retrieve the reversed order of rollback functions we are using the reverse function[2]. Note that reverse function mutates the original array[3].

In practice, this means that if an action fails, the next time it is executed the action preparations are executed in reversed order.

[1] http://wiki.openbravo.com/wiki/StateController#Action_Preparations [^] [^]
[2] https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/blob/master/web/org.openbravo.mobile.core/app/model/application-state/State.js#L60 [^] [^]
[3] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse [^] [^]
1) Put mobile.core in this branch:
2) Execute the State.test.js which contains a reproducer for the situation described in Description
3) Note that the test fails
No tags attached.
related to defect 0046479 closed caristu Retail Modules action preparation order is modified when the action fails 
Issue History
2021-05-05 09:33guilleaerNew Issue
2021-05-05 09:33guilleaerAssigned To => caristu
2021-05-05 09:33guilleaerResolution time => 1620424800
2021-05-05 09:33guilleaerTriggers an Emergency Pack => No
2021-05-05 09:33guilleaerRelationship addedrelated to 0046479
2021-05-05 09:34guilleaerStatusnew => acknowledged
2021-05-05 09:37guilleaerStatusacknowledged => scheduled
2021-05-05 09:37guilleaerAssigned Tocaristu => guilleaer
2021-05-05 09:37guilleaerNote Added: 0127812
2021-05-05 09:37guilleaerStatusscheduled => resolved
2021-05-05 09:37guilleaerFixed in Version => TAP
2021-05-05 09:37guilleaerResolutionopen => fixed
2021-05-05 09:37guilleaerReview Assigned To => caristu
2021-05-05 09:42caristuStatusresolved => closed

Notes
(0127812)
guilleaer   
2021-05-05 09:37   
https://gitlab.com/obcustomers/AGAP/org.openbravo.mobile.core/-/commit/c61423a9d7c4c0593f2ca7fd5992dd5b37b44154 [^]