Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0031038Openbravo ERPA. Platformpublic2015-10-05 09:512015-10-05 10:05
alostale 
alostale 
immediateminorhave not tried
closedfixed 
5
 
3.0PR16Q1 
Core
No
0031038: API change: default value defined as preference will prevail over default defined in column
So far default values defined as a preference were not taken into account in case the column that should be applied to had a default value.

Being preference more explicit, they should prevail over column's default overwriting it.
See 0030993
Accept this behavioral API change.

Checking in a clean distribution + retail instance.

There are 11 [1] cases where a preference is used to define default value for a field. None of these cases are affected by this change because in all the cases the column associated with the field defaulted by the preference has no default value [2].

[1]
select *
  from ad_preference p
  where exists (select 1 from ad_column where columnname ilike p.attribute)

[2]
  select p.attribute, p.value, w.name, t.name
  from ad_preference p, ad_column c, ad_field f, ad_tab t, ad_window w
  where c.columnname ilike p.attribute
  and f.ad_column_id = c.ad_column_id
  and f.ad_tab_id = t.ad_tab_id
  and t.ad_window_id = p.ad_window_id
  and w.ad_window_id = t.ad_window_id
  and c.defaultvalue is not null
Approved
blocks defect 00309933.0PR16Q1 closed alostale It is not possible to define a preference as default value when column has a default defined in ad_column 
Issue History
2015-10-05 09:51alostaleNew Issue
2015-10-05 09:51alostaleAssigned To => alostale
2015-10-05 09:51alostaleModules => Core
2015-10-05 09:51alostaleTriggers an Emergency Pack => No
2015-10-05 09:51alostaleRelationship addedblocks 0030993
2015-10-05 09:53alostaleTag Attached: Approved
2015-10-05 09:53alostaleNote Added: 0080808
2015-10-05 10:04alostaleStatusnew => scheduled
2015-10-05 10:04alostaleStatusscheduled => resolved
2015-10-05 10:04alostaleFixed in SCM revision => -
2015-10-05 10:04alostaleResolutionopen => fixed
2015-10-05 10:05alostaleFixed in Version => 3.0PR16Q1
2015-10-05 10:05alostaleFixed in SCM revision- => http://code.openbravo.com/erp/devel/pi/rev/241c38dab7cedb1e44d3d130d73315dcb7caf479 [^]
2015-10-05 10:05alostaleStatusresolved => closed

Notes
(0080808)
alostale   
2015-10-05 09:53   
Approved after discussion with DME