Openbravo Issue Tracking System - POS2
View Issue Details
0046411POS2POSpublic2021-04-26 12:342021-05-10 08:14
jmelin 
ranjith_qualiantech_com 
urgentmajoralways
closedfixed 
30Openbravo Appliance 14.04
 
TAPTAP 
guilleaer
No
0046411: JIRA 1731 - BP Assignation - message 'Cannot read property 'properties' of undefined'
This issue can not be reproduced on livebuild because the restaurant filter is not available.
1. Connect to POS
2. Search for a customer without changing the value in the YES/NO combo.
- Check that the result is correctly showed
3. Open the YES/NO combo and select the Default value
- Check that the error in the image (Cannot read property 'properties' of undefined) is showed.


In the Chrome Dev tools we can see that the failing row is the one marked in ***
  const searchBusinessPartners = async formState => {
    let filters = {};
    const filterValues = formState.fields;
    // filterValues keep in handler because it is necessary recover filterValues when back to search
    customerSelectorHandler.setFilterValues(filterValues);
    if (filterValues) {
 *** filters = Object.entries(filterValues).map(([key, value]) => {
        const foundComponent = formState.componentList.find(
          component => component.properties.name === key
        );
        return {
          column: key,
          hqlFilter: undefined,
          isId: undefined,
          operator: '=',
          value: value.value,
          label: foundComponent.properties.label
        };
      });
    }

The error in the console is:
VM943:1 Uncaught ReferenceError: filterValues is not defined
    at eval (eval at <anonymous> (CustomerSelector.jsx:82), <anonymous>:1:16)
    at CustomerSelector.jsx:82
    at Array.map (<anonymous>)
    at Ie.l.addFormAction.validateForm (CustomerSelector.jsx:72)
    at Ce.execute (FormHandler.js:133)
    at A (BaseForm.jsx:388)3

No tags attached.
blocks defect 0046352 closed ranjith_qualiantech_com JIRA 1731 - BP Assignation - message 'Cannot read property 'properties' of undefined' 
Issue History
2021-04-29 10:29guilleaerTypedefect => backport
2021-04-29 10:29guilleaerTarget Version => TAP
2021-05-04 12:13guilleaerNote Added: 0127769
2021-05-04 12:29ranjith_qualiantech_comNote Added: 0127770
2021-05-04 12:29ranjith_qualiantech_comStatusscheduled => resolved
2021-05-04 12:29ranjith_qualiantech_comResolutionopen => fixed
2021-05-10 08:14guilleaerReview Assigned To => guilleaer
2021-05-10 08:14guilleaerStatusresolved => closed
2021-05-10 08:14guilleaerFixed in Version => TAP

Notes
(0127769)
guilleaer   
2021-05-04 12:13   
https://gitlab.com/obcustomers/AGAP/org.openbravo.core2/-/merge_requests/5/diffs?commit_id=35cc1a1a798bc10873c369d4fab56be84d6563ec [^]
(0127770)
ranjith_qualiantech_com   
2021-05-04 12:29   
Fixed in https://gitlab.com/obcustomers/AGAP/org.openbravo.core2/-/commit/dd56bb5cfccf53b289a4146dab86a98f0992f112 [^]