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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0030944
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 00. Application dictionaryminorhave not tried2015-09-28 09:552015-10-01 03:36
ReporteralostaleView Statuspublic 
Assigned Todmiguelez 
PrioritynormalResolutionfixedFixed in Version3.0PR15Q4
StatusclosedFix in branchFixed in SCM revision1bd0b0e1846f
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toaferraz
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0030944: some auxiliary inputs might be useless

DescriptionAuxiliary inputs can be used to define different default values for a field in a tab than the one defined in its associated column. This is done by naming the auxiliary input with the same name that column has.

There are some occurrences of this case in the distribution [1]. From them there are 4 cases for C_BPartner_ID in lines for these windows, they are present in the code since the beginning of the mercurial repository:

Goods Shipment
Goods Receipt
Purchase Invoice
Sales Invoice

They all look similar, having the code as, initially they were @C_BPartner_ID@ but they were changed to fix 0030495:

@SQL=SELECT COALESCE(C_InvoiceLine.C_BPartner_ID, C_Invoice.C_BPartner_ID) AS C_BPartner_ID
FROM C_Invoice JOIN C_InvoiceLine ON (C_Invoice.C_Invoice_ID = C_InvoiceLine.C_Invoice_ID)
WHERE C_InvoiceLine_ID=@C_InvoiceLine_ID@

There are 2 cases:

1. When in NEW mode (creating a new record in lines): they are always NULL because C_InvoiceLine_ID is not set yet. In this case the auxiliary input has no effect other than setting BP as null when which is the case if the column has no default.
2. When in EDIT mode: they take a value. After fixing issue 0030927, the auxiliary input value shouldn't overwrite the current column value. As there is no way to distinguish column and auxiliary input value (nor in display/readonly logic nor in callouts), actual value should be always preserved. Furthermore, none of them are used in display/readonly logic [2].

Because of this, these auxiliary inputs looks not to have any usage.


---
[1] Use this query to obtain auxiliary inputs named as a column in the tab they are defined in:
select i.name, w.name, t.name, f.name, i.code
from ad_auxiliarinput i, ad_field f, ad_column c, ad_window w, ad_tab t
where f.ad_tab_id = i.ad_tab_id
and f.ad_column_id = c.ad_column_id
and c.columnname ilike i.name
and t.ad_tab_id = f.ad_tab_id
and w.ad_window_id = t.ad_window_id

[2] Query to check if these auxiliary inputs are used in display/readonly logic, which returns no rows:
select i.name, w.name, t.name, f.name, i.code
from ad_auxiliarinput i, ad_field f, ad_column c, ad_window w, ad_tab t
where f.ad_tab_id = i.ad_tab_id
and f.ad_column_id = c.ad_column_id
and c.columnname ilike i.name
and t.ad_tab_id = f.ad_tab_id
and w.ad_window_id = t.ad_window_id
and (f.displaylogic ilike '%'||i.name||'%' or c.readonlylogic ilike '%'||i.name||'%' )
Steps To Reproduce-
Proposed SolutionReview if there is any reason for these auxiliary inputs to exits, if not remove them.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0030927 closedalostale Auxiliary Input value is shown in Form view if its name is the same than the column associated to the field of the tab 
related to defect 0030495 closedaferraz Business Partner dimension is overwritten in Invoice Lines if another field is updated after changing it 

-  Notes
(0080714)
hgbot (developer)
2015-09-29 16:46

Repository: erp/devel/pi
Changeset: 1bd0b0e1846f5c8d5531ced3dacd6c622bd8afb6
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Tue Sep 29 16:46:01 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/1bd0b0e1846f5c8d5531ced3dacd6c622bd8afb6 [^]

Fixes Issue 30944. Reverts fix done in Issue 30495 since it is no
longer needed due to a fix for Issue 30927 done by platform team.

---
M src-db/database/sourcedata/AD_AUXILIARINPUT.xml
---
(0080719)
aferraz (manager)
2015-09-29 18:02

Code review + Testing OK
(0080763)
hudsonbot (developer)
2015-10-01 03:36

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

- Issue History
Date Modified Username Field Change
2015-09-28 09:55 alostale New Issue
2015-09-28 09:55 alostale Assigned To => Triage Finance
2015-09-28 09:55 alostale Modules => Core
2015-09-28 09:55 alostale Triggers an Emergency Pack => No
2015-09-28 09:55 alostale Issue Monitored: alostale
2015-09-28 09:55 alostale Relationship added related to 0030927
2015-09-28 09:58 alostale Description Updated View Revisions
2015-09-28 10:14 alostale Relationship added related to 0030495
2015-09-28 10:16 alostale Description Updated View Revisions
2015-09-29 16:46 hgbot Checkin
2015-09-29 16:46 hgbot Note Added: 0080714
2015-09-29 16:46 hgbot Status new => resolved
2015-09-29 16:46 hgbot Resolution open => fixed
2015-09-29 16:46 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/1bd0b0e1846f5c8d5531ced3dacd6c622bd8afb6 [^]
2015-09-29 16:49 aferraz Assigned To Triage Finance => dmiguelez
2015-09-29 18:02 aferraz Review Assigned To => aferraz
2015-09-29 18:02 aferraz Note Added: 0080719
2015-09-29 18:02 aferraz Status resolved => closed
2015-09-29 18:02 aferraz Fixed in Version => 3.0PR15Q4
2015-10-01 03:36 hudsonbot Checkin
2015-10-01 03:36 hudsonbot Note Added: 0080763


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker