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 2009/06/11 05:14:27 UTC
svn commit: r783613 - in /ofbiz/trunk/applications/party:
config/PartyUiLabels.xml
script/org/ofbiz/party/communication/CommunicationEventServices.xml
servicedef/services.xml widget/partymgr/PartyMenus.xml
Author: hansbak
Date: Thu Jun 11 03:14:26 2009
New Revision: 783613
URL: http://svn.apache.org/viewvc?rev=783613&view=rev
Log:
add the reply-all to the communication event actions
Modified:
ofbiz/trunk/applications/party/config/PartyUiLabels.xml
ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml
ofbiz/trunk/applications/party/servicedef/services.xml
ofbiz/trunk/applications/party/widget/partymgr/PartyMenus.xml
Modified: ofbiz/trunk/applications/party/config/PartyUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/config/PartyUiLabels.xml?rev=783613&r1=783612&r2=783613&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/config/PartyUiLabels.xml (original)
+++ ofbiz/trunk/applications/party/config/PartyUiLabels.xml Thu Jun 11 03:14:26 2009
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
-
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
@@ -7600,6 +7599,9 @@
<value xml:lang="th">à¸à¸à¸</value>
<value xml:lang="zh">åå¤</value>
</property>
+ <property key="PartyReplyAll">
+ <value xml:lang="en">Reply All</value>
+ </property>
<property key="PartyReplyPrefix">
<value xml:lang="de">AW:</value>
<value xml:lang="en">RE:</value>
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=783613&r1=783612&r2=783613&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 Thu Jun 11 03:14:26 2009
@@ -34,7 +34,7 @@
<simple-method method-name="createCommunicationEvent" short-description="Create a CommunicationEvent with or w/o permission check">
<!-- check for forward only if created by a user and not incoming email by system-->
- <if-compare field="parameters.userLogin.userLoginId" value="system" operator="not-equals">
+ <if-compare field="parameters.action" value="FORWARD" operator="equals">
<if-not-empty field="parameters.origCommEventId">
<entity-one entity-name="CommunicationEvent" value-field="newEntity">
<field-map field-name="communicationEventId" from-field="parameters.origCommEventId"/>
@@ -59,9 +59,18 @@
</if-empty>
<field-to-result field="newEntity.communicationEventId" result-name="communicationEventId"/>
- <!-- check for reply -->
- <if-compare field="parameters.userLogin.userLoginId" value="system" operator="not-equals"><!-- not apply on incoming emails -->
- <if-not-empty field="parameters.parentCommEventId">
+ <!-- check for reply or reply all-->
+ <if>
+ <condition>
+ <and>
+ <not><if-empty field="parameters.parentCommEventId"/></not>
+ <or>
+ <if-compare field="parameters.action" value="REPLY" operator="equals"/>
+ <if-compare field="parameters.action" value="REPLYALL" operator="equals"/>
+ </or>
+ </and>
+ </condition>
+ <then>
<entity-one entity-name="CommunicationEvent" value-field="parentCommEvent">
<field-map field-name="communicationEventId" from-field="parameters.parentCommEventId"/>
</entity-one>
@@ -108,8 +117,8 @@
<set field="newStat.statusId" value="COM_ROLE_COMPLETED"/>
<call-service service-name="setCommunicationEventRoleStatus" in-map-name="newStat"/>
</if-not-empty>
- </if-not-empty>
- </if-compare>
+ </then>
+ </if>
<if-empty field="newEntity.statusId">
<set value="COM_ENTERED" field="newEntity.statusId"/>
@@ -164,6 +173,23 @@
<now-timestamp field="newEntity.entryDate"/>
<create-value value-field="newEntity"/>
+ <if-compare field="parameters.action" value="REPLYALL" operator="equals">
+ <entity-condition entity-name="CommunicationEventRole" list="roles">
+ <condition-list combine="and">
+ <condition-expr field-name="communicationEventId" from-field="parentCommEvent.communicationEventId"/>
+ <condition-expr field-name="partyId" operator="not-equals" from-field="newEntity.partyIdTo"/>
+ <condition-expr field-name="partyId" operator="not-equals" from-field="newEntity.partyIdFrom"/>
+ </condition-list>
+ </entity-condition>
+ <if-not-empty field="roles">
+ <iterate entry="role" list="roles">
+ <set-service-fields service-name="createCommunicationEventRole" map="role" to-map="newRole"/>
+ <set field="newRole.communicationEventId" from-field="newEntity.communicationEventId"/>
+ <call-service service-name="createCommunicationEventRole" in-map-name="newRole"/>
+ </iterate>
+ </if-not-empty>
+ </if-compare>
+
<if-not-empty field="parameters.productId">
<make-value value-field="eventProduct" entity-name="CommunicationEventProduct"/>
<set from-field="parameters.productId" field="eventProduct.productId"/>
Modified: ofbiz/trunk/applications/party/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/servicedef/services.xml?rev=783613&r1=783612&r2=783613&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/party/servicedef/services.xml Thu Jun 11 03:14:26 2009
@@ -683,6 +683,7 @@
<attribute name="productId" type="String" mode="IN" optional="true"/>
<attribute name="orderId" type="String" mode="IN" optional="true"/>
<attribute name="custRequestId" type="String" mode="IN" optional="true"/>
+ <attribute name="action" type="String" mode="IN" optional="true"/><!-- to indicate any special action like: REPLY, REPLYALL, FORWARD or empty for no special action-->
<override name="headerString" allow-html="any"/>
<override name="content" allow-html="safe"/>
<override name="messageId" allow-html="safe"/>
Modified: ofbiz/trunk/applications/party/widget/partymgr/PartyMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/PartyMenus.xml?rev=783613&r1=783612&r2=783613&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/PartyMenus.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/PartyMenus.xml Thu Jun 11 03:14:26 2009
@@ -396,6 +396,27 @@
<parameter param-name="my" value="My"/>
<parameter param-name="statusId" value="COM_PENDING"/>
<parameter param-name="partyIdFrom" from-field="parameters.partyId"/>
+ <parameter param-name="action" value="REPLY"/>
+ </link>
+ </menu-item>
+ <menu-item name="replyAll" title="${uiLabelMap.PartyReplyAll}">
+ <condition>
+ <and>
+ <not><if-empty field="communicationEvent"/></not>
+ <not><if-empty field="communicationEvent.partyIdFrom"/></not>
+ <if-compare field="communicationEvent.statusId" operator="not-equals" value="COM_PENDING"/>
+ <if-compare field="communicationEvent.statusId" operator="not-equals" value="COM_UNKNOWN_PARTY"/>
+ <if-compare field="communicationEvent.partyIdFrom" operator="not-equals" value="${partyId}"/>
+ <if-has-permission permission="PARTYMGR_CME-EMAIL_UPDATE"/>
+ <if-has-permission permission="PARTYMGR_CME-NOTE_CREATE"/>
+ </and>
+ </condition>
+ <link target="NewDraftCommunicationEvent">
+ <parameter param-name="parentCommEventId" from-field="communicationEvent.communicationEventId"/>
+ <parameter param-name="my" value="My"/>
+ <parameter param-name="statusId" value="COM_PENDING"/>
+ <parameter param-name="partyIdFrom" from-field="parameters.partyId"/>
+ <parameter param-name="action" value="REPLYALL"/>
</link>
</menu-item>
<menu-item name="forward" title="${uiLabelMap.PartyForward}">
@@ -413,6 +434,7 @@
<parameter param-name="partyIdFrom" from-field="parameters.partyId"/>
<parameter param-name="my" value="My"/>
<parameter param-name="statusId" value="COM_PENDING"/>
+ <parameter param-name="action" value="FORWARD"/>
</link>
</menu-item>
<menu-item name="createRequestFromCommEvent" title="${uiLabelMap.PartyCreateRequestFromCommEvent}">
@@ -569,6 +591,7 @@
<link target="EditCommunicationEvent">
<parameter param-name="parentCommEventId" from-field="parameters.communicationEventId"/>
<parameter param-name="partyIdFrom" from-field="parameters.partyId"/>
+ <parameter param-name="action" value="REPLY"/>
</link>
</menu-item>
<menu-item name="forward" title="${uiLabelMap.PartyForward}">
@@ -581,6 +604,7 @@
</condition>
<link target="EditCommunicationEvent">
<parameter param-name="originalCommEventId" from-field="parameters.communicationEventId"/>
+ <parameter param-name="action" value="FORWARD"/>
</link>
</menu-item>
<menu-item name="createRequestFromCommEvent" title="${uiLabelMap.PartyCreateRequestFromCommEvent}">