Openbravo Issue Tracking System - Retail Modules
View Issue Details
0050404Retail ModulesWeb POSpublic2022-10-04 15:422022-10-07 08:22
jorgewederago 
ranjith_qualiantech_com 
highmajoralways
closedfixed 
5
 
RR23Q1 
No
0050404: External Business Partner constructor is not handling number type properly
When creating an External Business Partner using its constructor if one of the values passed to it is a 0 it gets converted to null
Backend
1.-Ensure that there is a CRM Connector active
2.-Go to CRM Connector and look for a property that is configured as number eg:xZIP
3.-Get the name of the property

WebPOS/ReactPOS
1.-Load the terminal
2.-Open the console and create a new object using a JSON that contains the property name from before and assign to it a value of 0
Eg: new OB.App.Class.ExternalBusinessPartner({'xZIP':0})
3.- Check that the object has been created but the value of property is null
NOTE: The value is inside the mixedBP Array.
4.- Do the same but instead of setting 0 use another number
Eg: new OB.App.Class.ExternalBusinessPartner({'xZIP':3})
5.- Check that the object has been create and the value of the property is the proper one
0 should also be considered as a valid value if we are creating the object from a JSON that contains it as a value for a number type field.

This should be done in the following method:
mixPlainBusinessPartnerWithProperties

The idea is to also validate Number type to ensure 0 is not considered as something that can be nullable
No tags attached.
Issue History
2022-10-04 15:42jorgewederagoNew Issue
2022-10-04 15:42jorgewederagoAssigned To => Retail
2022-10-04 15:42jorgewederagoTriggers an Emergency Pack => No
2022-10-04 15:49jorgewederagoProposed Solution updated
2022-10-05 07:28ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2022-10-05 07:28ranjith_qualiantech_comStatusnew => scheduled
2022-10-05 07:51jorgewederagoProposed Solution updated
2022-10-06 07:10hgbotNote Added: 0141708
2022-10-06 12:17hgbotResolutionopen => fixed
2022-10-06 12:17hgbotStatusscheduled => closed
2022-10-06 12:17hgbotNote Added: 0141723
2022-10-06 12:17hgbotFixed in Version => RR23Q1
2022-10-06 12:17hgbotNote Added: 0141724
2022-10-07 07:26hgbotNote Added: 0141816
2022-10-07 08:22hgbotNote Added: 0141821
2022-10-07 08:22hgbotNote Added: 0141822

Notes
(0141708)
hgbot   
2022-10-06 07:10   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/418 [^]
(0141723)
hgbot   
2022-10-06 12:17   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/418 [^]
(0141724)
hgbot   
2022-10-06 12:17   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: 80ac77697a8a2db3cd362e0c857cb339b812600c
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 06-10-2022 10:17:32
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/80ac77697a8a2db3cd362e0c857cb339b812600c [^]

Fixed ISSUE-50404: ExternalBP propery should be validated for NULL values

---
M web/org.openbravo.mobile.core/app/integration/external-business-partner/ExternalBusinessPartner.js
---
(0141816)
hgbot   
2022-10-07 07:26   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.discounts.propertycondition/-/merge_requests/11 [^]
(0141821)
hgbot   
2022-10-07 08:22   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.discounts.propertycondition [^]
Changeset: 993e248dd5210a77605a87d903d4b778b39e613c
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 07-10-2022 10:54:05
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.discounts.propertycondition/-/commit/993e248dd5210a77605a87d903d4b778b39e613c [^]

Related to ISSUE-50404: Updated Counter decrease Comparator to validate value
* Value must be greater than zero if Counter decrease comparator is configured

---
M web/org.openbravo.discounts.propertycondition/js/engine/comparators/NumberComparatorType.js
---
(0141822)
hgbot   
2022-10-07 08:22   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.discounts.propertycondition/-/merge_requests/11 [^]