Author: hansbak
Date: Mon May 25 05:04:52 2009 New Revision: 778281 URL: http://svn.apache.org/viewvc?rev=778281&view=rev Log: Applied fix from trunk for revision: 778280 problem with create from/to roles corrected Modified: ofbiz/branches/release09.04/ (props changed) ofbiz/branches/release09.04/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml Propchange: ofbiz/branches/release09.04/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Mon May 25 05:04:52 2009 @@ -1 +1 @@ -/ofbiz/trunk:765933,766011,766015,766293,766307,766316,766325,766462,766522,766800,767060,767072,767093,767098-767099,767102,767123,767125,767127,767279,767287,767671,767688,767694,767822,767845,768358,768490,768550,768675,768686,768705,768811,768815,768960,769030,769500,770272,770997,771073,772401,772464-772465,773076,773557,773628,773659,773697,774014,774632,774661,774995,775292,775667,776227,776594,776620,776922,777004,777020,777947,778278 +/ofbiz/trunk:765933,766011,766015,766293,766307,766316,766325,766462,766522,766800,767060,767072,767093,767098-767099,767102,767123,767125,767127,767279,767287,767671,767688,767694,767822,767845,768358,768490,768550,768675,768686,768705,768811,768815,768960,769030,769500,770272,770997,771073,772401,772464-772465,773076,773557,773628,773659,773697,774014,774632,774661,774995,775292,775667,776227,776594,776620,776922,777004,777020,777947,778278,778280 Modified: ofbiz/branches/release09.04/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml?rev=778281&r1=778280&r2=778281&view=diff ============================================================================== --- ofbiz/branches/release09.04/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml (original) +++ ofbiz/branches/release09.04/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml Mon May 25 05:04:52 2009 @@ -130,7 +130,7 @@ <if-empty field="parameters.contactMechIdTo"> <set field="getEmail.partyId" from-field="parameters.partyIdTo"/> <call-service service-name="getPartyEmail" in-map-name="getEmail"> - <result-to-field result-name="contacMechId" field="newEntity.ContactMechIdTo"/> + <result-to-field result-name="contacMechId" field="newEntity.contactMechIdTo"/> </call-service> </if-empty> </if-not-empty> @@ -208,69 +208,59 @@ <!-- if the from-party changed, change also the roles --> <if> <condition> - <or> - <and> - <not><if-empty field="parameters.partyIdFrom"/></not> - <if-compare-field field="parameters.partyIdFrom" operator="not-equals" to-field="event.partyIdFrom"/> - </and> - <and> - <not><if-empty field="parameters.contactMechIdFrom"/></not> - <if-compare-field field="parameters.contactMechIdFrom" operator="not-equals" to-field="event.contactMechIdFrom"/> - </and> - </or> + <and> + <not><if-empty field="parameters.partyIdFrom"/></not> + <if-compare-field field="parameters.partyIdFrom" operator="not-equals" to-field="event.partyIdFrom"/> + </and> </condition> <then> <!-- updating partyId from old: --> <entity-one entity-name="CommunicationEventRole" value-field="roleFrom"> <field-map field-name="communicationEventId" from-field="event.communicationEventId"/> - <field-map field-name="partyId" from-field="parameters.partyIdFrom"/> + <field-map field-name="partyId" from-field="event.partyIdFrom"/> <field-map field-name="roleTypeId" value="ORIGINATOR"/> </entity-one> <if-not-empty field="roleFrom"> <remove-value value-field="roleFrom"/> </if-not-empty> <!-- add new role --> - <set field="newRoleFrom.communicationEventId" from-field="event.communicationEventId"/> <set field="newRoleFrom.partyId" from-field="parameters.partyIdFrom"/> + <call-service service-name="getPartyEmail" in-map-name="newRoleFrom"> + <result-to-field result-name="contactMechId" field="newRoleFrom.contactMechId"/> + </call-service> + <set field="newRoleFrom.communicationEventId" from-field="event.communicationEventId"/> <set field="newRoleFrom.roleTypeId" value="ORIGINATOR"/> - <set field="newRoleFrom.statusId" from-field="roleFrom.statusId"/> - <set field="newRoleFrom.contactMechId" from-field="parameters.contactMechIdFrom"/> - <call-service service-name="createCommunicationEventRole" - in-map-name="newRoleFrom"/> + <call-service service-name="createCommunicationEventRole" in-map-name="newRoleFrom"/> + <set field="parameters.contactMechIdFrom" from-field="newRoleFrom.contactMechId"/> </then> </if> <!-- if the to-party changed, change also the roles --> <if> <condition> - <or> - <and> - <not><if-empty field="parameters.partyIdTo"/></not> - <if-compare-field field="parameters.partyIdTo" operator="not-equals" to-field="event.partyIdTo"/> - </and> - <and> - <not><if-empty field="parameters.contactMechIdTo"/></not> - <if-compare-field field="parameters.contactMechIdTo" operator="not-equals" to-field="event.contactMechIdTo"/> - </and> - </or> + <and> + <not><if-empty field="parameters.partyIdTo"/></not> + <if-compare-field field="parameters.partyIdTo" operator="not-equals" to-field="event.partyIdTo"/> + </and> </condition> <then> <!-- check if role exist then delete old role --> <entity-one entity-name="CommunicationEventRole" value-field="roleTo"> <field-map field-name="communicationEventId" from-field="event.communicationEventId"/> - <field-map field-name="partyId" from-field="parameters.partyIdTo"/> + <field-map field-name="partyId" from-field="event.partyIdTo"/> <field-map field-name="roleTypeId" value="ADDRESSEE"/> </entity-one> <if-not-empty field="roleTo"> <remove-value value-field="roleTo"/> </if-not-empty> <!-- add new role --> - <set field="newRoleTo.communicationEventId" from-field="event.communicationEventId"/> <set field="newRoleTo.partyId" from-field="parameters.partyIdTo"/> + <call-service service-name="getPartyEmail" in-map-name="newRoleTo"> + <result-to-field result-name="contactMechId" field="newRoleTo.contactMechId"/> + </call-service> + <set field="newRoleTo.communicationEventId" from-field="event.communicationEventId"/> <set field="newRoleTo.roleTypeId" value="ADDRESSEE"/> - <set field="newRoleTo.statusId" from-field="roleTo.statusId"/> - <set field="newRoleTo.contactMechId" from-field="parameters.contactMechIdTo"/> - <call-service service-name="createCommunicationEventRole" - in-map-name="newRoleTo"/> + <call-service service-name="createCommunicationEventRole" in-map-name="newRoleTo"/> + <set field="parameters.contactMechIdTo" from-field="newRoleTo.contactMechId"/> </then> </if> <set-nonpk-fields map="parameters" value-field="event"/> |
Free forum by Nabble | Edit this page |