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

Montalbano Florian commented on OFBIZ-7117:
-------------------------------------------

While searching for the source of this behaviour, I found this condition 
construction in FindLookUp.groovy :
{code}
exprList = [EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, 
"PARTY_DISABLED")
            , EntityCondition.makeCondition("statusId", 
EntityOperator.NOT_EQUAL, null)];
CondList = EntityCondition.makeCondition(exprList, EntityOperator.AND);
CondList1 = EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, 
null);
statusPartyDisable = EntityCondition.makeCondition([CondList1, CondList], 
EntityOperator.OR); 
{code}

which corresponds to :
A : ( statusId != null AND statusId != "PARTY_DISABLED" ) OR ( statusId == null 
) 
I think it could be simplified to :
B : ( statusId != "PARTY_DISABLED ) OR ( statusId == null )

The logic result seems to be the same for all the case :
statusId = null => : A = true; B = true
statusId = "PARTY_DISABLED" => A = false; B = false
statusId != null && statusId != "PARTY_DISABLED" => A = true; B = true;

What do you think of it ?


> LookupAccount search screen 'Find' button redirect to Lookup Group
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-7117
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-7117
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: Trunk
>            Reporter: Montalbano Florian
>            Priority: Minor
>
> How to reproduce :
> 1) Go to a person party profile : i.e. 
> https://localhost:8443/partymgr/control/viewprofile?partyId=admin
> 2) Click on 'Create New' from the 'List Related Accounts' section
> 3) Click on the 'Look up button' (for searching through the account party id)
> 4) Notice the title of the pop-up : "Lookup Party with the role Account" and 
> the limited number of result.    Lookup Party with the role Account.
> 5) Click on the 'Find' button (empty search)
> 6) Notice the new title "Lookup Group" and the new set of result
> Root of the behaviour :
> In "ofbiz/applications/party/widget/partymgr/LookupScreens.xml", there is the 
> definition of the "LookupAccount" screen. This screen is the pop-up showing 
> up when you click on the 'Lookup button' . It includes two forms :
> {code}<include-form name="lookupPartyGroup" 
> location="component://party/widget/partymgr/LookupForms.xml"/>{code}
> and
> {code}<include-form name="listLookupPartyGroup" 
> location="component://party/widget/partymgr/LookupForms.xml"/>{code}
> The first one, is the one used for the search when you click on the 'Find' 
> button. By looking at this form's code, we can see that its target is the 
> "LookupPartyGroup" screen. So when you click on the 'Find' button, a 
> different screen is loaded and the title and the behaviour of the pop-up is 
> modified. This screen is composed from the two same forms than the original 
> one.
> Solution ? :
> I don't know if it's possible to overload the target of a form when it's 
> called but if it is possible, then we may call the same form with the target 
> "LookupAccount". If not, I think we need to create another form with the 
> target "LookupAccount".



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

Reply via email to