Author: hansbak
Date: Wed May 19 08:53:53 2010
New Revision: 946086
URL: http://svn.apache.org/viewvc?rev=946086&view=rev
Log:
add an option to the communication set status service to be able to set the
rolestatus also to complete to avoid duplication of work
Modified:
ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml
ofbiz/trunk/applications/party/servicedef/services.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=946086&r1=946085&r2=946086&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
Wed May 19 08:53:53 2010
@@ -545,6 +545,19 @@ under the License.
<else>
<set field="communicationEvent.statusId"
from-field="parameters.statusId"/>
<store-value value-field="communicationEvent"/>
+ <if-compare operator="equals" value="Y"
field="parameters.setRoleStatusToComplete">
+ <if-compare operator="equals" value="COM_COMPLETE"
field="parameters.statusId">
+ <!-- if the status of the communicationevent is
set to complete, all roles need to be set to complete,
+ which means the commevent was dealt with and
no further action is required by any of the other participants/addressees -->
+ <get-related
relation-name="CommunicationEventRole" list="roles"
value-field="communicationEvent"/>
+ <iterate entry="role" list="roles">
+ <if-compare-field operator="not-equals"
field="role.statusId" to-field="COM_ROLE_COMPLETED">
+ <set field="role.statusId"
value="COM_ROLE_COMPLETED"/>
+ <store-value value-field="role"/>
+ </if-compare-field>
+ </iterate>
+ </if-compare>
+ </if-compare>
</else>
</if-empty>
</if-compare-field>
Modified: ofbiz/trunk/applications/party/servicedef/services.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/servicedef/services.xml?rev=946086&r1=946085&r2=946086&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/party/servicedef/services.xml Wed May 19 08:53:53
2010
@@ -741,6 +741,7 @@ under the License.
<auto-attributes mode="IN" include="pk" optional="false"/>
<attribute name="statusId" type="String" mode="IN" optional="false"/>
<attribute name="oldStatusId" type="String" mode="OUT"
optional="true"/>
+ <attribute name="setRoleStatusToComplete" mode="IN" type="String"
default-value="N"/>
</service>
<service name="setCommunicationEventRoleStatus" engine="simple"
default-entity-name="CommunicationEventRole"
location="component://party/script/org/ofbiz/party/communication/CommunicationEventServices.xml"
invoke="setCommunicationEventRoleStatus" auth="true">