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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0030505
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 00. Application dictionaryminorhave not tried2015-08-06 09:522015-08-20 23:16
ReportergorkaionView Statuspublic 
Assigned Toalostale 
PriorityimmediateResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisionf5cac263bc76
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Togorkaion
Web browser
ModulesCore
Regression levelAutomated tests
Regression date2015-08-05
Regression introduced in releasepi
Regression introduced by commithttp://code.openbravo.com/erp/devel/pi/rev/1f572104e426366ac67e9efc7bd74040f8142ac3 [^]
Triggers an Emergency PackNo
Summary

0030505: Compilation in 2.50 mode fails for Navigation Rules tab of Window, Tabs and Fields

DescriptionThere is a compilation error in 2.50 mode.

https://ci.openbravo.com/job/int-full-pgsql-compile-all/601/consoleFull [^]

The issue is in "Window, Tabs and Fields" window when computing the xsql file for the new Navigation Rules tab. In this file it is not generating properly the query to load the identifier of the parent field (AD_Field_id)
Steps To ReproduceOn a pi on changeset 0c08e36aad01. Compile the application in 2.50 mode:

ant compile.complete -Dwad.generateAllClassic250Windows=true

There is a query that it is not correctly generated:
SELECT (TO_CHAR(COALESCE(TO_CHAR((CASE WHEN tableTRL1.Name IS NULL THEN TO_CHAR(table1.Name) ELSE TO_CHAR(tableTRL1.Name) END)), '')) || ' - ' || list1.name) AS NAME
 FROM AD_Field left join (select AD_Field_ID, Name, AD_Tab_ID from AD_Field) table1 on (AD_Field.AD_Field_ID = table1.AD_Field_ID)
   left join (select AD_Field_ID,AD_Language, Name from AD_Field_TRL) tableTRL1 on (table1.AD_Field_ID = tableTRL1.AD_Field_ID and tableTRL1.AD_Language = ?)
   left join ad_ref_list_v list1 on (table2.AD_Tab_ID = list1.value and list1.ad_reference_id = '' and list1.ad_language = ?)
 WHERE AD_Field.AD_Field_ID = ?
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
caused by feature request 0015379 closedgorkaion Extend navigation model 

-  Notes
(0079225)
alostale (developer)
2015-08-06 16:26
edited on: 2015-08-06 16:27

There are two different issues affecting this tab:

1. When the record identifier of the parent tab is compound by more than one field, being one of them a TableDir and the other translatable, the generated query is fails to execute.

In fact TableDir fields participating in identifiers are always incorrectly generated because they are joining ID with ad_ref_list_value which is incorrect, when compiling a clean Openbravo 3 without forcing 2.50 generation the only affected file is org/openbravo/erpWindows/ProcessPlan/IOProducts_data.xsql with a query:

  select ...
         (CASE WHEN MA_SequenceProduct.M_Product_Uom_Id IS NULL THEN '' ELSE ( COALESCE(TO_CHAR(list2.name),'') ) END) AS M_Product_Uom_IdR,
       ...
  from SequenceProduct
       left join (select M_Product_Uom_Id, C_UOM_ID from M_Product_UOM) table5
                 on (MA_SequenceProduct.M_Product_Uom_Id = table5.M_Product_Uom_Id)
       left join ad_ref_list_v list2
                 on (table5.C_UOM_ID = list2.value
                     and list2.ad_reference_id = ''
                     and list2.ad_language = ?)
        ...

which is incorrect.

2. When there is in a parent tab an auxiliary input with a parameter based in a field stored in session, the java generated is incorrect. The only occurrence of this case is the new Navigation Rules tab.



Correct implementation is not going to be done for none of these 2 cases because this code is planned to be retired soon, meanwhile a workaround to make it compile will be implemented.

(0079226)
hgbot (developer)
2015-08-06 16:41

Repository: erp/devel/pi
Changeset: 9d134526fceeb95e137a2863e59bce834ba20736
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Aug 06 16:38:01 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/9d134526fceeb95e137a2863e59bce834ba20736 [^]

related to issue 30505: 2.50 compilation mode fails

  TableDir fields participating in identifiers are incorrectly generated because
  they are joined by ID with ad_ref_list_value which is incorrect.

  This is not a fix but just a workarround to make the code to compile.

---
M src-wad/src/org/openbravo/wad/controls/WADTableDir.java
---
(0079227)
hgbot (developer)
2015-08-06 16:41

Repository: erp/devel/pi
Changeset: f5cac263bc766a60806d547e06317e1a54adcfa7
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Aug 06 16:40:39 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f5cac263bc766a60806d547e06317e1a54adcfa7 [^]

fixed issue 30505: 2.50 compilation mode fails

  When there is in a parent tab an auxiliary input with a parameter based in a
  field stored in session, the java generated is incorrect.

  This is not a fix but a workarround: values are not retrieved by using the java
  field but using the FieldProvider.getField method instead.

---
M src-wad/src/org/openbravo/wad/WadUtility.java
---
(0079228)
alostale (developer)
2015-08-06 16:47

Tested:
*changeset 1: http://code.openbravo.com/erp/devel/pi/rev/9d13452 [^]
   -Comparing wad generated code after the fix and before the only modified file is ProcessPlan/IOProducts_data.xsql if 2.50 mode is not forced.
   -There are few other xsql files modified when forcing 2.50 mode.
   -New query does not implement the identifier replacing it with xxx string (note before was not correctly implemented)

*changeset 2: http://code.openbravo.com/erp/devel/pi/rev/f5cac263b [^]
   -There are many java files affected in the way auxiliary inputs are retrieved, but the old and new ways are completely interchangeable.
(0079244)
gorkaion (developer)
2015-08-07 10:21

checked that window is now properly created and compilation does not fail.
(0079530)
hudsonbot (developer)
2015-08-20 23:16

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/8c91718397a5 [^]
Maturity status: Test
(0079531)
hudsonbot (developer)
2015-08-20 23:16

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/8c91718397a5 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2015-08-06 09:52 gorkaion New Issue
2015-08-06 09:52 gorkaion Assigned To => alostale
2015-08-06 09:52 gorkaion Modules => Core
2015-08-06 09:52 gorkaion Triggers an Emergency Pack => No
2015-08-06 09:54 alostale Relationship added caused by 0030204
2015-08-06 09:55 alostale Regression level => Automated tests
2015-08-06 09:55 alostale Regression date => 2015-08-05
2015-08-06 09:55 alostale Regression introduced in release => pi
2015-08-06 09:55 alostale Regression introduced by commit => http://code.openbravo.com/erp/devel/pi/rev/1f572104e426366ac67e9efc7bd74040f8142ac3 [^]
2015-08-06 09:55 alostale Priority high => immediate
2015-08-06 09:55 alostale Severity major => minor
2015-08-06 09:55 alostale Status new => scheduled
2015-08-06 09:55 alostale Relationship deleted caused by 0030204
2015-08-06 09:55 alostale Relationship added caused by 0015379
2015-08-06 09:56 alostale Review Assigned To => gorkaion
2015-08-06 15:04 shuehner Issue Monitored: shuehner
2015-08-06 16:26 alostale Note Added: 0079225
2015-08-06 16:27 alostale Note Edited: 0079225 View Revisions
2015-08-06 16:41 hgbot Checkin
2015-08-06 16:41 hgbot Note Added: 0079226
2015-08-06 16:41 hgbot Checkin
2015-08-06 16:41 hgbot Note Added: 0079227
2015-08-06 16:41 hgbot Status scheduled => resolved
2015-08-06 16:41 hgbot Resolution open => fixed
2015-08-06 16:41 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f5cac263bc766a60806d547e06317e1a54adcfa7 [^]
2015-08-06 16:47 alostale Note Added: 0079228
2015-08-07 10:21 gorkaion Note Added: 0079244
2015-08-07 10:21 gorkaion Status resolved => closed
2015-08-20 23:16 hudsonbot Checkin
2015-08-20 23:16 hudsonbot Note Added: 0079530
2015-08-20 23:16 hudsonbot Checkin
2015-08-20 23:16 hudsonbot Note Added: 0079531


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker