Boolean Logic Expression Enhancements
Description
Environment
causes
relates to
testing discovered
Activity
Heng Sin Low July 20, 2021 at 3:22 AM
Hi @Carlos Ruiz, will resolve at https://idempiere.atlassian.net/browse/IDEMPIERE-4881#icft=IDEMPIERE-4881 instead.
Carlos Ruiz July 19, 2021 at 4:34 PM
In a local debug trying to find the cause of https://idempiere.atlassian.net/browse/IDEMPIERE-4881
configured the DisplayLogic of the style as: @NetAmtToInvoice@=0
I noticed that sometimes WEditor.EvaluateeWrapper.get_ValueAsString was returning “0” for the context variable NetAmtToInvoice, and in other orders it was returning “0.00” - so, probably that’s the reason why it doesn’t work here.
Carlos Ruiz July 19, 2021 at 4:30 PM
The problem described in ticket https://idempiere.atlassian.net/browse/IDEMPIERE-4881#icft=IDEMPIERE-4881 seems to be related to the changes here.
Heng Sin Low June 11, 2021 at 5:59 AM
I’ve created https://idempiere.atlassian.net/browse/IDEMPIERE-4827 for the variable resolution (Evaluatee implementation) issue.
Chuck Boecking June 10, 2021 at 2:29 PM
Awesome and thank you!
Here are the implementations I have found. I hope this helps!
Env.parseContext(...)
MMailText.parse(...) and MMailText.parseVariable(...)
Evaluator.java
GridField.getDefaultFrom...(...)
Heng Sin Low June 10, 2021 at 7:45 AM
Hi @Carlos Ruiz ,
The scope of this ticket is just the boolean logic expression, it doesn’t touch the variable resolution part (i.e, the “@…@” part is not touch).
If you wish, please open a new ticket for that.
Regards,
Low
Carlos Ruiz June 10, 2021 at 7:12 AM
Great addition @Heng Sin Low - I think something that would be highly desirable would be to have a single consistent way of managing the *Logic fields.
I have tried to document that in wiki but is really hard to get a single point - my last finding for example was that @AnyVariable.Column@ syntax doesn’t work the same everywhere:
In process parameters this syntax just works for columnnames where the tablename is implicit in the name (like Table Direct).
In Tab Display Logic this notation doesn't work
And I think there are some points where the foreign key is with a dot, and other points where the foreign key is within < >
That’s really crazy to maintain and remember, every time I need something special on context logic and it doesn’t work I need to go to debug mode.
For sure this is maybe out of scope of this ticket, I’m just trying to call the attention and if it’s possible to do it, or open a new wish ticket.
Implement the following enhancements for boolean logic expressions (readonly, display and mandatory):
() support
add NOT ($!), <=, >= and Regular Expression Match (~) operators
add unit test case