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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0033073
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2016-05-30 10:532016-08-30 14:35
ReportercaristuView Statuspublic 
Assigned ToNaroaIriarte 
PriorityimmediateResolutionfixedFixed in Version3.0PR16Q3
StatusclosedFix in branchFixed in SCM revision468a1d34cac5
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression levelPre packaging ( pi )
Regression date2016-04-08
Regression introduced in releasepi
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/69d2b535ae86 [^]
Triggers an Emergency PackNo
Summary

0033073: Where parameter can not be used in JSON webservices

DescriptionThe _where parameter is not working in standard JSON webservices[1]. Now, to enter a where clause the whereAndFilterClause parameter is used instead.


[1] http://wiki.openbravo.com/wiki/JSON_REST_Web_Services#GET [^]
Steps To Reproduce1) In a version before this changeset[1] try the following WS call:

http://localhost:8080/openbravo/org.openbravo.service.json.jsonrest/Country?_where=name='Spain' [^]

Notice that the data is filtered properly.

2) In current pi version try the following WS call:

http://localhost:8080/openbravo/org.openbravo.service.json.jsonrest/Country?_where=name='Spain' [^]

Data is not filtered. The following WS call must be done instead:

http://localhost:8080/openbravo/org.openbravo.service.json.jsonrest/Country?whereAndFilterClause=name='Spain' [^]

[1] https://code.openbravo.com/erp/devel/pi/rev/69d2b535ae86 [^]
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
caused by feature request 00326103.0PR16Q3 closedNaroaIriarte standard datasources shouldn't accept where parameter by default 

-  Notes
(0086857)
hgbot (developer)
2016-05-31 12:03

Repository: erp/devel/pi
Changeset: 468a1d34cac5286b8ef079733241dafffc7e7757
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Mon May 30 15:28:06 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/468a1d34cac5286b8ef079733241dafffc7e7757 [^]

Fixed issue 33073: It was not possible to use _where param in JSON webservices

It was not possible to filter using the "_where" parameter. The "whereAndFilterClause"
parameter was needed instead.
This was not correct because in the Webservices we must mantain the use of the "_where"
parameter to filter the data.
This has been fixed in the "JSONRestServlet" class. Before calling the fetch method, the
"whereAndFilterClause" has been overwritten with the value of the "_where" parameter. Now
when a user uses "_where" in a query of a JSON webService, that value will be set in the
"whereAndFilterClause" parameter and will work properly.

---
M modules/org.openbravo.service.json/src/org/openbravo/service/json/JsonRestServlet.java
---
(0086858)
hgbot (developer)
2016-05-31 12:03

Repository: erp/devel/pi
Changeset: ec9932c34210bf64b06e6087fd6e70306eff5938
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Mon May 30 17:26:21 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/ec9932c34210bf64b06e6087fd6e70306eff5938 [^]

Related to issue 33073: A test has been added.

A test that checks the correct behavior has been added.

---
M src-test/src/org/openbravo/test/AllWebserviceTests.java
A src-test/src/org/openbravo/test/webservice/JSONWebServicesWhereParameter.java
---
(0086977)
alostale (manager)
2016-06-03 09:27

code reviewed + tested
(0087580)
hudsonbot (developer)
2016-06-17 19:38

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/0dc7be081b1c [^]
Maturity status: Test
(0087581)
hudsonbot (developer)
2016-06-17 19:38

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/0dc7be081b1c [^]
Maturity status: Test
(0089529)
hgbot (developer)
2016-08-30 09:50

Repository: erp/devel/pi
Changeset: 4ec29d6fd63ca7d9ed3be1367e54825329949482
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Tue Aug 30 09:49:50 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/4ec29d6fd63ca7d9ed3be1367e54825329949482 [^]

Related with issue 33073: The JSONWebServicesWhereParameter test improved

This test has been improvet to avoid null pointer exceptions in the case of not getting any data in the response.

---
M src-test/src/org/openbravo/test/webservice/JSONWebServicesWhereParameter.java
---
(0089552)
hudsonbot (developer)
2016-08-30 14:35

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/637c22ed8e33 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2016-05-30 10:53 caristu New Issue
2016-05-30 10:53 caristu Assigned To => platform
2016-05-30 10:53 caristu Modules => Core
2016-05-30 10:53 caristu Regression introduced in release => pi
2016-05-30 10:53 caristu Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/69d2b535ae86 [^]
2016-05-30 10:53 caristu Triggers an Emergency Pack => No
2016-05-30 10:54 caristu Steps to Reproduce Updated View Revisions
2016-05-30 10:55 caristu Steps to Reproduce Updated View Revisions
2016-05-30 10:56 caristu Regression level => Pre packaging ( pi )
2016-05-30 10:56 caristu Regression date => 2016-04-08
2016-05-30 10:58 caristu Description Updated View Revisions
2016-05-30 11:27 alostale Status new => scheduled
2016-05-30 11:27 alostale Assigned To platform => NaroaIriarte
2016-05-30 11:27 alostale Status scheduled => acknowledged
2016-05-30 11:29 alostale Relationship added caused by 0032610
2016-05-30 11:29 alostale Status acknowledged => scheduled
2016-05-31 12:03 hgbot Checkin
2016-05-31 12:03 hgbot Note Added: 0086857
2016-05-31 12:03 hgbot Status scheduled => resolved
2016-05-31 12:03 hgbot Resolution open => fixed
2016-05-31 12:03 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/468a1d34cac5286b8ef079733241dafffc7e7757 [^]
2016-05-31 12:03 hgbot Checkin
2016-05-31 12:03 hgbot Note Added: 0086858
2016-05-31 12:09 NaroaIriarte Review Assigned To => alostale
2016-06-03 09:27 alostale Note Added: 0086977
2016-06-03 09:27 alostale Status resolved => closed
2016-06-03 09:27 alostale Fixed in Version => 3.0PR16Q3
2016-06-17 19:38 hudsonbot Checkin
2016-06-17 19:38 hudsonbot Note Added: 0087580
2016-06-17 19:38 hudsonbot Checkin
2016-06-17 19:38 hudsonbot Note Added: 0087581
2016-08-30 09:50 hgbot Checkin
2016-08-30 09:50 hgbot Note Added: 0089529
2016-08-30 14:35 hudsonbot Checkin
2016-08-30 14:35 hudsonbot Note Added: 0089552


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker