Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0015836Openbravo ERP00. Application dictionarypublic2011-02-01 21:002012-04-21 14:24
wimjassen 
mirurita 
normalminoralways
closedfixed 
20UBUNTU 10.10
2.50MP23 
3.0MP11 
Core
No
0015836: function c_location_description does not return correct data
The function c_location_description does not return correct data. It seems that the case statement: WHEN(L.POSTAL||L.CITY||R.NAME) IS NULL always return NULL when there is no region.
As a result no postal and city are returned by the function.
call stored procedure with an existing location_id where no region is defined
Replace case statement by: WHEN(L.POSTAL IS NULL AND L.CITY IS NULL AND R.NAME IS NULL)
VMA-Reviewed
Issue History
2011-02-01 21:00wimjassenNew Issue
2011-02-01 21:00wimjassenAssigned To => alostale
2011-02-01 21:00wimjassenModules => Core
2011-02-07 08:31alostaleStatusnew => scheduled
2012-02-28 13:29alostaleAssigned Toalostale => vmromanos
2012-04-11 12:00vmromanosTag Attached: VMA-Reviewed
2012-04-18 13:46miruritaAssigned Tovmromanos => mirurita
2012-04-18 14:00hgbotCheckin
2012-04-18 14:00hgbotNote Added: 0047703
2012-04-18 14:00hgbotStatusscheduled => resolved
2012-04-18 14:00hgbotResolutionopen => fixed
2012-04-18 14:00hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/4c34b4aeb0476f89790ae0315dd7a02ad1f7a857 [^]
2012-04-18 14:09miruritaNote Added: 0047707
2012-04-20 15:34hgbotCheckin
2012-04-20 15:34hgbotNote Added: 0047803
2012-04-20 16:07vmromanosNote Added: 0047809
2012-04-20 16:07vmromanosStatusresolved => closed
2012-04-20 16:07vmromanosFixed in Version => 3.0MP11
2012-04-21 14:24hudsonbotCheckin
2012-04-21 14:24hudsonbotNote Added: 0047833
2012-04-21 14:24hudsonbotCheckin
2012-04-21 14:24hudsonbotNote Added: 0047859

Notes
(0047703)
hgbot   
2012-04-18 14:00   
Repository: erp/devel/pi
Changeset: 4c34b4aeb0476f89790ae0315dd7a02ad1f7a857
Author: Mikel Irurita <mikel.irurita <at> openbravo.com>
Date: Wed Apr 18 13:59:46 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/4c34b4aeb0476f89790ae0315dd7a02ad1f7a857 [^]

Fixes issue 15836: function c_location_description does not return correct data

---
M src-db/database/model/functions/C_LOCATION_DESCRIPTION.xml
---
(0047707)
mirurita   
2012-04-18 14:09   
Testing Plan:

Location output format should be:
--------------------------------
<address1>
<address2>
<postal code> - <city> (<region>)
--------------------------------

Check the output of the function after each of the updates (postgresql/oracle)
select c_location_description('X') from dual;

-- UPDATE c_location set postal=null, city=null, c_region_id = null where c_location_id = 'X'
-- UPDATE c_location set postal='12345', city=null, c_region_id = null where c_location_id = 'X'
-- UPDATE c_location set postal=null, city='city', c_region_id = null where c_location_id = 'X'
-- UPDATE c_location set postal=null, city=null, c_region_id = '108' where c_location_id = 'X'
-- UPDATE c_location set postal='12345', city='city', c_region_id = null where c_location_id = 'X'
-- UPDATE c_location set postal=null, city='city', c_region_id = '108' where c_location_id = 'X'
-- UPDATE c_location set postal='12345', city=null, c_region_id = '108' where c_location_id = 'X'
-- UPDATE c_location set postal='12345', city='city', c_region_id = '108' where c_location_id = 'X'
(0047803)
hgbot   
2012-04-20 15:34   
Repository: erp/devel/pi
Changeset: 33a11a6caf22ec0cea7b26ccb95b2562ef55b656
Author: Mikel Irurita <mikel.irurita <at> openbravo.com>
Date: Fri Apr 20 14:33:11 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/33a11a6caf22ec0cea7b26ccb95b2562ef55b656 [^]

Related to issue 15836: code review.

---
M src-db/database/model/functions/C_LOCATION_DESCRIPTION.xml
---
(0047809)
vmromanos   
2012-04-20 16:07   
code review + testing OK
(0047833)
hudsonbot   
2012-04-21 14:24   
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/2eb57286c1fc [^]

Maturity status: Test
(0047859)
hudsonbot   
2012-04-21 14:24   
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/2eb57286c1fc [^]

Maturity status: Test