Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029492Openbravo ERPK. Packagingpublic2015-04-01 14:362017-03-15 20:21
aldoescob 
alostale 
normalminoralways
closedfixed 
30CentOS 6.4
3.0PR14Q3.5 
3.0PR17Q2 
caristu
Google Chrome, Mozilla Firefox
Openbravo 3.0 Framework
No
0029492: Wrong export of a view
Openbravo exports bad a view (with ant export.database), what causes rebuild error. I created a SRCT_INVOICE_DDPPRL (view in the attached file)
Create view (in the example without some columns no-standard)in the database (and Openbravo Application Dictionary) and export it, try reinstall the module.
I changed xml file content and it works, but I think it will generate error in the future in the ant export.database with the module.
No tags attached.
related to design defect 0029444 acknowledged Triage Platform Base SETOF error due to wrong export of function 
has duplicate defect 0035393 closed platform IN clause in view not properly exported using postgresql 
related to defect 0031149 acknowledged Triage Platform Base "minus" word in PL function shows warning when exporting db 
related to design defect 0025433 acknowledged Triage Platform Base Script export.database changes return type stored procedure 
related to backport 00354673.0PR17Q1 closed alostale Wrong export of a view 
related to defect 0035474 closed alostale Function based indexes do not support arithmetic operations on columns 
blocks defect 0035341 closed mcobas Wrong orders shown in "Create Invoices From Orders" window 
txt ERROR_CORCHETE.txt (27,542) 2015-04-01 14:36
https://issues.openbravo.com/file_download.php?file_id=7956&type=bug
Issue History
2015-04-01 14:36aldoescobNew Issue
2015-04-01 14:36aldoescobAssigned To => shuehner
2015-04-01 14:36aldoescobFile Added: ERROR_CORCHETE.txt
2015-04-01 14:36aldoescobWeb browser => Google Chrome, Mozilla Firefox
2015-04-01 14:36aldoescobModules => Openbravo 3.0 Framework
2015-04-01 14:36aldoescobTriggers an Emergency Pack => No
2015-05-12 16:46shuehnerAssigned Toshuehner => platform
2015-11-10 16:30alostaleRelationship addedrelated to 0029444
2015-11-10 16:30alostaleStatusnew => acknowledged
2015-11-10 16:32alostaleRelationship addedrelated to 0031149
2015-11-10 16:50alostaleRelationship addedrelated to 0025433
2015-12-03 22:14aldoescobNote Added: 0082565
2015-12-03 22:16aldoescobNote Edited: 0082565bug_revision_view_page.php?bugnote_id=0082565#r10394
2017-03-02 14:05alostaleWeb browserGoogle Chrome, Mozilla Firefox => Google Chrome, Mozilla Firefox
2017-03-02 14:05alostaleNote Added: 0094686
2017-03-02 14:05alostaleTypedefect => design defect
2017-03-02 14:06alostaleRelationship addedhas duplicate 0035393
2017-03-09 09:03hgbotCheckin
2017-03-09 09:03hgbotNote Added: 0094846
2017-03-09 09:03hgbotStatusacknowledged => resolved
2017-03-09 09:03hgbotResolutionopen => fixed
2017-03-09 09:03hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/4e1a7fb052d2527f1419e9c9394f2bba4d8edc3c [^]
2017-03-09 09:03alostaleAssigned Toplatform => alostale
2017-03-09 09:03alostaleReview Assigned To => caristu
2017-03-09 09:03alostaleWeb browserGoogle Chrome, Mozilla Firefox => Google Chrome, Mozilla Firefox
2017-03-09 12:34vmromanosRelationship addedblocks 0035341
2017-03-09 12:45hgbotCheckin
2017-03-09 12:45hgbotNote Added: 0094872
2017-03-09 12:45hgbotCheckin
2017-03-09 12:45hgbotNote Added: 0094873
2017-03-09 12:45hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/4e1a7fb052d2527f1419e9c9394f2bba4d8edc3c [^] => http://code.openbravo.com/erp/devel/dbsm-main/rev/feb12dbe044016971306fec49b52a8934d15a135 [^]
2017-03-09 12:53alostaleIssue cloned0035467
2017-03-09 12:54alostaleRelationship addedrelated to 0035467
2017-03-09 14:15caristuNote Added: 0094878
2017-03-09 14:15caristuStatusresolved => closed
2017-03-09 14:15caristuFixed in Version => 3.0PR17Q2
2017-03-10 13:49alostaleRelationship addedrelated to 0035474
2017-03-15 20:21hudsonbotCheckin
2017-03-15 20:21hudsonbotNote Added: 0095280

Notes
(0082565)
aldoescob   
2015-12-03 22:14   
(edited on: 2015-12-03 22:16)
look at that "]" in "...8B723BF2C23E3774A']))..." in the Original xml file's content generated in export.database; this "]" generates error when the module is installed

(0094686)
alostale   
2017-03-02 14:05   
This is caused because of how PG internally stores the view once created. Regardless the original statement used for its creation, PG does some transformation not being possible to retrieve the original code.
(0094846)
hgbot   
2017-03-09 09:03   
Repository: erp/devel/pi
Changeset: 4e1a7fb052d2527f1419e9c9394f2bba4d8edc3c
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Mar 09 09:02:05 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/4e1a7fb052d2527f1419e9c9394f2bba4d8edc3c [^]

fixed bug 29492: views with several IN or NOT IN clasues fail in PG

  In PG, views that contain more than one IN or NOT IN clauses were not correctly
  exported.

  The regexps that parses and PG IN and NOT IN clauses was including from the begining
  of 1st clause till the end of the last one.

  These regexps have been fixed to be more restrictive so that they stop looking
  for the IN contents on first ].

---
M src-db/database/lib/dbsourcemanager.jar
---
(0094872)
hgbot   
2017-03-09 12:45   
Repository: erp/devel/dbsm-main
Changeset: 9417f8656b488bbb678c4e7049fd3d0f1ab600b5
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Mar 09 08:56:11 2017 +0100
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/9417f8656b488bbb678c4e7049fd3d0f1ab600b5 [^]

related to bug 29492: added test cases

  Added failing (before fix 29492) test cases: views with more than one IN or
  NOT IN clauses are not correctly converted in PG.

---
M src-test/src/org/openbravo/dbsm/test/model/Views.java
A src-test/model/views/IN_VIEW.xml
A src-test/model/views/NOT_IN_VIEW.xml
---
(0094873)
hgbot   
2017-03-09 12:45   
Repository: erp/devel/dbsm-main
Changeset: feb12dbe044016971306fec49b52a8934d15a135
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Mar 09 08:59:50 2017 +0100
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/feb12dbe044016971306fec49b52a8934d15a135 [^]

fixed bug 29492: views with several IN or NOT IN clasues fail in PG

  In PG, views that contain more than one IN or NOT IN clauses were not correctly
  exported.

  The regexps that parses and PG IN and NOT IN clauses was including from the begining
  of 1st clause till the end of the last one.

  These regexps have been fixed to be more restrictive so that they stop looking
  for the IN contents on first ].

---
M src/org/apache/ddlutils/platform/postgresql/PostgreSQLStandarization.java
---
(0094878)
caristu   
2017-03-09 14:15   
Code reviewed + tested OK in pi@7c508cdd7e2e
(0095280)
hudsonbot   
2017-03-15 20: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/54e102bef53e [^]
Maturity status: Test