Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0029385 | Openbravo ERP | A. Platform | public | 2015-03-24 10:01 | 2015-03-27 02:12 |
|
Reporter | caristu | |
Assigned To | alostale | |
Priority | immediate | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | 3.0PR14Q2.6 | |
Target Version | | Fixed in Version | 3.0PR15Q2 | |
Merge Request Status | |
Review Assigned To | AugustoMauch |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | Production - Confirmed Stable |
Regression date | 2014-01-07 |
Regression introduced in release | 3.0PR14Q2 |
Regression introduced by commit | http://code.openbravo.com/erp/devel/pi/rev/46ec5ec2839da79ae27a5225c105c85ecde1cf6a [^] |
Triggers an Emergency Pack | No |
|
Summary | 0029385: Distinct parameter is not working in JSON REST web services |
Description | Distinct parameter is not working in JSON REST web services. An error like the following is thrown when using it:
{"response":{"data":[{"response":{"status":-1,"error":{"message":"Exception when creating query select me from Product as me where ( exists (select 1 from Product inner join null.organization as i where i = me and e.organization.id in ('E443A31992CB4635AFCAEABE7183CE85', '0', 'DC206C91AA6A4897B44DA897936E0EC3', '7BABA5FF80494CAFA54DEBD22EC46F01', 'BAE22373FEBE4CCCA24517E23F0C8A48', '19404EAD144C49A0AF37D54377CF452D', 'B843C30461EA4501935CB1D125C9C25A', '2E60544D37534C0B89E765FE29BC0B43') and e.client.id in ('23C59575B9CF467C9620760EB255B389', '0')) )order by me.name","messageType":"Error","title":""},"totalRows":0}} |
Steps To Reproduce | 1) Do the following web service call
https://livebuilds.openbravo.com/erp_pi_pgsql/org.openbravo.service.json.jsonrest/Product?_distinct=organization [^]
Notice that the error is returned |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | depends on | backport | 0029428 | 3.0PR15Q1.3 | closed | alostale | Distinct parameter is not working in JSON REST web services | caused by | defect | 0025182 | 3.0PR14Q2 | closed | alostale | Query in org drop down in the list field is having bad performance |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2015-03-24 10:01 | caristu | New Issue | |
2015-03-24 10:01 | caristu | Assigned To | => platform |
2015-03-24 10:01 | caristu | Modules | => Core |
2015-03-24 10:01 | caristu | Regression level | => Production - Confirmed Stable |
2015-03-24 10:01 | caristu | Triggers an Emergency Pack | => No |
2015-03-24 10:01 | caristu | Issue Monitored: networkb | |
2015-03-24 10:06 | caristu | Resolution time | => 1433109600 |
2015-03-26 12:01 | alostale | Status | new => scheduled |
2015-03-26 12:01 | alostale | Assigned To | platform => alostale |
2015-03-26 14:54 | alostale | Relationship added | caused by 0025182 |
2015-03-26 14:55 | alostale | Review Assigned To | => AugustoMauch |
2015-03-26 14:55 | alostale | Regression date | => 2014-01-07 |
2015-03-26 14:55 | alostale | Regression introduced in release | => 3.0PR14Q2 |
2015-03-26 14:55 | alostale | Regression introduced by commit | => http://code.openbravo.com/erp/devel/pi/rev/46ec5ec2839da79ae27a5225c105c85ecde1cf6a [^] |
2015-03-26 15:22 | hgbot | Checkin | |
2015-03-26 15:22 | hgbot | Note Added: 0076012 | |
2015-03-26 15:22 | hgbot | Checkin | |
2015-03-26 15:22 | hgbot | Note Added: 0076013 | |
2015-03-26 15:22 | hgbot | Status | scheduled => resolved |
2015-03-26 15:22 | hgbot | Resolution | open => fixed |
2015-03-26 15:22 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/088b4114ac745dad78496622bd588c1a8a1423b9 [^] |
2015-03-26 18:13 | AugustoMauch | Note Added: 0076031 | |
2015-03-26 18:13 | AugustoMauch | Status | resolved => closed |
2015-03-26 18:13 | AugustoMauch | Fixed in Version | => 3.0PR15Q2 |
2015-03-27 02:12 | hudsonbot | Checkin | |
2015-03-27 02:12 | hudsonbot | Note Added: 0076042 | |
2015-03-27 02:12 | hudsonbot | Checkin | |
2015-03-27 02:12 | hudsonbot | Note Added: 0076043 | |
Notes |
|
(0076012)
|
hgbot
|
2015-03-26 15:22
|
|
Repository: erp/devel/pi
Changeset: 3c52c4d0b73b20527effadf0ce4676bd7f638891
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Mar 26 15:15:16 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/3c52c4d0b73b20527effadf0ce4676bd7f638891 [^]
related to bug 29385: Distinct parameter is not working in JSON REST web services
Added test cases
---
M src-test/src/org/openbravo/test/webservice/JSONWebServices.java
---
|
|
|
(0076013)
|
hgbot
|
2015-03-26 15:22
|
|
Repository: erp/devel/pi
Changeset: 088b4114ac745dad78496622bd588c1a8a1423b9
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Mar 26 15:21:18 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/088b4114ac745dad78496622bd588c1a8a1423b9 [^]
fixed bug 29385: Distinct parameter is not working in JSON REST web services
Using _distinct property in JSON REST webservices resulted in an incorrectly
generated query. There were 2 problems:
- Entity name for was set in the fetch method, after the refactor done to fix
issue 0025182, entity is different in case of using _distinct, and it is managed
by QueryService.
- This refactor also requires of using aliases to work
---
M modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
M modules/org.openbravo.service.json/src/org/openbravo/service/json/JsonRestServlet.java
---
|
|
|
|
Code reviewed and verified in pi@9a240957107d |
|
|
|
|
|
|
|