svn commit: r1711036 - /ofbiz/branches/release14.12/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml

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

svn commit: r1711036 - /ofbiz/branches/release14.12/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml

Taher Alkhateeb
Author: taher
Date: Wed Oct 28 15:31:13 2015
New Revision: 1711036

URL: http://svn.apache.org/viewvc?rev=1711036&view=rev
Log:
backport fix from OFBIZ-6703 to release 14.12

this fixes the lead creation bug reported in the above mentioned JIRA

Modified:
    ofbiz/branches/release14.12/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml

Modified: ofbiz/branches/release14.12/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml?rev=1711036&r1=1711035&r2=1711036&view=diff
==============================================================================
--- ofbiz/branches/release14.12/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml (original)
+++ ofbiz/branches/release14.12/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml Wed Oct 28 15:31:13 2015
@@ -40,7 +40,17 @@
         <check-errors/>
         <set field="createPartyRoleCtx.partyId" from-field="userLogin.partyId"/>
         <set field="createPartyRoleCtx.roleTypeId" value="OWNER"/>
-        <call-service service-name="createPartyRole" in-map-name="createPartyRoleCtx"/>
+
+        <!-- PartyRole check start - if the user does not have OWNER roleType then add it -->
+        <entity-one entity-name="PartyRole" value-field="roleFound">
+            <field-map field-name="partyId" from-field="createPartyRoleCtx.partyId"/>
+            <field-map field-name="roleTypeId" from-field="createPartyRoleCtx.roleTypeId"/>
+        </entity-one>
+        <if-empty field="roleFound">
+            <call-service service-name="createPartyRole" in-map-name="createPartyRoleCtx"/>
+        </if-empty>
+        <!-- PartyRole check end -->
+
         <if>
             <condition>
                 <and>