Openbravo Issue Tracking System - Retail Modules |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0030849 | Retail Modules | Web POS | public | 2015-09-16 21:23 | 2015-09-23 08:57 |
|
Reporter | Orekaria | |
Assigned To | Orekaria | |
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | RR15Q4 | |
Merge Request Status | |
Review Assigned To | mtaal |
OBNetwork customer | No |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0030849: Add a method to extract a diff of 2 json objects |
Description | Add a method to extract a diff of 2 json objects |
Steps To Reproduce | NA |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | blocks | feature request | 0030850 | | closed | Orekaria | Improve the output of the error when the receipt has been changed during the closing process |
|
Attached Files | proposed-changes.diff (2,093) 2015-09-21 13:31 https://issues.openbravo.com/file_download.php?file_id=8462&type=bug |
|
Issue History |
Date Modified | Username | Field | Change |
2015-09-16 21:23 | Orekaria | New Issue | |
2015-09-16 21:23 | Orekaria | Assigned To | => Orekaria |
2015-09-16 21:23 | Orekaria | OBNetwork customer | => No |
2015-09-16 21:23 | Orekaria | Triggers an Emergency Pack | => No |
2015-09-16 21:24 | hgbot | Checkin | |
2015-09-16 21:24 | hgbot | Note Added: 0080444 | |
2015-09-16 21:24 | hgbot | Status | new => resolved |
2015-09-16 21:24 | hgbot | Resolution | open => fixed |
2015-09-16 21:24 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/f75b2fd01b8ea7a26c2c64c3a3f1866e176b40f9 [^] |
2015-09-16 22:27 | hgbot | Checkin | |
2015-09-16 22:27 | hgbot | Note Added: 0080445 | |
2015-09-18 11:21 | mtaal | Review Assigned To | => mtaal |
2015-09-19 11:30 | Orekaria | Relationship added | blocks 0030850 |
2015-09-21 13:29 | mtaal | Note Added: 0080530 | |
2015-09-21 13:29 | mtaal | Status | resolved => new |
2015-09-21 13:29 | mtaal | Resolution | fixed => open |
2015-09-21 13:31 | mtaal | File Added: proposed-changes.diff | |
2015-09-22 09:38 | hgbot | Checkin | |
2015-09-22 09:38 | hgbot | Note Added: 0080551 | |
2015-09-22 09:38 | hgbot | Checkin | |
2015-09-22 09:38 | hgbot | Note Added: 0080552 | |
2015-09-22 09:38 | hgbot | Status | new => resolved |
2015-09-22 09:38 | hgbot | Resolution | open => fixed |
2015-09-22 09:38 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/f75b2fd01b8ea7a26c2c64c3a3f1866e176b40f9 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/f73f91c60caafa90b6968a1f6f8cf512f8e79ec8 [^] |
2015-09-23 08:57 | mtaal | Note Added: 0080568 | |
2015-09-23 08:57 | mtaal | Status | resolved => closed |
2015-09-23 08:57 | mtaal | Fixed in Version | => RR15Q4 |
Notes |
|
(0080444)
|
hgbot
|
2015-09-16 21:24
|
|
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: f75b2fd01b8ea7a26c2c64c3a3f1866e176b40f9
Author: Rafa Alonso <ral <at> openbravo.com>
Date: Fri Sep 11 22:48:39 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/f75b2fd01b8ea7a26c2c64c3a3f1866e176b40f9 [^]
Fixes issue 30849: add the 'OB.UTIL.diffJson' function
- Returns a JSON object with the difference between the provided JSONs
- Experimental. Do not be use for retail operations
---
M web/org.openbravo.mobile.core/source/utils/ob-utilities.js
---
|
|
|
(0080445)
|
hgbot
|
2015-09-16 22:27
|
|
|
|
(0080530)
|
mtaal
|
2015-09-21 13:29
|
|
I found several issues with the code, the following examples return an incorrect no-diff result imho:
OB.UTIL.diffJson(['a'], ['a', 'c'])
OB.UTIL.diffJson({'a': {'b': true}}, {'a': {}})
OB.UTIL.diffJson({'a': 3}, {'a': 3, 'c': 5})
Other comments:
[13:05:26] Martin Taal: if (obj2[key].constructor && obj2[key].constructor === Array && obj1[key].constructor && obj1[key] === Array && obj2[key].length !== 0) {
[13:05:46] Martin Taal: instead of obj1[key] === Array shouldn't be: obj1[key].constructor === Array
I have attached a diff which I think solve the issues I mention above. |
|
|
(0080551)
|
hgbot
|
2015-09-22 09:38
|
|
|
|
(0080552)
|
hgbot
|
2015-09-22 09:38
|
|
|
|
(0080568)
|
mtaal
|
2015-09-23 08:57
|
|
|