Openbravo Issue Tracking System - POS2
View Issue Details
0046352POS2POSpublic2021-04-26 12:342021-05-04 12:14
jmelin 
ranjith_qualiantech_com 
urgentmajoralways
closedfixed 
30Openbravo Appliance 14.04
 
 
guilleaer
No
0046352: 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

Takeaway
depends on backport 0046411TAP closed ranjith_qualiantech_com JIRA 1731 - BP Assignation - message 'Cannot read property 'properties' of undefined' 
png 6bc2a682-e170-4f0b-95d3-d212c3e3f2b3.png (45,102) 2021-04-26 12:35
https://issues.openbravo.com/file_download.php?file_id=15575&type=bug
png

png 3497137a-b535-4ff7-850b-e4a516313d7f.png (52,702) 2021-04-26 12:35
https://issues.openbravo.com/file_download.php?file_id=15576&type=bug
png
Issue History
2021-04-26 12:34jmelinNew Issue
2021-04-26 12:34jmelinAssigned To => Retail
2021-04-26 12:34jmelinTriggers an Emergency Pack => No
2021-04-26 12:34jmelinTag Attached: Takeaway
2021-04-26 12:35jmelinFile Added: 6bc2a682-e170-4f0b-95d3-d212c3e3f2b3.png
2021-04-26 12:35jmelinFile Added: 3497137a-b535-4ff7-850b-e4a516313d7f.png
2021-04-26 16:17javietxeSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=22369#r22369
2021-04-26 16:30javietxeSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=22370#r22370
2021-04-27 12:20ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2021-04-29 10:29guilleaerStatusnew => scheduled
2021-05-04 12:03ranjith_qualiantech_comNote Added: 0127768
2021-05-04 12:03ranjith_qualiantech_comStatusscheduled => resolved
2021-05-04 12:03ranjith_qualiantech_comResolutionopen => fixed
2021-05-04 12:14guilleaerReview Assigned To => guilleaer
2021-05-04 12:14guilleaerStatusresolved => closed

Notes
(0127768)
ranjith_qualiantech_com   
2021-05-04 12:03   
Its fixed in Commit https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/fa38d1b55bcff10ad005c5653123d8f54324d07b [^]