[jira] [Commented] (OFBIZ-7576) auto-completer does not work to search Contact Party Id

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-7576) auto-completer does not work to search Contact Party Id

Nicolas Malin (Jira)

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

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

Hi Ankush,

You can use a simple quote (') instead of "

So your patch would be
{code}
Index: applications/party/widget/partymgr/LookupScreens.xml
===================================================================
--- applications/party/widget/partymgr/LookupScreens.xml (revision 1749889)
+++ applications/party/widget/partymgr/LookupScreens.xml (working copy)
@@ -101,7 +101,7 @@
                 <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="${viewSizeDefaultValue}"/>
                 <set field="entityName" value="PartyRoleNameDetail"/>
                 <set field="searchFields" value="[partyId, firstName, middleName, lastName, groupName]"/>
-                <set field="andCondition" value="${groovy: return org.ofbiz.entity.condition.EntityCondition.makeCondition(&quot;roleTypeId&quot;, &quot;CUSTOMER&quot;)}"/>        
+                <set field="andCondition" value="${groovy: return org.ofbiz.entity.condition.EntityCondition.makeCondition('roleTypeId', 'CUSTOMER')}"/>
             </actions>
             <widgets>
                 <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
@@ -178,6 +178,10 @@
                 <set field="title" value="${uiLabelMap.PartyLookupContact}"/>
                 <set field="entityName" value="PartyRoleAndPartyDetail"/>
                 <set field="parameters.roleTypeId" value="CONTACT"/>
+                <set field="searchFields" value="[partyId, firstName, middleName, lastName]"/>
+                <script location="component://party/groovyScripts/party/StatusCondition.groovy"/>
+                <set field="andCondition" value="${groovy: return org.ofbiz.entity.condition.EntityCondition.makeCondition([
+                    org.ofbiz.entity.condition.EntityCondition.makeCondition('roleTypeId', 'CONTACT')])}"/>
             </actions>
             <widgets>
                 <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
@@ -411,7 +415,7 @@
                 <set field="searchFields" value="[partyId, groupName, partyGroupComments]"/>
                 <script location="component://party/groovyScripts/party/StatusCondition.groovy"/>
                 <set field="andCondition" value="${groovy: return org.ofbiz.entity.condition.EntityCondition.makeCondition([context.andCondition,
-                    org.ofbiz.entity.condition.EntityCondition.makeCondition(&quot;roleTypeId&quot;, &quot;INTERNAL_ORGANIZATIO&quot;)])}"/>
+                    org.ofbiz.entity.condition.EntityCondition.makeCondition('roleTypeId', 'INTERNAL_ORGANIZATIO')])}"/>
             </actions>
             <widgets>
                 <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">

Index: applications/party/widget/partymgr/LookupScreens.xml
===================================================================
--- applications/party/widget/partymgr/LookupScreens.xml (revision 1749889)
+++ applications/party/widget/partymgr/LookupScreens.xml (working copy)
@@ -101,7 +101,7 @@
                 <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="${viewSizeDefaultValue}"/>
                 <set field="entityName" value="PartyRoleNameDetail"/>
                 <set field="searchFields" value="[partyId, firstName, middleName, lastName, groupName]"/>
-                <set field="andCondition" value="${groovy: return org.ofbiz.entity.condition.EntityCondition.makeCondition(&quot;roleTypeId&quot;, &quot;CUSTOMER&quot;)}"/>        
+                <set field="andCondition" value="${groovy: return org.ofbiz.entity.condition.EntityCondition.makeCondition('roleTypeId', 'CUSTOMER')}"/>
             </actions>
             <widgets>
                 <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
@@ -178,6 +178,10 @@
                 <set field="title" value="${uiLabelMap.PartyLookupContact}"/>
                 <set field="entityName" value="PartyRoleAndPartyDetail"/>
                 <set field="parameters.roleTypeId" value="CONTACT"/>
+                <set field="searchFields" value="[partyId, firstName, middleName, lastName]"/>
+                <script location="component://party/groovyScripts/party/StatusCondition.groovy"/>
+                <set field="andCondition" value="${groovy: return org.ofbiz.entity.condition.EntityCondition.makeCondition([
+                    org.ofbiz.entity.condition.EntityCondition.makeCondition('roleTypeId', 'CONTACT')])}"/>
             </actions>
             <widgets>
                 <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
@@ -411,7 +415,7 @@
                 <set field="searchFields" value="[partyId, groupName, partyGroupComments]"/>
                 <script location="component://party/groovyScripts/party/StatusCondition.groovy"/>
                 <set field="andCondition" value="${groovy: return org.ofbiz.entity.condition.EntityCondition.makeCondition([context.andCondition,
-                    org.ofbiz.entity.condition.EntityCondition.makeCondition(&quot;roleTypeId&quot;, &quot;INTERNAL_ORGANIZATIO&quot;)])}"/>
+                    org.ofbiz.entity.condition.EntityCondition.makeCondition('roleTypeId', 'INTERNAL_ORGANIZATIO')])}"/>
             </actions>
             <widgets>
                 <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
{code}

Thanks!

> auto-completer does not work to search Contact Party Id
> -------------------------------------------------------
>
>                 Key: OFBIZ-7576
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-7576
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: Upcoming Branch
>            Reporter: Ankush Upadhyay
>            Assignee: Divesh Dutta
>         Attachments: OFBIZ-7576.patch
>
>
> Steps to reproduce:
> 1. Login to party manager.
> 2. Search Company party and navigate to profile.
> 3. Click on create new link of List Related Contacts screenlet.
> 4. Search any contact party using auto-completer.
> Expected behavior: auto-completer should work and return results like lookup does.



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