Author: hansbak
Date: Thu Jul 31 06:55:11 2008
New Revision: 681372
URL: http://svn.apache.org/viewvc?rev=681372&view=rev
Log:
move createCustRequest from the party to the order component, utilize the
requestItem for creation
Removed:
ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/copyCommEventToRequest.groovy
Modified:
ofbiz/trunk/applications/order/script/org/ofbiz/order/request/CustRequestServices.xml
ofbiz/trunk/applications/order/servicedef/services_request.xml
ofbiz/trunk/applications/order/webapp/ordermgr/request/RequestForms.xml
ofbiz/trunk/applications/order/widget/ordermgr/RequestScreens.xml
ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml
ofbiz/trunk/applications/party/servicedef/services.xml
ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml
ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml
ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml
Modified:
ofbiz/trunk/applications/order/script/org/ofbiz/order/request/CustRequestServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/script/org/ofbiz/order/request/CustRequestServices.xml?rev=681372&r1=681371&r2=681372&view=diff
==============================================================================
---
ofbiz/trunk/applications/order/script/org/ofbiz/order/request/CustRequestServices.xml
(original)
+++
ofbiz/trunk/applications/order/script/org/ofbiz/order/request/CustRequestServices.xml
Thu Jul 31 06:55:11 2008
@@ -321,4 +321,43 @@
</if-compare-field>
</simple-method>
+ <simple-method method-name="createCustRequestFromCommEvent"
short-description="Create a Customer request from a commEvent(email)">
+ <entity-one entity-name="CommunicationEvent"
value-name="communicationEvent"/>
+ <if-empty field="communicationEvent">
+ <add-error><fail-message message="Event Id:
${parameters.communicationEventId} not found"/></add-error>
+ <return response-code="error"/>
+ </if-empty>
+ <set-service-fields service-name="createCustRequest"
map-name="parameters" to-map-name="custRequest"/>
+ <set field="custRequest.custRequestName"
from-field="communicationEvent.subject"/>
+ <if-empty field="parameters.custRequestTypeId">
+ <set field="custRequest.custRequestTypeId" value="RF_SUPPORT"/>
+ </if-empty>
+ <if-empty field="parameters.fromPartyId">
+ <set field="custRequest.fromPartyId"
from-field="communicationEvent.partyIdFrom"/>
+ </if-empty>
+ <set field="custRequest.statusId" value="CRQ_ACCEPTED"/>
+ <call-service service-name="createCustRequest"
in-map-name="custRequest">
+ <result-to-field result-name="custRequestId"
field-name="parameters.custRequestId"/>
+ </call-service>
+ <set-service-fields service-name="createCustRequestCommEvent"
map-name="parameters" to-map-name="custRequestCommEvent"/>
+ <call-service service-name="createCustRequestCommEvent"
in-map-name="custRequestCommEvent"/>
+
+ <if-empty field="parameters.content">
+ <set field="parameters.content"
from-field="communicationEvent.content"/>
+ </if-empty>
+ <if-not-empty field="parameters.content">
+ <set field="newItem.custRequestId"
from-field="parameters.custRequestId"/>
+ <set field="newItem.description"
from-field="parameters.description"/>
+ <set field="newItem.story" from-field="parameters.content"/>
+ <call-service service-name="createCustRequestItem"
in-map-name="newItem"/>
+ </if-not-empty>
+
+ <!-- update status from communication event -->
+ <set-service-fields service-name="setCommunicationEventStatus"
map-name="parameters" to-map-name="updStat"/>
+ <set field="updStat.statusId" value="COM_COMPLETE"/>
+ <call-service service-name="setCommunicationEventStatus"
in-map-name="updStat"/>
+
+ <field-to-result field-name="parameters.custRequestId"
result-name="custRequestId"/>
+ </simple-method>
+
</simple-methods>
Modified: ofbiz/trunk/applications/order/servicedef/services_request.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/servicedef/services_request.xml?rev=681372&r1=681371&r2=681372&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/servicedef/services_request.xml (original)
+++ ofbiz/trunk/applications/order/servicedef/services_request.xml Thu Jul 31
06:55:11 2008
@@ -144,5 +144,13 @@
<attribute name="statusId" type="String" mode="IN" optional="false"/>
<attribute name="oldStatusId" type="String" mode="OUT"
optional="true"/>
</service>
+ <service name="createCustRequestFromCommEvent" engine="simple"
default-entity-name="CommunicationEvent"
+ location="org/ofbiz/order/request/CustRequestServices.xml"
invoke="createCustRequestFromCommEvent" auth="true">
+ <description>Create a Customer request from a
commEvent(email)</description>
+ <auto-attributes mode="IN" include="pk" optional="false"/>
+ <auto-attributes mode="IN" include="nonpk" optional="true"/>
+ <attribute name="custRequestTypeId" mode="IN" type="String"
optional="true"/>
+ <attribute name="custRequestId" mode="OUT" type="String"
optional="false"/>
+ </service>
</services>
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/request/RequestForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/request/RequestForms.xml?rev=681372&r1=681371&r2=681372&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/request/RequestForms.xml
(original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/request/RequestForms.xml Thu
Jul 31 06:55:11 2008
@@ -114,6 +114,18 @@
<display-entity also-hidden="false" entity-name="StatusItem"/>
</field>
</form>
+ <form name="OverviewRequestItems" extends="ListRequestItems">
+ <field name="priority"><ignored/></field>
+ <field name="sequenceNum"><ignored/></field>
+ <field name="sequenceNumber"><ignored/></field>
+ <field name="requiredByDate"><ignored/></field>
+ <field name="selectedAmount"><ignored/></field>
+ <field name="maximumAmount"><ignored/></field>
+ <field name="reservStart"><ignored/></field>
+ <field name="reservLength"><ignored/></field>
+ <field name="reservPersons"><ignored/></field>
+ <field name="configId"><ignored/></field>
+ </form>
<form name="ListRequestQuoteItems" type="list" use-row-submit="true"
title="" list-name="quotes"
odd-row-style="alternate-row" default-table-style="basic-table
hover-bar" paginate-target="RequestItemQuotes">
Modified: ofbiz/trunk/applications/order/widget/ordermgr/RequestScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/RequestScreens.xml?rev=681372&r1=681371&r2=681372&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/widget/ordermgr/RequestScreens.xml (original)
+++ ofbiz/trunk/applications/order/widget/ordermgr/RequestScreens.xml Thu Jul
31 06:55:11 2008
@@ -149,23 +149,10 @@
<widgets>
<decorator-screen name="CommonRequestDecorator"
location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
- <container style="screenlet">
- <container style="screenlet-title-bar">
- <container style="h3">
- <label
text="${uiLabelMap.PageTitleRequestItems}"/>
- </container>
- </container>
- <container style="screenlet-body">
- <section>
- <widgets>
- <container>
- <link
target="requestitem?custRequestId=${custRequestId}"
text="${uiLabelMap.OrderNewRequestItem}" style="buttontext"/>
- </container>
- <include-form name="ListRequestItems"
location="component://order/webapp/ordermgr/request/RequestForms.xml"/>
- </widgets>
- </section>
- </container>
- </container>
+ <screenlet title="${uiLabelMap.PageTitleRequestItems}">
+ <link
target="requestitem?custRequestId=${custRequestId}"
text="${uiLabelMap.OrderNewRequestItem}" style="buttontext"/>
+ <include-form name="ListRequestItems"
location="component://order/webapp/ordermgr/request/RequestForms.xml"/>
+ </screenlet>
</decorator-section>
</decorator-screen>
</widgets>
@@ -451,9 +438,6 @@
</condition>
<widgets>
<include-screen name="ViewRequestInfo"/>
- <container style="leftclear">
- <include-screen name="ViewRequestItemInfo"/>
- </container>
</widgets>
<fail-widgets>
<label
style="h3">${uiLabelMap.OrderErrorRequestNotFound}</label>
@@ -466,10 +450,18 @@
<entity-and list-name="commEvents"
entity-name="CommunicationEventAndCustRequest">
<field-map field-name="custRequestId"
env-name="parameters.custRequestId"/>
</entity-and>
+ <entity-and entity-name="CustRequestItem"
list-name="custRequestItems">
+ <field-map env-name="custRequestId"
field-name="custRequestId"/>
+ <order-by field-name="sequenceNum"/>
+ <order-by field-name="custRequestItemSeqId"/>
+ </entity-and>
</actions>
<widgets>
<container style="lefthalf">
<include-screen name="requestInfo"/>
+ <screenlet title="${uiLabelMap.PageTitleRequestItems}">
+ <include-form name="OverviewRequestItems"
location="component://order/webapp/ordermgr/request/RequestForms.xml"/>
+ </screenlet>
</container>
<container style="righthalf">
<include-screen name="requestDate"/>
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=681372&r1=681371&r2=681372&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 Jul 31 06:55:11 2008
@@ -346,32 +346,7 @@
<entity-one entity-name="PartyNameView" value-name="nameView"/>
<set field="_event_message_" value="Email addres:
${parameters.emailAddress} allocated to party:
${nameView.groupName}${nameView.firstName} ${nameView.middleName}
${nameView.lastName}[${parameters.partyId}]"/>
</simple-method>
- <simple-method method-name="createRequestFromCommEvent"
short-description="Create a Customer request from a commEvent(email)">
- <entity-one entity-name="CommunicationEvent"
value-name="communicationEvent"/>
- <if-empty field="communicationEvent">
- <add-error><fail-message message="Event Id:
${parameters.communicationEventId} not found"/></add-error>
- <return response-code="errors"/>
- </if-empty>
-
- <set field="custRequest.custRequestName"
from-field="communicationEvent.subject"/>
- <set field="custRequest.description"
from-field="communicationEvent.content"/>
- <set field="custRequest.fromPartyId"
from-field="communicationEvent.partyIdFrom"/>
- <set field="custRequest.custRequestTypeId" value="RF_SUPPORT"/>
- <set field="custRequest.statusId" value="CRQ_ACCEPTED"/>
-
- <set-service-fields service-name="createCustRequest"
map-name="parameters" to-map-name="custRequest"/>
- <call-service service-name="createCustRequest"
in-map-name="custRequest">
- <result-to-field result-name="custRequestId"
field-name="parameters.custRequestId"/>
- </call-service>
- <set-service-fields service-name="createCustRequestCommEvent"
map-name="parameters" to-map-name="custRequestCommEvent"/>
- <call-service service-name="createCustRequestCommEvent"
in-map-name="custRequestCommEvent"/>
- <!-- update status from communication event -->
- <set field="communicationEvent.statusId" value="COM_COMPLETE"/>
- <store-value value-name="communicationEvent"/>
-
- <field-to-result field-name="parameters.custRequestId"
result-name="custRequestId"/>
- </simple-method>
<simple-method method-name="createCustRequestCommEvent"
short-description="Create CustRequestCommEvent" >
<make-value value-name="newEntity" entity-name="CustRequestCommEvent"/>
<set-pk-fields map-name="parameters" value-name="newEntity"/>
Modified: ofbiz/trunk/applications/party/servicedef/services.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/servicedef/services.xml?rev=681372&r1=681371&r2=681372&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/party/servicedef/services.xml Thu Jul 31 06:55:11
2008
@@ -727,16 +727,6 @@
<auto-attributes include="pk" mode="INOUT" optional="true"
entity-name="CommunicationEventWorkEff"/>
<auto-attributes include="nonpk" mode="IN" optional="true"
entity-name="CommunicationEventWorkEff"/>
</service>
- <service name="createRequestFromCommEvent" engine="simple"
-
location="org/ofbiz/party/communication/CommunicationEventServices.xml"
invoke="createRequestFromCommEvent" auth="true">
- <description>Create a Customer request from a
commEvent(email)</description>
- <attribute name="communicationEventId" mode="IN" type="String"
optional="false"/>
- <attribute name="custRequestTypeId" mode="IN" type="String"
optional="true"/>
- <attribute name="custRequestName" mode="IN" type="String"
optional="true"/>
- <attribute name="description" mode="IN" type="String" optional="true"/>
- <attribute name="custRequestId" mode="OUT" type="String"
optional="false"/>
- </service>
-
<service name="markCommEventRead" engine="simple"
location="org/ofbiz/party/communication/CommunicationEventServices.xml"
invoke="markEventRead" auth="true">
<description>Marks a communication event as read if in the
entered/pending status</description>
Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml?rev=681372&r1=681371&r2=681372&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml
(original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml Thu
Jul 31 06:55:11 2008
@@ -716,7 +716,7 @@
</request-map>
<request-map uri="createRequestFromCommEvent">
<security https="true" auth="true"/>
- <event type="service" invoke="createRequestFromCommEvent"/>
+ <event type="service" invoke="createCustRequestFromCommEvent"/>
<response name="success" type="view" value="ViewRequest"/>
<response name="error" type="view" value="EditRequestFromCommEvent"/>
</request-map>
Modified:
ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml?rev=681372&r1=681371&r2=681372&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml
(original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml
Thu Jul 31 06:55:11 2008
@@ -661,9 +661,9 @@
<field name=" " position="2"><display/></field>
<field name="deleteEmail" title="Delete email"
widget-style="smallSubmit" position="3"><submit/></field>
</form>
- <form name="EditRequestFromCommEvent" type="single"
target="createRequestFromCommEvent" default-map-name="parameters">
+ <form name="EditRequestFromCommEvent" type="single"
target="createRequestFromCommEvent" default-map-name="communicationEvent">
<field name="communicationEventId"><hidden
value="${parameters.communicationEventId}"/></field>
- <field name="fromPartyId"><display-entity entity-name="PartyNameView"
key-field-name="partyId" description="${firstName} ${middleName} ${lastName}
${groupName}"/></field>
+ <field name="fromPartyId" entry-name="partyIdFrom"><display-entity
entity-name="PartyNameView" key-field-name="partyId" description="${firstName}
${middleName} ${lastName} ${groupName} [${partyId}]"/></field>
<field name="custRequestTypeId" >
<drop-down>
<entity-options entity-name="CustRequestType"
description="${description}">
@@ -671,8 +671,9 @@
</entity-options>
</drop-down>
</field>
- <field name="custRequestName"><text/></field>
- <field name="description"><textarea/></field>
+ <field name="custRequestName" entry-name="subject"><text
size="60"/></field>
+ <field name="contentMimeTypeId"><hidden/></field>
+ <field name="content"><textarea cols="70" rows="20"/></field>
<field name="submit" title="${uiLabelMap.CommonCreate}"
widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
</forms>
Modified:
ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml?rev=681372&r1=681371&r2=681372&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml
(original)
+++ ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml Thu
Jul 31 06:55:11 2008
@@ -378,7 +378,7 @@
<actions>
<set field="titleProperty" value="PageTitleEditCommunication"
/>
<set field="tabButtonItem" value="CommunicationEvent" />
- <script
location="component://party/webapp/partymgr/WEB-INF/actions/communication/copyCommEventToRequest.groovy"/>
+ <entity-one entity-name="CommunicationEvent"
value-name="communicationEvent"/>
</actions>
<widgets>
<decorator-screen name="CommonCommunicationEventDecorator"