Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0050356Openbravo ERPA. Platformpublic2022-09-27 17:232022-09-27 17:25
caristu 
Triage Platform Base 
highminorhave not tried
newopen 
5
 
 
Core
No
0050356: Do not used generated JS code for defining sort normalizers
Currently we are using some generated code to define the sort normalizer function used by some references. See an example here[1].

Instead of using generating code for defining the function:

sortNormalizer: function (item, field, context){ return OB.Utilities.yesNoSortNormalizer(item, field, context);}

we should generate agnostic content

sortNormalizer: OB.Utilities.yesNoSortNormalizer

[1] https://gitlab.com/openbravo/product/openbravo/-/blob/master/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/YesNoUIDefinition.java#L68 [^]
.
The main reason behind the current definition is that the normalizer functions are all defined in the ob-utilities file of the org.openbravo.client.application module, which is loaded after the code that defines the Smartclient types (because it is in a different component provider).

To avoid this we should move the definition of the normalizer functions from the ob-utilities file to a separate file that is imported with a component provider of a module that loads its content before the Smartclient types definition. One option could be to place them in the org.openbravo.client.kernel.module. Note this module already has a ob-kernel-utilities.js file.

The detected references with this problem so far are:
- YesNoUIDefinition
- ForeignKeyUIDefinition
- RelevantCharacteristicProperty
No tags attached.
Issue History
2022-09-27 17:23caristuNew Issue
2022-09-27 17:23caristuAssigned To => Triage Platform Base
2022-09-27 17:23caristuModules => Core
2022-09-27 17:23caristuTriggers an Emergency Pack => No
2022-09-27 17:25caristuDescription Updatedbug_revision_view_page.php?rev_id=24788#r24788

There are no notes attached to this issue.