Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0027273Openbravo ERP01. General setuppublic2014-08-04 15:132014-08-08 18:54
priyam 
AtulOpenbravo 
immediatecriticalhave not tried
closedfixed 
5
 
3.0PR14Q4 
daniOpenbravo
Core
Automated tests
2014-07-25
pi
https://code.openbravo.com/erp/devel/pi/rev/c3d258163d89 [^]
No
0027273: Upgrade from 2.50 to 3.0 fails
Upgrade of ERP 2.50 to latest pi fails in build validation due the changeset
https://code.openbravo.com/erp/devel/pi/rev/c3d258163d89 [^]

<error snip>

buildvalidation:
      [sql] Executing commands
      [sql] 2 of 2 SQL statements executed successfully

buildvalidation:
     [java] 0 [main] INFO org.openbravo.buildvalidation.BuildValidationHandler - Executing build validation: org.openbravo.buildvalidation.AccountingTabs
     [java] 707 [main] INFO org.openbravo.buildvalidation.BuildValidationHandler - Executing build validation: org.openbravo.buildvalidation.DuplicateDocExchangeRate
     [java] 747 [main] INFO org.openbravo.buildvalidation.BuildValidationHandler - Executing build validation: org.openbravo.buildvalidation.DuplicatedJavaPackage
     [java] 765 [main] INFO org.openbravo.buildvalidation.BuildValidationHandler - Executing build validation: org.openbravo.buildvalidation.DuplicatedOrgWarehouse
     [java] 784 [main] ERROR org.openbravo.buildvalidation.DuplicatedOrgWarehouseData - SQL error in query: SELECT count(*) AS EXISTING FROM ad_org_warehouse GROUP BY ad_org_id, m_warehouse_id HAVING count(*)>1Exception:org.postgresql.util.PSQLException: ERROR: relation "ad_org_warehouse" does not exist
     [java] Position: 41
     [java] 792 [main] ERROR org.openbravo.buildvalidation.BuildValidationHandler - The build validation failed.
     [java] 796 [main] ERROR org.openbravo.buildvalidation.BuildValidationHandler - Error executing build-validation org.openbravo.buildvalidation.DuplicatedOrgWarehouse: @CODE=0@ERROR: relation "ad_org_warehouse" does not exist
     [java] Position: 41
     [java] The build validation couldn't be properly executed
     [java]

BUILD FAILED
</error snip>

Complete log : https://ci.openbravo.com/job/up-2.50topi-pgsql/33/consoleText [^]
1) check out erp/devel/pi
2) update the workspaceto latest 2.50MP51
3) Install.source
4) Update the workspace source to latest pi (or to the changeset causing this failure)
5) # 2.50 sampledata needs to be fixed, otherwise some new 3.0 validation will fail
"delete from C_BP_CUSTOMER_ACCT where C_BP_CUSTOMER_ACCT_id in ('1000020', '1000019', '1000024', '1000022', '1000021');"
6) smartbuild -Dlocal=no

and Fails in build validation
[java] 784 [main] ERROR org.openbravo.buildvalidation.DuplicatedOrgWarehouseData - SQL error in query: SELECT count(*) AS EXISTING FROM ad_org_warehouse GROUP BY ad_org_id, m_warehouse_id HAVING count(*)>1Exception:org.postgresql.util.PSQLException: ERROR: relation "ad_org_warehouse" does not exist
No tags attached.
caused by defect 0027056 closed daniOpenbravo It is possible to assign more than once the same warehouse to one organization 
Issue History
2014-08-04 15:13priyamNew Issue
2014-08-04 15:13priyamAssigned To => AtulOpenbravo
2014-08-04 15:13priyamModules => Core
2014-08-04 15:13priyamTriggers an Emergency Pack => No
2014-08-04 15:20shuehnerNote Added: 0069070
2014-08-04 15:20shuehnerIssue Monitored: shuehner
2014-08-04 15:21shuehnerRegression level => Automated tests
2014-08-04 15:21shuehnerRegression date => 2014-07-25
2014-08-04 15:21shuehnerRegression introduced in release => pi
2014-08-04 15:21shuehnerRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/c3d258163d89 [^]
2014-08-04 15:21shuehnerRelationship addedcaused by 0027056
2014-08-04 15:44AtulOpenbravoStatusnew => scheduled
2014-08-04 15:44AtulOpenbravofix_in_branch => pi
2014-08-04 20:01AtulOpenbravoReview Assigned To => priyam
2014-08-04 20:01AtulOpenbravofix_in_branchpi =>
2014-08-04 20:06hgbotCheckin
2014-08-04 20:06hgbotNote Added: 0069081
2014-08-04 20:06hgbotStatusscheduled => resolved
2014-08-04 20:06hgbotResolutionopen => fixed
2014-08-04 20:06hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a2c903436f862a0290c61a7f9bbfc0aa9a7edf75 [^]
2014-08-06 13:28SandrahuguetStatusresolved => new
2014-08-06 13:28SandrahuguetResolutionfixed => open
2014-08-06 13:29SandrahuguetReview Assigned Topriyam => daniOpenbravo
2014-08-06 13:29SandrahuguetStatusnew => scheduled
2014-08-06 13:29Sandrahuguetfix_in_branch => pi
2014-08-06 13:29SandrahuguetStatusscheduled => resolved
2014-08-06 13:29SandrahuguetResolutionopen => fixed
2014-08-08 09:14daniOpenbravoNote Added: 0069121
2014-08-08 09:14daniOpenbravoStatusresolved => closed
2014-08-08 09:14daniOpenbravoFixed in Version => 3.0PR14Q4
2014-08-08 18:54hudsonbotCheckin
2014-08-08 18:54hudsonbotNote Added: 0069262

Notes
(0069070)
shuehner   
2014-08-04 15:20   
Special case.
When updating from 2.50 to 3.0 the 3.0 buildvalidations are run against the 2.50 database.

In this case this validation uses the ad_org_warehouse table which did not exist in 2.50.

In that case the check can be skipped but must not fail.

So a extra step needs to be added to not run that sql when the table does not exist.

This is not first case so example should exist in some other build-validation doing that check (does a table exist)
(0069081)
hgbot   
2014-08-04 20:06   
Repository: erp/devel/pi
Changeset: a2c903436f862a0290c61a7f9bbfc0aa9a7edf75
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Mon Aug 04 19:31:59 2014 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/a2c903436f862a0290c61a7f9bbfc0aa9a7edf75 [^]

Fixes Issue 0027273:Avoids upgrade failure from 2.50 to 3.0

---
M src-util/buildvalidation/build/classes/org/openbravo/buildvalidation/DuplicatedOrgWarehouse.class
M src-util/buildvalidation/build/classes/org/openbravo/buildvalidation/DuplicatedOrgWarehouseData.class
M src-util/buildvalidation/build/javasqlc/src/org/openbravo/buildvalidation/DuplicatedOrgWarehouseData.java
M src-util/buildvalidation/src/org/openbravo/buildvalidation/DuplicatedOrgWarehouse.java
M src-util/buildvalidation/src/org/openbravo/buildvalidation/DuplicatedOrgWarehouse_data.xsql
---
(0069121)
daniOpenbravo   
2014-08-08 09:14   
Verified.
(0069262)
hudsonbot   
2014-08-08 18:54   
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/4450016dee64 [^]
Maturity status: Test