Openbravo Issue Tracking System - POS2 | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0051757 | POS2 | Core | public | 2023-03-02 11:53 | 2023-07-27 15:23 |
Reporter | gorka_gil | ||||
Assigned To | meriem_azaf | ||||
Priority | normal | Severity | major | Reproducibility | N/A |
Status | scheduled | Resolution | open | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Merge Request Status | |||||
Review Assigned To | |||||
OBNetwork customer | |||||
Support ticket | |||||
Regression level | |||||
Regression date | |||||
Regression introduced in release | |||||
Regression introduced by commit | |||||
Triggers an Emergency Pack | No | ||||
Summary | 0051757: StandardStep do not save initial value in context | ||||
Description | In a multiStep component that uses a standardStep, the initial values are not saved, so when navigating to the next step, the initial data is not saved. Note that on change of any field it is saved that field, but not the rest of fields. | ||||
Steps To Reproduce | Apply the diff included in the issue to revert a hack done. Enter in pos2, go to print labels (last entry in the left menu) don't edit any field, go to next step, in selector category select any category like for example 'food' select any product in the left list so it is added to the second list. ERROR 1: there is an error in the console: 'Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'scale')' If debugged and checkend in the context of the multistep, the initial values of the fields of the step1 have not been saved before navigating to step2. To debugg it: - in file PrintProductLabelProductListGrid.jsx - set a break point in line 45 - const { processData } = useMultiStepProcessContext(); - if we click next , procssData comes with properties with value undefined, if changing any value, comes with that value ERROR 2: - probably related to first one, the default values are not loaded till click on reset form. Default values can be edited on PrintProductLabel.config.json | ||||
Proposed Solution | Maybe it is needed to create a useEffect that only is executed once to call to setStepData the first time. Note that if returning to the step from another step this call to setStepData should not be executed again. Also default values are not loaded till click on reset form, maybe it is needed to execute a reset a form that also saves the initial values on the context. To edit the initial values can be done in : PrintProductLabel.config.json | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | org.openbravo.pos2.product.label.printing-51757.diff (1,086) 2023-07-04 09:29 https://issues.openbravo.com/file_download.php?file_id=18717&type=bug | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2023-03-02 11:53 | gorka_gil | New Issue | |||
2023-03-02 11:53 | gorka_gil | Assigned To | => Triage Platform Base | ||
2023-03-02 11:53 | gorka_gil | Triggers an Emergency Pack | => No | ||
2023-06-14 15:20 | rafaroda | Priority | high => urgent | ||
2023-06-14 15:20 | rafaroda | Severity | minor => major | ||
2023-06-23 09:30 | AugustoMauch | Status | new => closed | ||
2023-06-23 09:30 | AugustoMauch | Resolution | open => invalid | ||
2023-07-04 09:06 | gorka_gil | Status | closed => new | ||
2023-07-04 09:06 | gorka_gil | Resolution | invalid => open | ||
2023-07-04 09:29 | gorka_gil | File Added: org.openbravo.pos2.product.label.printing-51757.diff | |||
2023-07-04 09:43 | gorka_gil | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=26392#r26392 | ||
2023-07-04 09:43 | gorka_gil | Proposed Solution updated | |||
2023-07-04 09:47 | gorka_gil | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=26393#r26393 | ||
2023-07-04 10:47 | gorka_gil | Priority | urgent => normal | ||
2023-07-27 10:42 | meriem_azaf | Assigned To | Triage Platform Base => meriem_azaf | ||
2023-07-27 10:42 | meriem_azaf | Status | new => acknowledged | ||
2023-07-27 10:43 | meriem_azaf | Status | acknowledged => scheduled | ||
2023-07-27 15:23 | hgbot | Note Added: 0152950 |
Notes | |||||
|
|||||
|
|