svn commit: r795020 - in /ofbiz/trunk/applications: marketing/webapp/marketing/contact/ marketing/widget/ party/data/ party/script/org/ofbiz/party/communication/ party/widget/partymgr/

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

svn commit: r795020 - in /ofbiz/trunk/applications: marketing/webapp/marketing/contact/ marketing/widget/ party/data/ party/script/org/ofbiz/party/communication/ party/widget/partymgr/

hansbak-2
Author: hansbak
Date: Fri Jul 17 09:02:35 2009
New Revision: 795020

URL: http://svn.apache.org/viewvc?rev=795020&view=rev
Log:
contactlist now also get sent to internal partyid's

Modified:
    ofbiz/trunk/applications/marketing/webapp/marketing/contact/ContactListForms.xml
    ofbiz/trunk/applications/marketing/widget/ContactListScreens.xml
    ofbiz/trunk/applications/party/data/PartyTypeData.xml
    ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml
    ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml

Modified: ofbiz/trunk/applications/marketing/webapp/marketing/contact/ContactListForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/marketing/contact/ContactListForms.xml?rev=795020&r1=795019&r2=795020&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/webapp/marketing/contact/ContactListForms.xml (original)
+++ ofbiz/trunk/applications/marketing/webapp/marketing/contact/ContactListForms.xml Fri Jul 17 09:02:35 2009
@@ -239,14 +239,7 @@
         <alt-target target="createContactListCommEvent" use-when="communicationEvent==null"/>
 
         <field name="communicationEventId" use-when="communicationEvent!=null" title="${uiLabelMap.MarketingContactListCommEventId}"><display/></field>
-        <field name="communicationEventTypeId" title="${uiLabelMap.MarketingContactListCommEventTypeId}">
-            <drop-down no-current-selected-key="EMAIL_COMMUNICATION">
-                <entity-options entity-name="CommunicationEventType" description="${description}">
-                    <entity-order-by field-name="description"/>
-                </entity-options>
-            </drop-down>
-        </field>
-
+        <field name="communicationEventTypeId"><hidden value="${communicationEventTypes[0].communicationEventTypeId}"/></field>
         <field name="partyIdFrom" title="${uiLabelMap.PartyPartyFrom}"><lookup target-form-name="LookupPartyName"/></field>
         <field name="statusId" use-when="communicationEvent==null" title="${uiLabelMap.CommonStatus}">
             <drop-down allow-empty="false" no-current-selected-key="COM_PENDING">
@@ -320,7 +313,7 @@
                 </entity-options>
             </drop-down>
         </field>
-        <field name="content" title="${uiLabelMap.CommonContent}"><textarea cols="60" rows="10"/></field>
+        <field name="content" title="${uiLabelMap.CommonContent} --${communicationEventTypes[0].communicationEventTypeId}"><textarea cols="60" rows="10"/></field>
         <field name="note" title="${uiLabelMap.CommonNote}"><textarea cols="60" rows="3"/></field>
         <field name="submitButton" title=" ${uiLabelMap.CommonSave} "><submit button-type="button"/></field>
         <field name="cancelLink" title=" " widget-style="buttontext"><hyperlink target="${donePage}" also-hidden="false" description="${uiLabelMap.CommonCancelDone}"/></field>
@@ -516,7 +509,7 @@
             </entity-and>
         </actions>
         <field name="communicationEventId"><hidden/></field>
-        <field name="contactListId"><display-entity entity-name="ContactList" description="${decription}"/></field>
+        <field name="contactListId"><display-entity entity-name="ContactList" description="${contactListName}[contactListId]"/></field>
         <field name="partyId" title="${uiLabelMap.PartyPartyId}">
             <display-entity description="${firstName} ${middleName} ${lastName} ${groupName}" entity-name="PartyNameView">
                 <sub-hyperlink target="viewprofile" link-style="smallSubmit" description="${partyId}">

Modified: ofbiz/trunk/applications/marketing/widget/ContactListScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/ContactListScreens.xml?rev=795020&r1=795019&r2=795020&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/ContactListScreens.xml (original)
+++ ofbiz/trunk/applications/marketing/widget/ContactListScreens.xml Fri Jul 17 09:02:35 2009
@@ -312,6 +312,9 @@
                 <set field="contactListId" from-field="parameters.contactListId"/>
                 <set field="communicationEventId" from-field="parameters.communicationEventId"/>
                 <entity-one entity-name="ContactList" value-field="contactList"/>
+                <entity-and entity-name="CommunicationEventType" list="communicationEventTypes">
+                    <field-map field-name="contactMechTypeId" from-field="contactList.contactMechTypeId"/>
+                </entity-and>
                 <entity-one entity-name="CommunicationEvent" value-field="communicationEvent"/>
 
                 <entity-one entity-name="StatusItem" value-field="status"/>                

Modified: ofbiz/trunk/applications/party/data/PartyTypeData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/data/PartyTypeData.xml?rev=795020&r1=795019&r2=795020&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/data/PartyTypeData.xml (original)
+++ ofbiz/trunk/applications/party/data/PartyTypeData.xml Fri Jul 17 09:02:35 2009
@@ -117,7 +117,7 @@
     <CommunicationEventType communicationEventTypeId="LETTER_CORRESPONDENC" description="Letter" hasTable="N" parentTypeId="" contactMechTypeId="POSTAL_ADDRESS"/>
     <CommunicationEventType communicationEventTypeId="PHONE_COMMUNICATION" description="Phone" hasTable="N" parentTypeId="" contactMechTypeId="TELECOM_NUMBER"/>
     <CommunicationEventType communicationEventTypeId="WEB_SITE_COMMUNICATI" description="Web Site" hasTable="N" parentTypeId="" contactMechTypeId="WEB_ADDRESS"/>
-    <CommunicationEventType communicationEventTypeId="COMMENT_NOTE" description="Comment/Note" hasTable="N" parentTypeId=""/>
+    <CommunicationEventType communicationEventTypeId="COMMENT_NOTE" description="Comment/Note" hasTable="N" parentTypeId="" contactMechTypeId="INTERNAL_PARTYID"/>
     <CommunicationEventType communicationEventTypeId="AUTO_EMAIL_COMM" description="Auto Email" hasTable="N" parentTypeId="" contactMechTypeId="EMAIL_ADDRESS"/>
     
     <!-- party content types -->

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=795020&r1=795019&r2=795020&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 Fri Jul 17 09:02:35 2009
@@ -456,6 +456,7 @@
     <simple-method method-name="sendEmailDated"
         short-description="Checks for email communication events with the status COM_IN_PROGRESS and a startdate which is expired, then send the email">
         <now-timestamp field="nowDate"/>
+        <!-- sending of email -->
         <entity-condition entity-name="CommunicationEvent" list="communicationEvents">
             <condition-list combine="and">
                 <condition-list combine="or">
@@ -473,6 +474,32 @@
             <set-service-fields service-name="sendCommEventAsEmail" map="communicationEvent" to-map="inMap"/>
             <call-service service-name="sendCommEventAsEmail" in-map-name="inMap" require-new-transaction="true" break-on-error="false"/>
         </iterate>
+        <!-- sending of internal notes of a contactlist -->
+        <entity-condition entity-name="CommunicationEvent" list="communicationEvents">
+            <condition-list combine="and">
+                <condition-expr field-name="communicationEventTypeId" operator="equals" value="COMMENT_NOTE"/>
+                <condition-expr field-name="statusId" operator="equals" value="COM_IN_PROGRESS"/>
+                <condition-expr field-name="contactListId" operator="not-equals" from-field="nullValue"/>
+                <condition-list combine="or">
+                    <condition-expr field-name="datetimeStarted" operator="less" from-field="nowDate"/>
+                    <condition-expr field-name="datetimeStarted" operator="equals" from-field="nullField"/>
+                </condition-list>
+            </condition-list>
+        </entity-condition>
+        <iterate entry="communicationEvent" list="communicationEvents">
+            <entity-and entity-name="ContactListParty" list="contactListParties">
+                <field-map field-name="contactListId" from-field="communicationEvent.contactListId"/>
+            </entity-and>
+            <set field="communicationEventRole.communicationEventId" from-field="communicationEvent.communicationEventId"/>
+            <set field="communicationEventRole.roleTypeId" value="ADDRESSEE"/>
+            <iterate entry="contactListParty" list="contactListParties">
+                <set field="communicationEventRole.partyId" from-field="contactListParty.partyId"/>
+                <call-service service-name="createCommunicationEventRole" in-map-name="communicationEventRole"/>
+            </iterate>
+            <set-service-fields service-name="setCommunicationEventStatus" map="communicationEvent" to-map="updCommEventStatus"/>
+            <set field="updCommEventStatus.statusId" value="COM_COMPLETE"/>
+            <call-service service-name="setCommunicationEventStatus" in-map-name="updCommEventStatus"/>
+        </iterate>
     </simple-method>
 
     <simple-method method-name="createCustRequestCommEvent" short-description="Create CustRequestCommEvent" >

Modified: ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml?rev=795020&r1=795019&r2=795020&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml Fri Jul 17 09:02:35 2009
@@ -224,17 +224,9 @@
                             </screenlet>
                         </widgets>
                         <fail-widgets>
-                            <section>
-                                <actions>
-                                    <set field="entityName" value="ContactListCommStatus"/>
-                                    <set field="requestParameters.communicationEventId" from-field="parameters.communicationEventId"/>
-                                </actions>
-                                <widgets>
-                                    <screenlet title="${uiLabelMap.MarketingContactListCommStatus}">
-                                        <include-form name="ListContactListCommStatuses" location="component://marketing/webapp/marketing/contact/ContactListForms.xml"/>
-                                    </screenlet>                        
-                                </widgets>
-                            </section>
+                            <screenlet title="${uiLabelMap.MarketingContactListCommStatus}">
+                                <include-form name="ListContactListCommStatuses" location="component://marketing/webapp/marketing/contact/ContactListForms.xml"/>
+                            </screenlet>                        
                         </fail-widgets>
                     </section>
                     <screenlet title="${uiLabelMap.PartyCommContent}">