Openbravo Issue Tracking System - Retail Modules
View Issue Details
0046479Retail ModulesWeb POSpublic2021-05-04 10:442021-05-04 17:07
caristu 
caristu 
immediatecriticalhave not tried
closedfixed 
5
 
RR21Q3 
No
0046479: 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.
depends on backport 0046489RR21Q2 closed ranjith_qualiantech_com Retail Modules action preparation order is modified when the action fails 
depends on backport 0046490RR21Q1.2 closed ranjith_qualiantech_com Retail Modules action preparation order is modified when the action fails 
depends on backport 0046491RR20Q4.4 closed ranjith_qualiantech_com Retail Modules action preparation order is modified when the action fails 
related to backport 0046505TAP closed guilleaer POS2 action preparation order is modified when the action fails 
Issue History
2021-05-04 10:44caristuNew Issue
2021-05-04 10:44caristuAssigned To => Retail
2021-05-04 10:44caristuTriggers an Emergency Pack => No
2021-05-04 10:46caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=22436#r22436
2021-05-04 10:50caristuDescription Updatedbug_revision_view_page.php?rev_id=22438#r22438
2021-05-04 10:50hgbotNote Added: 0127765
2021-05-04 11:23caristuPriorityurgent => immediate
2021-05-04 11:23caristuSeveritymajor => critical
2021-05-04 17:06marvintmStatusnew => scheduled
2021-05-04 17:06marvintmAssigned ToRetail => caristu
2021-05-04 17:07hgbotResolutionopen => fixed
2021-05-04 17:07hgbotStatusscheduled => closed
2021-05-04 17:07hgbotFixed in Version => RR21Q3
2021-05-04 17:07hgbotNote Added: 0127776
2021-05-04 17:07hgbotNote Added: 0127777
2021-05-05 09:33guilleaerRelationship addedrelated to 0046505

Notes
(0127765)
hgbot   
2021-05-04 10:50   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/219 [^]
(0127776)
hgbot   
2021-05-04 17:07   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: 6e451c3c466f23d57d6b7889ea9ebcb9ef209f09
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 2021-05-04T10:58:05+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/6e451c3c466f23d57d6b7889ea9ebcb9ef209f09 [^]

fixes ISSUE-46479: action preparation order is modified when the action fails

---
M web-test/model/application-state/State.test.js
M web/org.openbravo.mobile.core/app/model/application-state/State.js
---
(0127777)
hgbot   
2021-05-04 17:07   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/219 [^]