[ 
https://issues.apache.org/jira/browse/OFBIZ-5869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14253140#comment-14253140
 ] 

Jacques Le Roux commented on OFBIZ-5869:
----------------------------------------

Hi Leon,

Your changes were not wrong, just that there were unneeded.

If you follow the implementation path of EntityQuery.makeDateCondition() method 
when filterByDateMoment is null, you will see that 
EntityUtil.getFilterByDateExpr() ends with 
EntityDateFilterCondition.makeCondition() which uses 
UtilDateTime.nowTimestamp().

Here is an example of the calling stack

{code}
EntityDateFilterCondition.makeCondition() line: 98      
EntityDateFilterCondition.checkCondition(ModelEntity) line: 60  
EntityJoinOperator.validateSql(ModelEntity, List<EntityCondition>) line: 177    
EntityConditionList<T>(EntityConditionListBase<T>).checkCondition(ModelEntity) 
line: 84 
EntityJoinOperator.validateSql(ModelEntity, List<EntityCondition>) line: 177    
EntityConditionList<T>(EntityConditionListBase<T>).checkCondition(ModelEntity) 
line: 84 
GenericDelegator.find(String, EntityCondition, EntityCondition, Set<String>, 
List<String>, EntityFindOptions) line: 1767        
GenericDelegator.findList(String, EntityCondition, Set<String>, List<String>, 
EntityFindOptions, boolean) line: 1808    
EntityQuery.query(EntityFindOptions) line: 440  
EntityQuery.queryFirst() line: 405      
PaymentWorker.getPaymentAddress(Delegator, String) line: 162    
{code}

In the dev ML, we exchanged with Scott about that. I did not revert the R13.07 
changes which were needed.

> correction to changeset r1626462  and r1626463  
> ------------------------------------------------
>
>                 Key: OFBIZ-5869
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5869
>             Project: OFBiz
>          Issue Type: Bug
>          Components: ALL APPLICATIONS
>    Affects Versions: Release Branch 13.07, Trunk
>            Reporter: Leon
>            Assignee: Jacques Le Roux
>             Fix For: Upcoming Branch, 13.07.02
>
>         Attachments: OFBIZ-5869.patch
>
>
> There's error in this commit. e.g.
> – List<GenericValue> allPCMPs = 
> EntityUtil.filterByDate(delegator.findByAnd("PartyContactMechPurpose", 
> pcmpFindMap, null, false), true);
> ++ allPCWPs = EntityUtil.filterByDate(allPCWPs, null, "contactFromDate", 
> "contactThruDate", true);
> According to EntityUtil.filterByDate(List, EntityCondition, String, String 
> ,Boolean), it filter nothing if condition parameter (the second) is null.
> see OFBIZ-5261.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to