Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030505Openbravo ERP00. Application dictionarypublic2015-08-06 09:522015-08-20 23:16
gorkaion 
alostale 
immediateminorhave not tried
closedfixed 
5
 
 
gorkaion
Core
Automated tests
2015-08-05
pi
http://code.openbravo.com/erp/devel/pi/rev/1f572104e426366ac67e9efc7bd74040f8142ac3 [^]
No
0030505: Compilation in 2.50 mode fails for Navigation Rules tab of Window, Tabs and Fields
There 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)
On 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 = ?
No tags attached.
caused by feature request 0015379 closed gorkaion Extend navigation model 
Issue History
2015-08-06 09:52gorkaionNew Issue
2015-08-06 09:52gorkaionAssigned To => alostale
2015-08-06 09:52gorkaionModules => Core
2015-08-06 09:52gorkaionTriggers an Emergency Pack => No
2015-08-06 09:54alostaleRelationship addedcaused by 0030204
2015-08-06 09:55alostaleRegression level => Automated tests
2015-08-06 09:55alostaleRegression date => 2015-08-05
2015-08-06 09:55alostaleRegression introduced in release => pi
2015-08-06 09:55alostaleRegression introduced by commit => http://code.openbravo.com/erp/devel/pi/rev/1f572104e426366ac67e9efc7bd74040f8142ac3 [^]
2015-08-06 09:55alostalePriorityhigh => immediate
2015-08-06 09:55alostaleSeveritymajor => minor
2015-08-06 09:55alostaleStatusnew => scheduled
2015-08-06 09:55alostaleRelationship deletedcaused by 0030204
2015-08-06 09:55alostaleRelationship addedcaused by 0015379
2015-08-06 09:56alostaleReview Assigned To => gorkaion
2015-08-06 15:04shuehnerIssue Monitored: shuehner
2015-08-06 16:26alostaleNote Added: 0079225
2015-08-06 16:27alostaleNote Edited: 0079225bug_revision_view_page.php?bugnote_id=0079225#r9168
2015-08-06 16:41hgbotCheckin
2015-08-06 16:41hgbotNote Added: 0079226
2015-08-06 16:41hgbotCheckin
2015-08-06 16:41hgbotNote Added: 0079227
2015-08-06 16:41hgbotStatusscheduled => resolved
2015-08-06 16:41hgbotResolutionopen => fixed
2015-08-06 16:41hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f5cac263bc766a60806d547e06317e1a54adcfa7 [^]
2015-08-06 16:47alostaleNote Added: 0079228
2015-08-07 10:21gorkaionNote Added: 0079244
2015-08-07 10:21gorkaionStatusresolved => closed
2015-08-20 23:16hudsonbotCheckin
2015-08-20 23:16hudsonbotNote Added: 0079530
2015-08-20 23:16hudsonbotCheckin
2015-08-20 23:16hudsonbotNote Added: 0079531

Notes
(0079225)
alostale   
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   
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   
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   
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   
2015-08-07 10:21   
checked that window is now properly created and compilation does not fail.
(0079530)
hudsonbot   
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   
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