Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030092Openbravo ERPA. Platformpublic2015-06-04 13:252015-06-15 09:26
malsasua 
NaroaIriarte 
normalminoralways
closedfixed 
20Community Appliance
 
3.0PR15Q3 
alostale
Google Chrome
Core
No
0030092: WS template bo.xslt is not working fine
the links created by the WS template bo.xslt, are not working
click in URL:
https://livebuilds.openbravo.com/erp_main_pgsql/ws/dal/ADUser?template=bo.xslt [^]

click in some link, for example:
supervisor: Openbravo ( 100 ) (xml)

error is returned:
<ob:error xmlns:ob="http://www.openbravo.com"><message>No [^] WebService found using the name ADUser</message></ob:error>

The link is
https://livebuilds.openbravo.com/erp_main_pgsql/ws/ADUser/100?template=bo.xslt [^]
and it should be
https://livebuilds.openbravo.com/erp_main_pgsql/ws/dal/ADUser/100?template=bo.xslt [^]
No tags attached.
Issue History
2015-06-04 13:25malsasuaNew Issue
2015-06-04 13:25malsasuaAssigned To => platform
2015-06-04 13:25malsasuaWeb browser => Google Chrome
2015-06-04 13:25malsasuaModules => Core
2015-06-04 13:25malsasuaTriggers an Emergency Pack => No
2015-06-04 13:28malsasuaWeb browserGoogle Chrome => Google Chrome
2015-06-04 13:28malsasuaResolution time => 1436479200
2015-06-04 18:19malsasuaWeb browserGoogle Chrome => Google Chrome
2015-06-04 18:19malsasuaSeveritymajor => minor
2015-06-05 08:22alostaleStatusnew => scheduled
2015-06-05 08:22alostaleAssigned Toplatform => NaroaIriarte
2015-06-10 14:03NaroaIriarteIssue Monitored: alostale
2015-06-10 14:03NaroaIriarteReview Assigned To => alostale
2015-06-10 14:03NaroaIriarteWeb browserGoogle Chrome => Google Chrome
2015-06-10 15:52hgbotCheckin
2015-06-10 15:52hgbotNote Added: 0078184
2015-06-10 15:52hgbotStatusscheduled => resolved
2015-06-10 15:52hgbotResolutionopen => fixed
2015-06-10 15:52hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/34641a1a0c7807ba2559c69776e64fa9e3bf5723 [^]
2015-06-11 00:49hudsonbotCheckin
2015-06-11 00:49hudsonbotNote Added: 0078200
2015-06-15 09:26alostaleNote Added: 0078276
2015-06-15 09:26alostaleStatusresolved => closed
2015-06-15 09:26alostaleFixed in Version => 3.0PR15Q3

Notes
(0078184)
hgbot   
2015-06-10 15:52   
Repository: erp/devel/pi
Changeset: 34641a1a0c7807ba2559c69776e64fa9e3bf5723
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Wed Jun 10 15:51:06 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/34641a1a0c7807ba2559c69776e64fa9e3bf5723 [^]

Fixed issue 30092: the bo.xslt template is working wrong.

The problem was that it was not possible to get the correct url by clicking
in the links. For example, if you went to the url:

https://livebuilds.openbravo.com/erp_main_pgsql/ws/dal/ADUser?template=bo.xslt [^]

And you click in some link, the obtained url was:

https://livebuilds.openbravo.com/erp_main_pgsql/ws/ADUser/100?template=bo.xslt [^]

instead of:

https://livebuilds.openbravo.com/erp_main_pgsql/ws/dal/ADUser/100?template=bo.xslt [^]

The problem was in the bo.xslt template, in the href variable. It was being set wrong in some cases,
it removed one extra level from the url. This is OK when the url has the id after the entity name, like:

https://livebuilds.openbravo.com/erp_main_pgsql/ws/dal/ADUser/100?template=bo.xslt [^]

But in the case of not having the id after the entity name in the url, it is wrong to substract a level
from the url.

In this case, that does not have the id after the entity name, didn't work well:

https://livebuilds.openbravo.com/erp_main_pgsql/ws/dal/ADUser?template=bo.xslt [^]

The substraction of the level retuned a bad url, the "/dal" is missing:

https://livebuilds.openbravo.com/erp_main_pgsql/ws/ADUser/100?template=bo.xslt [^]

To fix this the bo.xslt has been changed, now it takes into account if the url contains the id after
the entity name. If it does, a level is substracted. If not, no.

The WebServiceUtil.applyTemplate method has been changed too. Now the parameter hasId is set here and is
passed to the bo.xslt. This boolean parameter is true if the url has the id after the entity name,
and false if not.

---
M src/org/openbravo/service/rest/bo.xslt
M src/org/openbravo/service/web/WebServiceUtil.java
---
(0078200)
hudsonbot   
2015-06-11 00:49   
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/29888743cfde [^]
Maturity status: Test
(0078276)
alostale   
2015-06-15 09:26   
code reviewed

tested with the 2 link types