svn commit: r784152 - in /ofbiz/trunk/applications/marketing: webapp/marketing/WEB-INF/actions/reports/EmailStatusReport.groovy widget/MarketingReportScreens.xml widget/ReportForms.xml

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

svn commit: r784152 - in /ofbiz/trunk/applications/marketing: webapp/marketing/WEB-INF/actions/reports/EmailStatusReport.groovy widget/MarketingReportScreens.xml widget/ReportForms.xml

ashish-18
Author: ashish
Date: Fri Jun 12 15:14:45 2009
New Revision: 784152

URL: http://svn.apache.org/viewvc?rev=784152&view=rev
Log:
Applied patch from jira issue OFBIZ-2581.
As per the discussion on the above jira issue following things were finalised:

-- Show both the status (roleStatusId & statusId) in report.
-- Also added the roleStatusId field for filtering.

Thanks Awdesh, Ratnesh, Mridul & Hans for sharing views on this issue.
 

Modified:
    ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/reports/EmailStatusReport.groovy
    ofbiz/trunk/applications/marketing/widget/MarketingReportScreens.xml
    ofbiz/trunk/applications/marketing/widget/ReportForms.xml

Modified: ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/reports/EmailStatusReport.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/reports/EmailStatusReport.groovy?rev=784152&r1=784151&r2=784152&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/reports/EmailStatusReport.groovy (original)
+++ ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/reports/EmailStatusReport.groovy Fri Jun 12 15:14:45 2009
@@ -38,6 +38,11 @@
 if (statusId) {
     conditionList.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, statusId));
 }
+if (roleStatusId) {
+    conditionList.add(EntityCondition.makeCondition("roleStatusId", EntityOperator.EQUALS, roleStatusId));
+}
+conditionList.add(EntityCondition.makeCondition("roleTypeId", EntityOperator.EQUALS, "ADDRESSEE"));
 conditions = EntityCondition.makeCondition(conditionList, EntityOperator.AND);
-commStatausList = delegator.findList("CommunicationEvent", conditions, null, null, null, false);
+
+commStatausList = delegator.findList("CommunicationEventAndRole", conditions, null, null, null, false);
 context.commStatausList = commStatausList;
\ No newline at end of file

Modified: ofbiz/trunk/applications/marketing/widget/MarketingReportScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/MarketingReportScreens.xml?rev=784152&r1=784151&r2=784152&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/MarketingReportScreens.xml (original)
+++ ofbiz/trunk/applications/marketing/widget/MarketingReportScreens.xml Fri Jun 12 15:14:45 2009
@@ -196,6 +196,7 @@
                 <set field="statusId" from-field="parameters.statusId" type="String"/>
                 <set field="partyIdFrom" from-field="parameters.partyIdFrom" type="String"/>
                 <set field="partyIdTo" from-field="parameters.partyIdTo" type="String"/>
+                <set field="roleStatusId" from-field="parameters.roleStatusId" type="String"/>
                 <script location="component://marketing/webapp/marketing/WEB-INF/actions/reports/EmailStatusReport.groovy"/>
             </actions>
             <widgets>

Modified: ofbiz/trunk/applications/marketing/widget/ReportForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/ReportForms.xml?rev=784152&r1=784151&r2=784152&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/ReportForms.xml (original)
+++ ofbiz/trunk/applications/marketing/widget/ReportForms.xml Fri Jun 12 15:14:45 2009
@@ -87,6 +87,14 @@
                 </entity-options>
             </drop-down>
         </field>
+        <field name="roleStatusId" title="${uiLabelMap.MarketingSegmentGroupSegmentGroupRole} ${uiLabelMap.PartyStatus}">
+            <drop-down allow-empty="true">
+                <option key="" description="- ${uiLabelMap.CommonSelectAny} -"/>
+                <entity-options entity-name="StatusItem" description="${description}" key-field-name="statusId">
+                    <entity-constraint name="statusTypeId" operator="equals" value="COM_EVENT_ROL_STATUS"/>
+                </entity-options>
+            </drop-down>
+        </field>
         <field name="submitButton" title="${uiLabelMap.CommonRun} ${uiLabelMap.MarketingEmailStatusReport}" widget-style="smallSubmit">
             <submit button-type="button"/>
         </field>
@@ -146,15 +154,19 @@
     </form>
 
     <form name="EmailStatusReport" title="${uiLabelMap.MarketingEmailStatusReport}" type="list" list-name="commStatausList" target="" paginate-target="EmailStatusReport"
-            odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
-            <row-actions>
-                <entity-one entity-name="CommunicationEventType" value-field="communicationEventType"/>
-                <entity-one entity-name="StatusItem" value-field="statusItem"/>
-            </row-actions>
+        odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
+        <row-actions>
+            <entity-one entity-name="CommunicationEventType" value-field="communicationEventType"/>
+        </row-actions>
         <field name="communicationEventId" title="${uiLabelMap.MarketingContactListCommEventId}"><display/></field>
         <field name="communicationEventTypeId" title="${uiLabelMap.MarketingContactListCommEventTypeId}"><display description="${communicationEventType.description}"/></field>
-        <field name="statusId" title="${uiLabelMap.PartyStatus}"><display description="${statusItem.description}"/></field>
+        <field name="statusId" title="${uiLabelMap.PartyStatus}">
+            <display-entity entity-name="StatusItem" description="${description}"/>
+        </field>
         <field name="partyIdTo" title="${uiLabelMap.FormFieldTitle_toPartyId}"><display/></field>
+        <field name="roleStatusId" title="${uiLabelMap.MarketingSegmentGroupSegmentGroupRole} ${uiLabelMap.PartyStatus}">
+            <display-entity entity-name="StatusItem" key-field-name="statusId" description="${description}"/>
+        </field>
         <field name="partyIdFrom" title="${uiLabelMap.FormFieldTitle_fromPartyId}"><display/></field>
         <field name="entryDate" title="${uiLabelMap.PartyEnteredDate}"><display/></field>
         <field name="subject" title="${uiLabelMap.PartySubject}"><display/></field>