You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Nicolas Malin (Jira)" <ji...@apache.org> on 2026/05/27 09:21:00 UTC

[jira] [Closed] (OFBIZ-13349) Add condition-date on entity-condition element

     [ https://issues.apache.org/jira/browse/OFBIZ-13349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nicolas Malin closed OFBIZ-13349.
---------------------------------
    Resolution: Done

> Add condition-date on entity-condition element
> ----------------------------------------------
>
>                 Key: OFBIZ-13349
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-13349
>             Project: OFBiz
>          Issue Type: Improvement
>            Reporter: Nicolas Malin
>            Assignee: Nicolas Malin
>            Priority: Minor
>
> On screen or form actions, I propose to add a condition-date element on <entity-condition> to directly add historic filter.
> Currently, element entity-condition can have a boolean attribute filter-by-date that filter your entity list with fromDate/thruDate on now date only.
> If you need to navigate on history or use some other date fields, you can't use it and need to add a complex condition by hand
> With condition-date you can select the date value to use and date fields for the filter.
> Example :
> Complex :
> {code:java}
>   <entity-condition entity-name="PartyContactDetailByPurpose">
>       <condition-list>
>           <condition-expr field-name="partyId" operator="equals" from-field="parameters.partyId"/>
>           <condition-date from-field="order.orderDate" ignore-if-empty="true">
>               <date-field field-name="fromDate">
>               <date-field field-name="thruDate">
>               <date-field field-name="purposeFromDate">
>               <date-field field-name="purposeThruDate">
>           </condition-date>
>       </condition-list>
>   </entity-condition>{code}
>   
>  Simple :
> {code:java}
>   <entity-condition entity-name="PartyContactDetailByPurpose">
>       <condition-list>
>           <condition-expr field-name="partyId" operator="equals" from-field="parameters.partyId"/>
>           <condition-date from-field="order.orderDate"/>
>       </condition-list>
>   </entity-condition>{code}
>  
>  Default :
> {code:java}
>   <entity-condition entity-name="PartyContactDetailByPurpose">
>       <condition-list>
>           <condition-expr field-name="partyId" operator="equals" from-field="parameters.partyId"/>
>           <condition-date/>
>       </condition-list>
>   </entity-condition>
>     Equivalent to
>   <entity-condition entity-name="PartyContactDetailByPurpose" filter-by-date="true">
>       <condition-list>
>           <condition-expr field-name="partyId" operator="equals" from-field="parameters.partyId"/>
>       </condition-list>
>   </entity-condition>{code}
> I focused this functionality for widget element, entity-condition is also used on entity-view, so I need to improve it to support this others case



--
This message was sent by Atlassian Jira
(v8.20.10#820010)