Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
ID | ||||||||||||
0051757 | ||||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
design defect | [POS2] Core | major | N/A | 2023-03-02 11:53 | 2023-07-27 15:23 | |||||||
Reporter | gorka_gil | View Status | public | |||||||||
Assigned To | meriem_azaf | |||||||||||
Priority | normal | Resolution | open | Fixed in Version | ||||||||
Status | scheduled | Fix in branch | Fixed in SCM revision | |||||||||
Projection | none | ETA | none | Target Version | ||||||||
OS | Any | Database | Any | Java version | ||||||||
OS Version | Database version | Ant version | ||||||||||
Product Version | SCM revision | |||||||||||
Review Assigned To | ||||||||||||
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 | |||||||||||
Tags | No tags attached. | |||||||||||
Attached Files | org.openbravo.pos2.product.label.printing-51757.diff [^] (1,086 bytes) 2023-07-04 09:29 [Show Content] | |||||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
Notes | |
(0152950) hgbot (developer) 2023-07-27 15:23 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1185 [^] |
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 | View Revisions |
2023-07-04 09:43 | gorka_gil | Proposed Solution updated | |
2023-07-04 09:47 | gorka_gil | Steps to Reproduce Updated | View Revisions |
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 |
Copyright © 2000 - 2009 MantisBT Group |