Openbravo Issue Tracking System - Retail Modules
View Issue Details
0040340Retail ModulesWeb POSpublic2019-03-08 10:312019-03-26 13:21
samuel_nicuesa 
ranjith_qualiantech_com 
highmajoralways
closedfixed 
5
pi 
RR19Q2 
jorge-garcia
No
0040340: An exception may occur if the ticket contains lines with attributes
An exception may occur if the ticket contains lines with attributes
I changed the function updateLinesWithAttributes adding some comments to force the error.

attr needs to be null in this point.

if (attr.equals("null")) {
        attr = null;
      }

Create a new ticket and pay it.

An exception will be thrown
We need to remove this part of the code

if (attr.equals("null")) {
        attr = null;
      }

att has been initialized doing:

String attr = null;
No tags attached.
Issue History
2019-03-08 10:31samuel_nicuesaNew Issue
2019-03-08 10:31samuel_nicuesaAssigned To => Retail
2019-03-08 10:31samuel_nicuesaResolution time => 1553814000
2019-03-08 10:31samuel_nicuesaTriggers an Emergency Pack => No
2019-03-11 11:36ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2019-03-12 06:38ranjith_qualiantech_comStatusnew => scheduled
2019-03-12 06:40hgbotCheckin
2019-03-12 06:40hgbotNote Added: 0110366
2019-03-12 06:40hgbotStatusscheduled => resolved
2019-03-12 06:40hgbotResolutionopen => fixed
2019-03-12 06:40hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1c533d386e6e95337e56c84ab40b84d3f69590f5 [^]
2019-03-21 13:45jorge-garciaNote Added: 0110548
2019-03-21 13:45jorge-garciaStatusresolved => new
2019-03-21 13:45jorge-garciaResolutionfixed => open
2019-03-21 13:45jorge-garciaReview Assigned To => jorge-garcia
2019-03-22 09:57ranjith_qualiantech_comStatusnew => scheduled
2019-03-22 10:20hgbotCheckin
2019-03-22 10:20hgbotNote Added: 0110576
2019-03-22 12:05ranjith_qualiantech_comStatusscheduled => resolved
2019-03-22 12:05ranjith_qualiantech_comResolutionopen => fixed
2019-03-26 13:21jorge-garciaNote Added: 0110658
2019-03-26 13:21jorge-garciaStatusresolved => closed
2019-03-26 13:21jorge-garciaFixed in Version => RR19Q2

Notes
(0110366)
hgbot   
2019-03-12 06:40   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 1c533d386e6e95337e56c84ab40b84d3f69590f5
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Mar 12 11:10:03 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1c533d386e6e95337e56c84ab40b84d3f69590f5 [^]

Fixed issue 40340 : Validate JSON orderLines while completing the receipt

* "null" value should be validated for JSON orderLines

---
M src/org/openbravo/retail/posterminal/OrderLoader.java
---
(0110548)
jorge-garcia   
2019-03-21 13:45   
The fix is correct, but it could be improve if we not only check that a json has the property in jsonOrderLine, but we check also id its value is different from "null" (string null"). If we do that, we can avoid reset attr value to null again.
(0110576)
hgbot   
2019-03-22 10:20   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 9571ca0bd6b9427895aa4622f3ad7d3caeb29914
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Mar 22 14:50:19 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/9571ca0bd6b9427895aa4622f3ad7d3caeb29914 [^]

Related to issue 40340 : Validate JSON orderLines while completing the receipt

* "null" value should be validated for JSON orderLines

---
M src/org/openbravo/retail/posterminal/OrderLoader.java
---
(0110658)
jorge-garcia   
2019-03-26 13:21   
Code reviewed and tested