You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2008/07/29 03:01:11 UTC

svn commit: r680589 - /ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml

Author: hansbak
Date: Mon Jul 28 18:01:09 2008
New Revision: 680589

URL: http://svn.apache.org/viewvc?rev=680589&view=rev
Log:
correct problem in closing parent communication event role when creating a reply

Modified:
    ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml

Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml?rev=680589&r1=680588&r2=680589&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml (original)
+++ ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml Mon Jul 28 18:01:09 2008
@@ -21,11 +21,19 @@
 <simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd">
     <simple-method method-name="createCommunicationEvent" short-description="Create a CommunicationEvent">
-        <!-- change status of parent comevent before creating new comevent so it shown in proper order on the list -->
         <if-not-empty field="parameters.parentCommEventId">
-            <set field="newStat.communicationEventId" from-field="parameters.parentCommEventId"/>
-            <set field="newStat.statusId" value="COM_COMPLETE"/>
-            <call-service service-name="setCommunicationEventRoleStatus" in-map-name="newStat"/>
+            <entity-and list-name="roles" entity-name="CommunicationEventRole">
+                <field-map field-name="communicationEventId" env-name="parameters.parentCommEventId"/>
+                <field-map field-name="partyId" env-name="parameters.partyIdFrom"/>
+            </entity-and>
+            <if-not-empty field="roles">
+                <first-from-list list-name="roles" entry-name="role"/>
+                <set field="newStat.communicationEventId" from-field="parameters.parentCommEventId"/>
+                <set field="newStat.partyId" from-field="parameters.partyIdFrom"/>
+                <set field="newStat.roleTypeId" from-field="role.roleTypeId"/>
+                <set field="newStat.statusId" value="COM_ROLE_COMPLETED"/>
+                <call-service service-name="setCommunicationEventRoleStatus" in-map-name="newStat"/>
+            </if-not-empty>
         </if-not-empty>
         
         <if-empty field="parameters.statusId">