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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0035760
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 00. Application dictionarymajoralways2017-04-12 00:182017-05-29 17:43
ReporterletcharrenView Statuspublic 
Assigned Toinigosanchez 
PrioritynormalResolutionfixedFixed in Version3.0PR17Q3
StatusclosedFix in branchFixed in SCM revision3d40af5ffd28
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version3.0PR17Q1SCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0035760: Can not create computed columns in ad_org or ad_client tables

DescriptionCan not create computed columns in ad_org or ad_client tables. When you want to export the changes (generate.entities), the attached error is shown.
Steps To Reproduce1- Create a computed column in table ad_org or in ad_client.
2- Create a field in the organization/client corresponding to the created column.
3- Execute "ant export.database" in order to export changes.
4- The attached error is displayed.
TagsNo tags attached.
Attached Files? file icon log [^] (6,814 bytes) 2017-04-12 00:18 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0096506)
inigosanchez (developer)
2017-05-10 12:27

Manual tests:

1º.- Normal case > Create computed column for Assets table + Field for the created computed column > ant export.database > Check that ./src-gen/org/openbravo/model/financialmgmt/assetmgmt/Asset_ComputedColumns.java is generated as expects (implements both interfaces).

2º.- Case Org > Create computed column for Organization table + Field for the created computed column > ant export.database > Check that ./src-gen/org/openbravo/model/common/enterprise/Organization_ComputedColumns.java is generated as expects (only implements ClientEnabled).

3º.- Case Client > Create computed column for Client table + Field for the created computed column > ant export.database > Check that ./src-gen/org/openbravo/model/ad/system/Client_ComputedColumns.java is generated as expects (only implements OrganizationEnabled).
(0096546)
hgbot (developer)
2017-05-12 10:14

Repository: erp/devel/pi
Changeset: 3d40af5ffd2811557afcefb8791f3de9e9e6e1bc
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Fri May 12 10:13:57 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/3d40af5ffd2811557afcefb8791f3de9e9e6e1bc [^]

Fixed issue 35760:Can not create computed columns in ad_org or ad_client tables

The problem was that it was not possible to create and export a computed column in ad_org and ad_client tables.
This problem was because computed columns of organization entity should have not organization as a property and
it should have not implement OrganizationEnabled. At the same time, computed columns of client entity should have
not client as a property and it should have not implement ClientEnabled.

In order to fix this problem two changes have been done:
- Now generate entities task is take into account when a computed column is created for Organization or Client
entities. Besides, when the computed column class is created, entityComputedColumns.ftl has the needed logic to
decided if implements ClientEnabled, OrganizationEnabled or both.
- When the Hibernate mapping for the tables and entities are created (DalMappingGenerator),
generateComputedColumnsClassMapping method is take into account when the computed column is for Organization
entity or Client entity.

It is now possible to create a computed column in the ad_org and ad_client tables.

---
M src/org/openbravo/base/gen/GenerateEntitiesTask.java
M src/org/openbravo/base/gen/entityComputedColumns.ftl
M src/org/openbravo/dal/core/DalMappingGenerator.java
---
(0096591)
hgbot (developer)
2017-05-15 13:17

Repository: erp/devel/pi
Changeset: 658d65dc2006ea6c0c043694c7c2d76714b9183e
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon May 15 13:17:01 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/658d65dc2006ea6c0c043694c7c2d76714b9183e [^]

related to bug 35760: can't create computed columns in ad_org or ad_client

  Be more specific when checking whether client/org property should be added to
  computed column mapping.

---
M src/org/openbravo/dal/core/DalMappingGenerator.java
---
(0096592)
alostale (manager)
2017-05-15 13:18

reviewed + tested
(0096962)
hudsonbot (developer)
2017-05-29 17:43

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/1ee70113bdc4 [^]
Maturity status: Test
(0096967)
hudsonbot (developer)
2017-05-29 17:43

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

- Issue History
Date Modified Username Field Change
2017-04-12 00:18 letcharren New Issue
2017-04-12 00:18 letcharren Assigned To => platform
2017-04-12 00:18 letcharren File Added: log
2017-04-12 00:18 letcharren Modules => Core
2017-04-12 00:18 letcharren Resolution time => 1493676000
2017-04-12 00:18 letcharren Triggers an Emergency Pack => No
2017-05-09 11:33 inigosanchez Assigned To platform => inigosanchez
2017-05-09 11:33 inigosanchez Status new => acknowledged
2017-05-10 12:27 inigosanchez Status acknowledged => scheduled
2017-05-10 12:27 inigosanchez Note Added: 0096506
2017-05-10 12:30 inigosanchez Summary Can not create computed columns in ad_org table => Can not create computed columns in ad_org or ad_client tables
2017-05-10 12:30 inigosanchez Description Updated View Revisions
2017-05-10 12:30 inigosanchez Steps to Reproduce Updated View Revisions
2017-05-10 12:32 inigosanchez Review Assigned To => alostale
2017-05-12 10:14 hgbot Checkin
2017-05-12 10:14 hgbot Note Added: 0096546
2017-05-12 10:14 hgbot Status scheduled => resolved
2017-05-12 10:14 hgbot Resolution open => fixed
2017-05-12 10:14 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/3d40af5ffd2811557afcefb8791f3de9e9e6e1bc [^]
2017-05-12 10:16 inigosanchez Fixed in Version => 3.0PR17Q3
2017-05-15 13:17 hgbot Checkin
2017-05-15 13:17 hgbot Note Added: 0096591
2017-05-15 13:18 alostale Note Added: 0096592
2017-05-15 13:18 alostale Status resolved => closed
2017-05-29 17:43 hudsonbot Checkin
2017-05-29 17:43 hudsonbot Note Added: 0096962
2017-05-29 17:43 hudsonbot Checkin
2017-05-29 17:43 hudsonbot Note Added: 0096967


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker