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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0028584
TypeCategorySeverityReproducibilityDate SubmittedLast Update
design defect[Openbravo ERP] A. Platformmajorhave not tried2015-01-13 12:332015-02-02 16:41
ReporterjecharriView Statuspublic 
Assigned ToAugustoMauch 
PrioritynormalResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browserGoogle Chrome
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0028584: Auxiliary input vs display logic does not work fine in all the cases

DescriptionAuxiliary input vs display logic does not work fine in all the cases
Steps To Reproduce-Create an auxiliary input for window "Product - Product"
the validation code=@SQL=SELECT CASE when m_product_category_Id ='0C20B3F7AB234915B2239FCD8BE10CD1' then 'Y' else 'N' end FROM M_PRODUCt WHERE M_PRODUCT_ID = @M_PRODUCT_ID@

-Go to "windows, tabs and fields" and set the following display logic to field "brand" in product window "@Product_cat@='Y'"

When the product category is "Backpacks & Travel" the field brand will be displayed. White valley sampledata

The display logic works fine but it does not work when you are editing in form view. Attached a video
TagsNo tags attached.
Attached Fileszip file icon 15_01_13_12_33_02.mp4.zip [^] (2,548,525 bytes) 2015-01-13 12:33

- Relationships Relation Graph ] Dependency Graph ]
has duplicate design defect 0025152 closedAugustoMauch Problems when using an auxiliary input in display logics 

-  Notes
(0073468)
alostale (manager)
2015-01-13 17:08

Moving to design defect: in order to properly implement it, it would be required to parse the SQL in the auxiliary input to detect which fields in the current window participate in that logic to mark those a dynamic columns. Once they are dynamic changes on them should trigger a backend call to recalculate the auxiliary input value.

== Alternative solution with current platform ==

Do not use an auxiliary input.

Instead set the displayLogic to something like:

myFunction(@M_Product_Category_ID@, item, form, currentValues, context)

where myFunction is a javascript function, in this way current parser would detect M_Product_Category_ID as dynamic and would invoke myFunction whenever it changes.

To implement myFunction:

If it is possible to evaluate the display logic synchronously based on local values, do it and return true if the field should be shown or false if not.

If it requires backend evaluation, implement like:

myFunction = function (newValue, item, form, currentValues, context) {
  var callback = function(data) {
    // evaluate here the display logic, item is the field to show/hide
    if (show) {
      item.show();
    } else {
      item.hide();
    }
  }
  invokeActionHandler(callback);
  return item.isVisible(); // keep visibility till callback is executed
}

- Issue History
Date Modified Username Field Change
2015-01-13 12:33 jecharri New Issue
2015-01-13 12:33 jecharri Assigned To => AugustoMauch
2015-01-13 12:34 jecharri File Added: 15_01_13_12_33_02.mp4.zip
2015-01-13 12:34 jecharri Web browser => Google Chrome
2015-01-13 12:34 jecharri Modules => Core
2015-01-13 12:34 jecharri Resolution time => 1421276400
2015-01-13 12:34 jecharri Triggers an Emergency Pack => No
2015-01-13 12:34 jecharri Web browser Google Chrome => Google Chrome
2015-01-13 12:34 jecharri Priority urgent => immediate
2015-01-13 12:42 extra Issue Monitored: extra
2015-01-13 17:08 alostale Web browser Google Chrome => Google Chrome
2015-01-13 17:08 alostale Resolution time 1421276400 =>
2015-01-13 17:08 alostale Note Added: 0073468
2015-01-13 17:08 alostale Priority immediate => normal
2015-01-13 17:08 alostale Type defect => design defect
2015-02-02 16:41 alostale Web browser Google Chrome => Google Chrome
2015-02-02 16:41 alostale Target Version 3.0PR15Q2 =>
2016-09-02 08:28 alostale Relationship added has duplicate 0025152


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker