Author: hansbak
Date: Wed Feb 22 08:35:59 2012
New Revision: 1292180
URL: http://svn.apache.org/viewvc?rev=1292180&view=rev
Log:
remove all component dependent stamements out of commonext and make the
systeminfo service more generic and not only serving portlets. Comment by
Adrian in the userlist. No conversion program provided because this data is
only temporary can can be deleted from a menu
Modified:
ofbiz/trunk/applications/commonext/entitydef/entitymodel.xml
ofbiz/trunk/applications/commonext/script/org/ofbiz/SystemInfoServices.xml
ofbiz/trunk/applications/commonext/servicedef/secas.xml
ofbiz/trunk/applications/commonext/servicedef/services.xml
ofbiz/trunk/applications/commonext/webapp/WEB-INF/controller.xml
ofbiz/trunk/applications/commonext/widget/CommonScreens.xml
ofbiz/trunk/applications/commonext/widget/SystemInfoForms.xml
ofbiz/trunk/applications/order/servicedef/secas.xml
ofbiz/trunk/applications/party/servicedef/secas.xml
ofbiz/trunk/specialpurpose/projectmgr/entitydef/eecas.xml
Modified: ofbiz/trunk/applications/commonext/entitydef/entitymodel.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/entitydef/entitymodel.xml?rev=1292180&r1=1292179&r2=1292180&view=diff
==============================================================================
--- ofbiz/trunk/applications/commonext/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/commonext/entitydef/entitymodel.xml Wed Feb 22
08:35:59 2012
@@ -26,8 +26,9 @@ under the License.
<!-- not sure if we should use the NoteData entity for this however at the
moment it is doing fine... -->
<extend-entity entity-name="NoteData">
- <field name="moreInfoPortletId" type="value"><description>url to go to the
related portlet screen in the system</description></field>
+ <field name="moreInfoUrl" type="value"><description>url to go to the
related screen in the system</description></field>
<field name="moreInfoItemId" type="value"><description>The id of the item
to be displayed i.e. custRequestId, commEventId etc</description></field>
+ <field name="moreInfoItemName" type="value"><description>The name of the
item to be displayed i.e. custRequestId, commEventId etc</description></field>
<index name="systemInfo" unique="false"><!-- to be able to select the
SYSTEMNOTE records quickly -->
<index-field name="noteName"/>
</index>
Modified:
ofbiz/trunk/applications/commonext/script/org/ofbiz/SystemInfoServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/script/org/ofbiz/SystemInfoServices.xml?rev=1292180&r1=1292179&r2=1292180&view=diff
==============================================================================
--- ofbiz/trunk/applications/commonext/script/org/ofbiz/SystemInfoServices.xml
(original)
+++ ofbiz/trunk/applications/commonext/script/org/ofbiz/SystemInfoServices.xml
Wed Feb 22 08:35:59 2012
@@ -22,199 +22,13 @@ under the License.
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd">
<simple-method method-name="createSystemInfoNote"
short-description="Create a system to to a specific party">
- <set field="partyId" from-field="parameters.partyId"
default-value="userLogin.partyId"/>
- <!-- new communication events -->
- <if-compare field="parameters.entityName" value="CommunicationEvent"
operator="equals">
- <entity-one entity-name="CommunicationEvent" value-field="comm">
- <field-map field-name="communicationEventId"
from-field="parameters.entityNameId"/>
- </entity-one>
- <entity-and entity-name="CommunicationEventRole" list="roles">
- <field-map field-name="communicationEventId"
from-field="parameters.entityNameId"/>
- </entity-and>
- <if-not-empty field="roles">
- <make-value value-field="noteData" entity-name="NoteData"/>
- <now-timestamp field="noteData.noteDateTime"/>
- <set field="noteData.noteName" value="SYSTEMNOTE"/>
- <set field="noteData.noteInfo" value="New incoming
communication event: ${comm.subject} from ${comm.partyIdFrom}"/>
- <set field="noteData.moreInfoPortletId"
value="MyCommunications"/>
- <iterate entry="role" list="roles">
- <if-compare field="role.statusId" value="COM_ROLE_CREATED"
operator="equals">
- <set field="partyId" from-field="role.partyId"/>
- <call-simple-method
method-name="getPortletAttributeMap"/>
- <if>
- <condition>
- <and><!-- check for 'all' notifications flag
off -->
- <if-compare field="haveUserLogin"
value="true" operator="equals"/>
- <if-compare
field="attributeMap.allNotifications" value="Y" operator="not-equals"/>
- <or>
- <and><!-- incoming email for known
parties, no notifications for unknown parties -->
- <if-compare
field="attributeMap.incomingEmail" value="Y" operator="not-equals"/>
- <if-compare
field="comm.communicationEventTypeId" value="AUTO_EMAIL_COM" operator="equals"/>
- </and>
- <and><!-- internal sent email -->
- <if-compare
field="attributeMap.email" value="Y" operator="not-equals"/>
- <or>
- <if-compare
field="comm.communicationEventTypeId" value="AUTO_EMAIL_COMM"
operator="equals"/>
- <if-compare
field="comm.communicationEventTypeId" value="EMAIL_COMMUNICATION"
operator="equals"/>
- </or>
- </and>
- <and><!-- internal notes -->
- <if-compare
field="attributeMap.internalNotes" value="Y" operator="not-equals"/>
- <if-compare
field="comm.communicationEventTypeId" value="COMMENT_NOTE" operator="equals"/>
- </and>
- </or>
- </and>
- </condition>
- <then>
- <sequenced-id sequence-name="NoteData"
field="noteData.noteId"/>
- <set field="noteData.noteParty"
from-field="role.partyId"/>
- <create-value value-field="noteData"/>
- </then>
- </if>
- </if-compare>
- </iterate>
- </if-not-empty>
- </if-compare>
-
- <!-- new task assignments for the logged on user -->
- <if-compare field="parameters.entityName"
value="WorkEffortPartyAssignment" operator="equals">
- <entity-one entity-name="WorkEffort" value-field="workEffort">
- <field-map field-name="workEffortId"
from-field="parameters.entityNameId"/>
- </entity-one>
- <if>
- <condition>
- <or>
- <if-compare field="workEffort.workEffortTypeId"
value="TASK" operator="equals"/>
- <if-compare field="workEffort.workEffortTypeId"
value="SCRUM_TASK_IMPL" operator="equals"/>
- <if-compare field="workEffort.workEffortTypeId"
value="SCRUM_TASK_INST" operator="equals"/>
- <if-compare field="workEffort.workEffortTypeId"
value="SCRUM_TASK_ERROR" operator="equals"/>
- <if-compare field="workEffort.workEffortTypeId"
value="SCRUM_TASK_TEST" operator="equals"/>
- </or>
- </condition>
- <then>
- <call-simple-method method-name="getPortletAttributeMap"/>
- <if-compare field="haveUserLogin" value="true"
operator="equals">
- <if-compare field="attributeMap.taskAssignment"
value="Y" operator="not-equals">
- <entity-and
entity-name="WorkEffortPartyAssignment" list="assigns" filter-by-date="true">
- <field-map field-name="workEffortId"
from-field="parameters.entityNameId"/>
- <order-by field-name="-fromDate"/>
- </entity-and>
- <first-from-list entry="assign" list="assigns"/>
- <make-value value-field="noteData"
entity-name="NoteData"/>
- <now-timestamp field="noteData.noteDateTime"/>
- <sequenced-id sequence-name="NoteData"
field="noteData.noteId"/>
- <set field="noteData.noteParty"
from-field="assign.partyId"/>
- <set field="noteData.noteName" value="SYSTEMNOTE"/>
- <set field="noteData.noteInfo" value="New task
assignment '${workEffort.workEffortName}' [${workEffort.workEffortId}]"/>
- <set field="noteData.moreInfoPortletId"
value="ViewProjectTask"/>
- <set field="noteData.moreInfoItemId"
from-field="workEffort.workEffortId"/>
- <create-value value-field="noteData"/>
- </if-compare>
- </if-compare>
- </then>
- </if>
-
- <!-- create system info note for TASK COMPLETED -->
- <entity-condition list="completeTask"
entity-name="WorkEffortPartyAssignment" filter-by-date="true">
- <condition-list combine="and">
- <condition-expr field-name="workEffortId"
operator="equals" from-field="parameters.entityNameId"/>
- <condition-expr field-name="partyId" operator="equals"
from-field="userLogin.partyId"/>
- </condition-list>
- </entity-condition>
- <first-from-list entry="completeMessage" list="completeTask"/>
- <if>
- <condition>
- <or>
- <if-compare field="completeMessage.statusId"
value="PAS_COMPLETED" operator="equals"/>
- <if-compare field="completeMessage.statusId"
value="SCAS_COMPLETED" operator="equals"/>
- <if-compare field="completeMessage.statusId"
value="PRTYASGN_UNASSIGNED" operator="equals"/>
- </or>
- </condition>
- <then>
- <call-simple-method method-name="getPortletAttributeMap"/>
- <if-compare field="haveUserLogin" value="true"
operator="equals">
- <if-compare field="attributeMap.taskAssignment"
value="Y" operator="not-equals">
- <entity-and
entity-name="WorkEffortPartyAssignment" list="assigns" filter-by-date="true">
- <field-map field-name="workEffortId"
from-field="parameters.entityNameId"/>
- <order-by field-name="-fromDate"/>
- </entity-and>
- <iterate entry="assign" list="assigns">
- <make-value value-field="noteData"
entity-name="NoteData"/>
- <now-timestamp field="noteData.noteDateTime"/>
- <sequenced-id sequence-name="NoteData"
field="noteData.noteId"/>
- <set field="noteData.noteParty"
from-field="assign.partyId"/>
- <set field="noteData.noteName"
value="SYSTEMNOTE"/>
- <set field="noteData.noteInfo" value="Task
assignment completed '${workEffort.workEffortName}'
[${workEffort.workEffortId}]"/>
- <set field="noteData.moreInfoPortletId"
value="ViewProjectTask"/>
- <set field="noteData.moreInfoItemId"
from-field="workEffort.workEffortId"/>
- <create-value value-field="noteData"/>
- </iterate>
- </if-compare>
- </if-compare>
- </then>
- </if>
- </if-compare>
-
- <!-- Create a system info note to all customer request participants if
a note was added to the customer request
- the originator of the customer request will get already a email so
does not need to be notified-->
- <if-compare field="parameters.entityName" value="CustRequestItemNote"
operator="equals">
- <!-- find related customer request originator -->
- <entity-and entity-name="CustRequestItemNoteView"
list="custRequesItems">
- <field-map field-name="noteId"
from-field="parameters.entityNameId"/>
- </entity-and>
- <first-from-list entry="custRequesItem" list="custRequesItems"/>
- <entity-one entity-name="CustRequest" value-field="custRequest">
- <field-map field-name="custRequestId"
from-field="custRequesItem.custRequestId"/>
- <select-field field-name="fromPartyId"/>
- <select-field field-name="custRequestName"/>
- </entity-one>
- <!-- find all parties who have added a note to this request item
excluding the originator (he already gets email)-->
- <entity-condition entity-name="CustRequestItemNoteView"
list="custRequestParties" distinct="true">
- <condition-list combine="and">
- <condition-expr field-name="partyId" operator="not-equals"
from-field="custRequest.fromPartyId"/>
- <condition-expr field-name="custRequestId"
from-field="custRequesItem.custRequestId"/>
- <condition-expr field-name="custRequestItemSeqId"
from-field="custRequesItem.custRequestItemSeqId"/>
- </condition-list>
- <select-field field-name="partyId"/>
- <select-field field-name="custRequestId"/>
- <select-field field-name="custRequestItemSeqId"/>
- </entity-condition>
- <make-value value-field="noteData" entity-name="NoteData"/>
- <now-timestamp field="noteData.noteDateTime"/>
- <set field="noteData.noteName" value="SYSTEMNOTE"/>
- <set field="noteData.moreInfoPortletId" value="ViewCustRequest"/>
- <set field="noteData.moreInfoItemId"
from-field="custRequest.custRequestId"/>
- <set field="noteData.noteInfo" value="A note has been added to
customer request ${custRequest.custRequestName}
[${custRequest.custRequestId}]"/>
- <iterate entry="custRequestParty" list="custRequestParties">
- <sequenced-id sequence-name="NoteData"
field="noteData.noteId"/>
- <set field="noteData.noteParty"
from-field="custRequestParty.partyId"/>
- <create-value value-field="noteData"/>
- </iterate>
- </if-compare>
-
- <!-- public message -->
- <if-compare field="parameters.entityName" value="PublicMessage"
operator="equals">
- <if-has-permission permission="COMMONEXT_PUBLMSG">
- <!-- get all recent visitors logged on the last 3 weeks -->
- <set field="lastDate"
value="${groovy:org.ofbiz.base.util.UtilDateTime.addDaysToTimestamp(org.ofbiz.base.util.UtilDateTime.nowTimestamp(),
-21)}" type="Timestamp"/>
- <entity-condition list="parties"
entity-name="PartyNameVisitView" distinct="true">
- <condition-expr field-name="fromDate" operator="greater"
from-field="lastDate"/>
- <select-field field-name="partyId"/>
- </entity-condition>
- <iterate entry="party" list="parties">
- <make-value value-field="noteData" entity-name="NoteData"/>
- <now-timestamp field="noteData.noteDateTime"/>
- <sequenced-id sequence-name="NoteData"
field="noteData.noteId"/>
- <set field="noteData.noteParty"
from-field="party.partyId"/>
- <set field="noteData.noteName" value="SYSTEMNOTE"/>
- <set field="noteData.noteInfo"
from-field="parameters.noteInfo"/>
- <create-value value-field="noteData"/>
- </iterate>
- <set field="noteData.noteParty" value="_NA_"/><!-- message for
not logged in users -->
- <sequenced-id sequence-name="NoteData"
field="noteData.noteId"/>
- <create-value value-field="noteData"/>
- </if-has-permission>
- </if-compare>
+ <set field="parameters.partyId" from-field="parameters.partyId"
default-value="userLogin.partyId"/>
+ <make-value value-field="noteData" entity-name="NoteData"/>
+ <set-nonpk-fields value-field="noteData" map="parameters"/>
+ <now-timestamp field="noteData.noteDateTime"/>
+ <sequenced-id sequence-name="NoteData" field="noteData.noteId"/>
+ <set field="noteData.noteName" value="SYSTEMNOTE"/>
+ <create-value value-field="noteData"/>
</simple-method>
<simple-method method-name="getPortletAttributeMap" short-description="get
the attributes of the SystemInfoNotes portlet for a userlogin">
@@ -233,6 +47,19 @@ under the License.
</if-not-empty>
</simple-method>
+ <simple-method method-name="deleteSystemInfoNote"
short-description="Delete SystemInfo Note">
+ <entity-one value-field="noteData" entity-name="NoteData"/>
+ <remove-related relation-name="ContentNote" value-field="noteData"/>
+ <remove-related relation-name="CustRequestItemNote"
value-field="noteData"/>
+ <remove-related relation-name="CustRequestNote"
value-field="noteData"/>
+ <remove-related relation-name="MarketingCampaignNote"
value-field="noteData"/>
+ <remove-related relation-name="OrderHeaderNote"
value-field="noteData"/>
+ <remove-related relation-name="PartyNote" value-field="noteData"/>
+ <remove-related relation-name="QuoteNote" value-field="noteData"/>
+ <remove-related relation-name="WorkEffortNote" value-field="noteData"/>
+ <remove-value value-field="noteData"/>
+ </simple-method>
+
<simple-method method-name="deleteAllSystemNotes"
short-description="delete all system notes from a particular user">
<set field="removeData.noteParty"
from-field="parameters.userLogin.partyId"/>
<set field="removeData.noteName" value="SYSTEMNOTE"/>
@@ -258,7 +85,6 @@ under the License.
<set field="status.noteInfo" value="Open communication events:
${comCount}"/>
<first-from-list entry="comm" list="comms"/>
<set field="status.noteDateTime" from-field="comm.entryDate"/>
- <set field="status.moreInfoPortletId" value="MyCommunications"/>
<field-to-list field="status" list="systemInfoStatus"/>
<clear-field field="status"/>
</if-compare>
@@ -280,7 +106,6 @@ under the License.
<set field="status.noteInfo" value="Assigned and not completed
tasks: ${assignCount}"/>
<first-from-list entry="assign" list="assigns"/>
<set field="status.noteDateTime" from-field="assign.fromDate"/>
- <set field="status.moreInfoPortletId" value="mytasks"/>
<field-to-list field="status" list="systemInfoStatus"/>
</if-compare>
@@ -322,53 +147,14 @@ under the License.
<if-not-empty field="systemInfoNotes">
<set field="lastSystemInfoNote1" from-field="systemInfoNotes[0]"/>
<field-to-result field="lastSystemInfoNote1"/>
- <!-- get link from systemInfoNote 1 -->
- <set field="systemNotepartyId"
from-field="systemInfoNotes[0].noteParty"/>
- <set field="systemNoteworkEffortId"
from-field="systemInfoNotes[0].moreInfoItemId"/>
- <call-simple-method method-name="getLinkFromLastSystemNote"/>
- <set field="lastSystemInfoLink1" from-field="lastSystemInfoLink"/>
- <field-to-result field="lastSystemInfoLink1"/>
<if-not-empty field="systemInfoNotes[2]">
<set field="lastSystemInfoNote2"
from-field="systemInfoNotes[1]"/>
<field-to-result field="lastSystemInfoNote2"/>
- <!-- get link from systemInfoNote 2 -->
- <set field="systemNotepartyId"
from-field="systemInfoNotes[1].noteParty"/>
- <set field="systemNoteworkEffortId"
from-field="systemInfoNotes[1].moreInfoItemId"/>
- <call-simple-method method-name="getLinkFromLastSystemNote"/>
- <set field="lastSystemInfoLink2"
from-field="lastSystemInfoLink"/>
- <field-to-result field="lastSystemInfoLink2"/>
</if-not-empty>
<if-not-empty field="systemInfoNotes[3]">
<set field="lastSystemInfoNote3"
from-field="systemInfoNotes[2]"/>
<field-to-result field="lastSystemInfoNote3"/>
- <!-- get link from systemInfoNote 3 -->
- <set field="systemNotepartyId"
from-field="systemInfoNotes[2].noteParty"/>
- <set field="systemNoteworkEffortId"
from-field="systemInfoNotes[2].moreInfoItemId"/>
- <call-simple-method method-name="getLinkFromLastSystemNote"/>
- <set field="lastSystemInfoLink3"
from-field="lastSystemInfoLink"/>
- <field-to-result field="lastSystemInfoLink3"/>
</if-not-empty>
</if-not-empty>
</simple-method>
-
- <simple-method method-name="getLinkFromLastSystemNote"
short-description="Get links from the last 3 system info notes">
- <entity-condition list="linkSystem"
entity-name="WorkEffortPartyAssignment" filter-by-date="true">
- <condition-list combine="and">
- <condition-expr field-name="partyId" operator="equals"
from-field="systemNotepartyId"/>
- <condition-expr field-name="workEffortId" operator="equals"
from-field="systemNoteworkEffortId"/>
- </condition-list>
- </entity-condition>
- <if-not-empty field="linkSystem">
- <if-compare field="linkSystem[0].statusId" operator="contains"
value="PRTYASGN_">
- <set field="lastSystemInfoLink"
value="/taskmgr/control/taskView?taskId=${systemNoteworkEffortId}"/>
- </if-compare>
- <if-compare field="linkSystem[0].statusId" operator="contains"
value="SCAS_">
- <set field="lastSystemInfoLink"
value="/scrum/control/taskView?taskId=${systemNoteworkEffortId}"/>
- </if-compare>
- <if-compare field="linkSystem[0].statusId" operator="contains"
value="PAS_">
- <set field="lastSystemInfoLink"
value="/projectmgr/control/taskView?workEffortId=${systemNoteworkEffortId}"/>
- </if-compare>
- </if-not-empty>
- </simple-method>
-
</simple-methods>
Modified: ofbiz/trunk/applications/commonext/servicedef/secas.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/servicedef/secas.xml?rev=1292180&r1=1292179&r2=1292180&view=diff
==============================================================================
--- ofbiz/trunk/applications/commonext/servicedef/secas.xml (original)
+++ ofbiz/trunk/applications/commonext/servicedef/secas.xml Wed Feb 22 08:35:59
2012
@@ -20,27 +20,5 @@ under the License.
<service-eca xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/service-eca.xsd">
- <!-- send a note when a communicationevent is created for a certain
loginId when an
- existing comm event's status changes into status: entered-->
- <eca service="setCommunicationEventStatus" event="commit">
- <condition field-name="statusId" operator="equals"
value="COM_ENTERED"/>
- <set field-name="entityName" value="CommunicationEvent"/>
- <set field-name="entityNameId" env-name="communicationEventId"/>
- <action service="createSystemInfoNote" mode="sync"/>
- </eca>
- <!-- send a note when a communicationevent is created for a certain
loginId
- with the status entered -->
- <eca service="createCommunicationEvent" event="commit">
- <condition field-name="statusId" operator="equals"
value="COM_ENTERED"/>
- <set field-name="entityName" value="CommunicationEvent"/>
- <set field-name="entityNameId" env-name="communicationEventId"/>
- <action service="createSystemInfoNote" mode="sync"/>
- </eca>
- <!-- send a system note to all Customer request participants (excluding
the originator)
- when a note is added to a particular customer request.-->
- <eca service="createCustRequestItemNote" event="commit">
- <set field-name="entityName" value="CustRequestItemNote"/>
- <set field-name="entityNameId" env-name="noteId"/>
- <action service="createSystemInfoNote" mode="sync"/>
- </eca>
+
</service-eca>
Modified: ofbiz/trunk/applications/commonext/servicedef/services.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/servicedef/services.xml?rev=1292180&r1=1292179&r2=1292180&view=diff
==============================================================================
--- ofbiz/trunk/applications/commonext/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/commonext/servicedef/services.xml Wed Feb 22
08:35:59 2012
@@ -26,11 +26,13 @@ under the License.
<service name="createSystemInfoNote" engine="simple"
default-entity-name="NoteData"
location="component://commonext/script/org/ofbiz/SystemInfoServices.xml"
invoke="createSystemInfoNote">
- <description>Create a system info note realted to a certain
entityId</description>
- <auto-attributes mode="IN" optional="true"/>
- <attribute name="partyId" type="String" mode="IN"
optional="true"/><!-- userLogin.partyId is default -->
- <attribute name="entityName" type="String" mode="IN"/>
- <attribute name="entityNameId" type="String" mode="IN"/>
+ <description>Create a system info note</description>
+ <auto-attributes include="nonpk" mode="IN" optional="true"/>
+ </service>
+ <service name="deleteSystemInfoNote" engine="simple"
default-entity-name="NoteData"
+
location="component://commonext/script/org/ofbiz/SystemInfoServices.xml"
invoke="deleteSystemInfoNote">
+ <description>Delete a system info note</description>
+ <auto-attributes include="pk" mode="IN" optional="false"/>
</service>
<service name="deleteAllSystemNotes" engine="simple" auth="true"
location="component://commonext/script/org/ofbiz/SystemInfoServices.xml"
invoke="deleteAllSystemNotes">
@@ -47,9 +49,6 @@ under the License.
<attribute name="lastSystemInfoNote1" type="GenericValue" mode="OUT"
optional="true"/>
<attribute name="lastSystemInfoNote2" type="GenericValue" mode="OUT"
optional="true"/>
<attribute name="lastSystemInfoNote3" type="GenericValue" mode="OUT"
optional="true"/>
- <attribute name="lastSystemInfoLink1" type="String" mode="OUT"
optional="true"/>
- <attribute name="lastSystemInfoLink2" type="String" mode="OUT"
optional="true"/>
- <attribute name="lastSystemInfoLink3" type="String" mode="OUT"
optional="true"/>
</service>
<service name="getSystemInfoStatus" engine="simple" auth="true"
location="component://commonext/script/org/ofbiz/SystemInfoServices.xml"
invoke="getSystemInfoStatus">
Modified: ofbiz/trunk/applications/commonext/webapp/WEB-INF/controller.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/webapp/WEB-INF/controller.xml?rev=1292180&r1=1292179&r2=1292180&view=diff
==============================================================================
--- ofbiz/trunk/applications/commonext/webapp/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/commonext/webapp/WEB-INF/controller.xml Wed Feb 22
08:35:59 2012
@@ -23,6 +23,13 @@ under the License.
<description>General Application CommonExt Configuration File</description>
<!-- Request Mappings -->
+
+ <request-map uri="deleteSystemInfoNote">
+ <security https="true" auth="true"/>
+ <event type="service" invoke="deleteSystemInfoNote"/>
+ <response name="success" type="view-last"/>
+ </request-map>
+
<request-map uri="deleteAllSystemNotes">
<security https="true" auth="true"/>
<event type="service" invoke="deleteAllSystemNotes"/>
Modified: ofbiz/trunk/applications/commonext/widget/CommonScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/widget/CommonScreens.xml?rev=1292180&r1=1292179&r2=1292180&view=diff
==============================================================================
--- ofbiz/trunk/applications/commonext/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/commonext/widget/CommonScreens.xml Wed Feb 22
08:35:59 2012
@@ -35,13 +35,16 @@ under the License.
<set field="layoutSettings.suppressTab"
value="ofbizsetup"/><!-- diseable ofbiz setup by default -->
<!-- system info notes -->
<service service-name="getLastSystemInfoNote"
result-map="resultNote"/>
+ <set field="lastSystemInfoNote1"
from-field="resultNote.lastSystemInfoNote1"/>
+ <set field="lastSystemInfoNote2"
from-field="resultNote.lastSystemInfoNote2"/>
+ <set field="lastSystemInfoNote3"
from-field="resultNote.lastSystemInfoNote3"/>
<set field="layoutSettings.middleTopHeader" value="----------
${uiLabelMap.CommonLastSytemNotes} ----------"/>
- <set field="layoutSettings.middleTopMessage1"
value="${groovy:resultNote.lastSystemInfoNote1!=null?resultNote.lastSystemInfoNote1.noteDateTime.toString().substring(0,16)
+ " " + resultNote.lastSystemInfoNote1.noteInfo:""}"/>
- <set field="layoutSettings.middleTopMessage2"
value="${groovy:resultNote.lastSystemInfoNote2!=null?resultNote.lastSystemInfoNote2.noteDateTime.toString().substring(0,16)
+ " " + resultNote.lastSystemInfoNote2.noteInfo:""}"/>
- <set field="layoutSettings.middleTopMessage3"
value="${groovy:resultNote.lastSystemInfoNote3!=null?resultNote.lastSystemInfoNote3.noteDateTime.toString().substring(0,16)
+ " " + resultNote.lastSystemInfoNote3.noteInfo:""}"/>
- <set field="layoutSettings.middleTopLink1"
value="${resultNote.lastSystemInfoLink1}"/>
- <set field="layoutSettings.middleTopLink2"
value="${resultNote.lastSystemInfoLink2}"/>
- <set field="layoutSettings.middleTopLink3"
value="${resultNote.lastSystemInfoLink3}"/>
+ <set field="layoutSettings.middleTopMessage1"
value="${groovy:lastSystemInfoNote1!=null?lastSystemInfoNote1.noteDateTime.toString().substring(0,16)
+ " " + lastSystemInfoNote1.noteInfo:""}"/>
+ <set field="layoutSettings.middleTopMessage2"
value="${groovy:lastSystemInfoNote2!=null?lastSystemInfoNote2.noteDateTime.toString().substring(0,16)
+ " " + lastSystemInfoNote2.noteInfo:""}"/>
+ <set field="layoutSettings.middleTopMessage3"
value="${groovy:lastSystemInfoNote3!=null?lastSystemInfoNote3.noteDateTime.toString().substring(0,16)
+ " " + lastSystemInfoNote3.noteInfo:""}"/>
+ <set field="layoutSettings.middleTopLink1"
value="${lastSystemInfoNote1.moreInfoUrl}${groovy: if
(lastSystemInfoNote1&&lastSystemInfoNote1.moreInfoItemName&&lastSystemInfoNote1.moreInfoItemId)"?"
+ lastSystemInfoNote1.moreInfoItemName + "=" +
lastSystemInfoNote1.moreInfoItemId + "&id=" +
lastSystemInfoNote1.moreInfoItemId;}"/>
+ <set field="layoutSettings.middleTopLink2"
value="${lastSystemInfoNote2.moreInfoUrl}${groovy: if
(lastSystemInfoNote2&&lastSystemInfoNote2.moreInfoItemName&&lastSystemInfoNote2.moreInfoItemId)"?"
+ lastSystemInfoNote2.moreInfoItemName + "=" +
lastSystemInfoNote2.moreInfoItemId + "&id=" +
lastSystemInfoNote2.moreInfoItemId;}"/>
+ <set field="layoutSettings.middleTopLink3"
value="${lastSystemInfoNote3.moreInfoUrl}${groovy: if
(lastSystemInfoNote3&&lastSystemInfoNote3.moreInfoItemName&&lastSystemInfoNote3.moreInfoItemId)"?"
+ lastSystemInfoNote3.moreInfoItemName + "=" +
lastSystemInfoNote3.moreInfoItemId + "&id=" +
lastSystemInfoNote3.moreInfoItemId;}"/>
<!-- Help link actions -->
<!--<set field="helpTopic" value="${groovy: webSiteId + '_' +
requestAttributes._CURRENT_VIEW_}"/>-->
<set field="helpTopic" value="${groovy:
parameters.componentName.toUpperCase() + '_' +
requestAttributes._CURRENT_VIEW_}"/>
Modified: ofbiz/trunk/applications/commonext/widget/SystemInfoForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/widget/SystemInfoForms.xml?rev=1292180&r1=1292179&r2=1292180&view=diff
==============================================================================
--- ofbiz/trunk/applications/commonext/widget/SystemInfoForms.xml (original)
+++ ofbiz/trunk/applications/commonext/widget/SystemInfoForms.xml Wed Feb 22
08:35:59 2012
@@ -24,7 +24,13 @@ under the License.
<form name="SystemInfoNotes" type="list" list-name="systemInfoNotes"
odd-row-style="alternate-row" header-row-style="header-row-2"
default-table-style="basic-table hover-bar">
<field name="noteDateTime"
title="${uiLabelMap.CommonExtDateInfoCreated}"><display
type="date-time"/></field>
- <field name="noteInfo"
title="${uiLabelMap.CommonExtSystemInfoNote}"><hyperlink
target="/myportal/control/showPortletMainDecorator?portalPortletId=${moreInfoPortletId}&id=${moreInfoItemId}"
target-type="inter-app" description="${noteInfo}"></hyperlink></field>
+ <field name="noteInfo"
title="${uiLabelMap.CommonExtSystemInfoNote}"><hyperlink
target="${moreInfoUrl}${groovy: if (moreInfoItemName
&&moreInfoItemId)"?" + moreInfoItemName + "=" +
moreInfoItemId + "&id=" + moreInfoItemId;}"
target-type="inter-app" description="${noteInfo}"></hyperlink></field>
+ <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}"
widget-style="buttontext" >
+ <hyperlink target="deleteSystemInfoNote"
description="${uiLabelMap.CommonDelete}">
+ <parameter param-name="noteId"/>
+ <parameter param-name="portalPageId"
from-field="parameters.portalPageId"/>
+ </hyperlink>
+ </field>
</form>
<form name="EditSysInfoPortletParams" extends="CommonPortletEdit"
extends-resource="component://common/widget/PortletEditForms.xml">
@@ -40,12 +46,12 @@ under the License.
<form name="SystemInfoStatus" type="list" list-name="systemInfoStatus"
odd-row-style="alternate-row" header-row-style="header-row-2"
default-table-style="basic-table hover-bar">
<field name="noteDateTime"
title="${uiLabelMap.CommonExtDateLastChanged}"><display
type="date-time"/></field>
- <field name="noteInfo"
title="${uiLabelMap.CommonExtSystemInfoStatus}"><hyperlink
target="/myportal/control/showPortletMainDecorator?portalPortletId=${moreInfoPortletId}"
target-type="inter-app" description="${noteInfo}"></hyperlink></field>
+ <field name="noteInfo"
title="${uiLabelMap.CommonExtSystemInfoStatus}"><hyperlink
target="${moreInfoUrl}" target-type="inter-app"
description="${noteInfo}"></hyperlink></field>
</form>
<form name="CreateSystemInfoNote" type="single"
target="createSystemInfoNote">
- <field name="entityName"><hidden value="PublicMessage"/></field>
- <field name="entityNameId"><hidden value="dummy"/></field>
+ <field name="noteParty"><text/></field>
+ <field name="moreInfoUrl"><text size="50"/></field>
<field name="noteInfo"><text size="50"/></field>
<field name="createButton"><submit/></field>
</form>
Modified: ofbiz/trunk/applications/order/servicedef/secas.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/servicedef/secas.xml?rev=1292180&r1=1292179&r2=1292180&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/servicedef/secas.xml (original)
+++ ofbiz/trunk/applications/order/servicedef/secas.xml Wed Feb 22 08:35:59 2012
@@ -314,6 +314,17 @@ under the License.
<condition field-name="custRequestId" operator="is-not-empty"/>
<action service="updateCommunicationEvent" mode="sync"/>
</eca>
+
+ <!-- send a system note to all Customer request participants (excluding
the originator)
+ when a note is added to a particular customer request.-->
+ <eca service="createCustRequestItemNote" event="commit">
+ <set field-name="noteParty" env-name="partyId"/>
+ <set field-name="noteInfo" value="A note has been added to customer
request"/>
+ <set field-name="moreInfoItemName" value="custRequestId"/>
+ <set field-name="moreInfoItemId" env-name="custRequestId"/>
+ <set field-name="moreInfoUrl" value="/ordermgr/control/ViewRequest"/>
+ <action service="createSystemInfoNote" mode="sync"/>
+ </eca>
<!-- Requirement / CustRequestItem association event -->
<eca service="createRequirement" event="commit">
Modified: ofbiz/trunk/applications/party/servicedef/secas.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/servicedef/secas.xml?rev=1292180&r1=1292179&r2=1292180&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/servicedef/secas.xml (original)
+++ ofbiz/trunk/applications/party/servicedef/secas.xml Wed Feb 22 08:35:59 2012
@@ -104,4 +104,75 @@ under the License.
<eca service="createEmailAddressVerification" event="commit">
<action service="sendVerifyEmailAddressNotification" mode="async"/>
</eca>
+
+ <!-- send a note when a communicationevent is created for a certain
loginId when an
+ existing comm event's status changes into status: entered-->
+ <eca service="updateCommunicationEvent" event="commit">
+ <condition field-name="statusId" operator="equals"
value="COM_ENTERED"/>
+ <condition field-name="communicationEventTypeId" operator="equals"
value="AUTO_EMAIL_COM"/>
+ <condition field-name="partyIdTo" operator="is-not-empty"/>
+ <set field-name="noteParty" env-name="partyIdTo"/>
+ <set field-name="noteInfo" env-name="subject"/>
+ <set field-name="moreInfoItemName" value="communicationEventId"/>
+ <set field-name="moreInfoItemId" env-name="communicationEventId"/>
+ <set field-name="moreInfoUrl"
value="/partymgr/control/MyCommunicationEvents"/>
+ <action service="createSystemInfoNote" mode="sync"/>
+ </eca>
+ <eca service="updateCommunicationEvent" event="commit">
+ <condition field-name="statusId" operator="equals"
value="COM_ENTERED"/>
+ <condition field-name="communicationEventTypeId" operator="equals"
value="EMAIL_COMMUNICATION"/>
+ <condition field-name="partyIdTo" operator="is-not-empty"/>
+ <set field-name="noteParty" env-name="partyIdTo"/>
+ <set field-name="noteInfo" env-name="subject"/>
+ <set field-name="moreInfoItemName" value="communicationEventId"/>
+ <set field-name="moreInfoItemId" env-name="communicationEventId"/>
+ <set field-name="moreInfoUrl"
value="/partymgr/control/MyCommunicationEvents"/>
+ <action service="createSystemInfoNote" mode="sync"/>
+ </eca>
+ <eca service="updateCommunicationEvent" event="commit">
+ <condition field-name="statusId" operator="equals"
value="COM_ENTERED"/>
+ <condition field-name="communicationEventTypeId" operator="equals"
value="COMMENT_NOTE"/>
+ <condition field-name="partyIdTo" operator="is-not-empty"/>
+ <set field-name="noteParty" env-name="partyIdTo"/>
+ <set field-name="noteInfo" env-name="subject"/>
+ <set field-name="moreInfoItemName" value="communicationEventId"/>
+ <set field-name="moreInfoItemId" env-name="communicationEventId"/>
+ <set field-name="moreInfoUrl"
value="/partymgr/control/MyCommunicationEvents"/>
+ <action service="createSystemInfoNote" mode="sync"/>
+ </eca>
+ <!-- send a note when a communicationevent is created for a certain
loginId
+ with the status entered -->
+ <eca service="createCommunicationEvent" event="commit">
+ <condition field-name="statusId" operator="equals"
value="COM_ENTERED"/>
+ <condition field-name="communicationEventTypeId" operator="equals"
value="AUTO_EMAIL_COM"/>
+ <condition field-name="partyIdTo" operator="is-not-empty"/>
+ <set field-name="noteParty" env-name="partyIdTo"/>
+ <set field-name="noteInfo" env-name="subject"/>
+ <set field-name="moreInfoItemName" value="communicationEventId"/>
+ <set field-name="moreInfoItemId" env-name="communicationEventId"/>
+ <set field-name="moreInfoUrl"
value="/partymgr/control/MyCommunicationEvents"/>
+ <action service="createSystemInfoNote" mode="sync"/>
+ </eca>
+ <eca service="createCommunicationEvent" event="commit">
+ <condition field-name="statusId" operator="equals"
value="COM_ENTERED"/>
+ <condition field-name="communicationEventTypeId" operator="equals"
value="EMAIL_COMMUNICATION"/>
+ <condition field-name="partyIdTo" operator="is-not-empty"/>
+ <set field-name="noteParty" env-name="partyIdTo"/>
+ <set field-name="noteInfo" env-name="subject"/>
+ <set field-name="moreInfoItemName" value="communicationEventId"/>
+ <set field-name="moreInfoItemId" env-name="communicationEventId"/>
+ <set field-name="moreInfoUrl"
value="/partymgr/control/MyCommunicationEvents"/>
+ <action service="createSystemInfoNote" mode="sync"/>
+ </eca>
+ <eca service="createCommunicationEvent" event="commit">
+ <condition field-name="statusId" operator="equals"
value="COM_ENTERED"/>
+ <condition field-name="communicationEventTypeId" operator="equals"
value="COMMENT_NOTE"/>
+ <condition field-name="partyIdTo" operator="is-not-empty"/>
+ <set field-name="noteParty" env-name="partyIdTo"/>
+ <set field-name="noteInfo" env-name="subject"/>
+ <set field-name="moreInfoItemName" value="communicationEventId"/>
+ <set field-name="moreInfoItemId" env-name="communicationEventId"/>
+ <set field-name="moreInfoUrl"
value="/partymgr/control/MyCommunicationEvents"/>
+ <action service="createSystemInfoNote" mode="sync"/>
+ </eca>
</service-eca>
Modified: ofbiz/trunk/specialpurpose/projectmgr/entitydef/eecas.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/entitydef/eecas.xml?rev=1292180&r1=1292179&r2=1292180&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/entitydef/eecas.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/entitydef/eecas.xml Wed Feb 22
08:35:59 2012
@@ -23,8 +23,11 @@ under the License.
<eca entity="WorkEffortPartyAssignment" operation="create" event="return">
<condition field-name="statusId" operator="equals"
value="PAS_ASSIGNED"/>
- <set field-name="entityName" value="WorkEffortPartyAssignment"/>
- <set field-name="entityNameId" env-name="workEffortId"/>
+ <set field-name="noteParty" env-name="partyId"/>
+ <set field-name="noteInfo" value="New task assignment"/>
+ <set field-name="moreInfoItemName" value="workEffortId"/>
+ <set field-name="moreInfoItemId" env-name="workEffortId"/>
+ <set field-name="moreInfoUrl" value="/projectmgr/control/taskView/>"/>
<action service="createSystemInfoNote" mode="sync"/>
</eca>