Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0030849
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Retail Modules] Web POSminorN/A2015-09-16 21:232015-09-23 08:57
ReporterOrekariaView Statuspublic 
Assigned ToOrekaria 
PrioritynormalResolutionfixedFixed in VersionRR15Q4
StatusclosedFix in branchFixed in SCM revisionf73f91c60caa
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomtaal
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0030849: Add a method to extract a diff of 2 json objects

DescriptionAdd a method to extract a diff of 2 json objects
Steps To ReproduceNA
TagsNo tags attached.
Attached Filesdiff file icon proposed-changes.diff [^] (2,093 bytes) 2015-09-21 13:31 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
blocks feature request 0030850 closedOrekaria Improve the output of the error when the receipt has been changed during the closing process 

-  Notes
(0080444)
hgbot (developer)
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 (developer)
2015-09-16 22:27

Repository: tools/automation/pi-mobile
Changeset: 18cea99d33f6419be3442092fca2899b1f67a5ec
Author: Rafa Alonso <ral <at> openbravo.com>
Date: Wed Sep 16 22:26:20 2015 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/18cea99d33f6419be3442092fca2899b1f67a5ec [^]

Verifies issue 30849: Add the 'I30849_VerifyDiffJSON' test

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/system/I30849_VerifyDiffJSON.java
---
(0080530)
mtaal (manager)
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 (developer)
2015-09-22 09:38

Repository: tools/automation/pi-mobile
Changeset: 69820c201afbd7a65fc94ebb109c85427a84430e
Author: Rafa Alonso <ral <at> openbravo.com>
Date: Mon Sep 21 19:48:05 2015 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/69820c201afbd7a65fc94ebb109c85427a84430e [^]

Verifies issue 30849: Updated 'I30849_VerifyDiffJSON' test

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/system/I30849_VerifyDiffJSON.java
---
(0080552)
hgbot (developer)
2015-09-22 09:38

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: f73f91c60caafa90b6968a1f6f8cf512f8e79ec8
Author: Rafa Alonso <ral <at> openbravo.com>
Date: Mon Sep 21 19:46:36 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/f73f91c60caafa90b6968a1f6f8cf512f8e79ec8 [^]

Fixes issue 30849: Improved diff algorithm

---
M web/org.openbravo.mobile.core/source/utils/ob-utilities.js
---
(0080568)
mtaal (manager)
2015-09-23 08:57

tested and reviewed

- 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 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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker