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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0026085
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] B. User interfacemajorhave not tried2014-03-25 17:272014-05-12 09:18
ReporterjonalegriaesarteView Statuspublic 
Assigned Toguillermogil 
PriorityurgentResolutionfixedFixed in Version3.0PR14Q3
StatusclosedFix in branchFixed in SCM revisione16d7577a075
ProjectionnoneETAnoneTarget Version3.0PR14Q3
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0026085: Location is not correctly filtered in grid view, if the country does not have region

DescriptionLocation is not correctly filtered in grid view, if the country does not have region
Steps To Reproduce- Warehouse and bins
- Filter by location, it works fine
- Select one and change the country of the location, select one without region (Anguilla for example). Save it
- Try to filter, notice that the location does not appear as an option
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0066820)
alostale (manager)
2014-05-05 17:00

Problem is in nullable properties that are part of the identifier of a FK.

In this case the query is

from Warehouse as e left join e.locationAddress as join_0 where ( upper((COALESCE(to_char(join_0.addressLine1),'') || ' - ' || COALESCE(to_char(join_0.addressLine2),'') || ' - ' || COALESCE(to_char(join_0.postalCode),'') || ' - ' || COALESCE(to_char(join_0.cityName),'') || ' - ' || (COALESCE(to_char(join_0.region.name),'')) || ' - ' || (COALESCE(to_char((select name from CountryTrl as t where t.country = join_0.country and t.language.language='en_US')), to_char(join_0.country.name), '')))) like upper(:alias_0) escape '|' ) order by e.name,e.id


this part: join_0.region.name creates an inner join with region table which results in no row in case of empty region

Left join should be used instead:

from Warehouse as e
 left join e.locationAddress as join_0 left join join_0.region r
 where ( upper((COALESCE(to_char(join_0.addressLine1),'') || ' - ' || COALESCE(to_char(join_0.addressLine2),'') || ' - ' || COALESCE(to_char(join_0.postalCode),'') || ' - ' || COALESCE(to_char(join_0.cityName),'') || ' - ' || (COALESCE(to_char(r.name),'')) || ' - ' || (COALESCE(to_char((select name from CountryTrl as t where t.country = join_0.country and t.language.language='en_US')), to_char(join_0.country.name), '')))) like upper('%pam%') escape '|' ) order by e.name,e.id
(0067020)
hgbot (developer)
2014-05-08 11:41

Repository: erp/devel/pi
Changeset: e16d7577a0754fa07c6d3883d77eaa5f2c0754c1
Author: Guillermo Gil <guillermo.gil <at> openbravo.com>
Date: Thu May 08 11:09:49 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e16d7577a0754fa07c6d3883d77eaa5f2c0754c1 [^]

Fixed issue 26085:Location is not correctly filtered in grid view

If the country does not have a region it was not filtered.
Added new joins if the property is referenced and it can allow null values. Prefix modified to take into account the alias of the joins.

---
M modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java
---
(0067072)
hudsonbot (developer)
2014-05-09 16:21

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/e8c0af2263a0 [^]
Maturity status: Test
(0067083)
alostale (manager)
2014-05-12 09:18

code reviewed
verified new left join is only added for nullable properties in identifier and in other cases same query as before is generated

- Issue History
Date Modified Username Field Change
2014-03-25 17:27 jonalegriaesarte New Issue
2014-03-25 17:27 jonalegriaesarte Assigned To => AugustoMauch
2014-03-25 17:27 jonalegriaesarte Modules => Core
2014-03-25 17:27 jonalegriaesarte Resolution time => 1398808800
2014-03-25 17:27 jonalegriaesarte Triggers an Emergency Pack => No
2014-03-25 17:52 daniOpenbravo Issue Monitored: daniOpenbravo
2014-05-05 17:00 alostale Note Added: 0066820
2014-05-05 17:00 alostale Assigned To AugustoMauch => guilleaer
2014-05-06 08:23 guillermogil Assigned To guilleaer => guillermogil
2014-05-08 11:04 guillermogil Issue Monitored: alostale
2014-05-08 11:04 guillermogil Review Assigned To => alostale
2014-05-08 11:41 hgbot Checkin
2014-05-08 11:41 hgbot Note Added: 0067020
2014-05-08 11:41 hgbot Status new => resolved
2014-05-08 11:41 hgbot Resolution open => fixed
2014-05-08 11:41 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e16d7577a0754fa07c6d3883d77eaa5f2c0754c1 [^]
2014-05-09 16:21 hudsonbot Checkin
2014-05-09 16:21 hudsonbot Note Added: 0067072
2014-05-12 09:18 alostale Note Added: 0067083
2014-05-12 09:18 alostale Status resolved => closed
2014-05-12 09:18 alostale Fixed in Version => PR14Q3


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker