svn commit: r786381 - in /ofbiz/trunk: applications/commonext/entitydef/eecas.xml applications/commonext/script/org/ofbiz/SystemInfoServices.xml applications/commonext/servicedef/services.xml themes/flatgrey/includes/header.ftl

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

svn commit: r786381 - in /ofbiz/trunk: applications/commonext/entitydef/eecas.xml applications/commonext/script/org/ofbiz/SystemInfoServices.xml applications/commonext/servicedef/services.xml themes/flatgrey/includes/header.ftl

hansbak-2
Author: hansbak
Date: Fri Jun 19 05:50:13 2009
New Revision: 786381

URL: http://svn.apache.org/viewvc?rev=786381&view=rev
Log:
fixing problems in system notification

Modified:
    ofbiz/trunk/applications/commonext/entitydef/eecas.xml
    ofbiz/trunk/applications/commonext/script/org/ofbiz/SystemInfoServices.xml
    ofbiz/trunk/applications/commonext/servicedef/services.xml
    ofbiz/trunk/themes/flatgrey/includes/header.ftl

Modified: ofbiz/trunk/applications/commonext/entitydef/eecas.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/entitydef/eecas.xml?rev=786381&r1=786380&r2=786381&view=diff
==============================================================================
--- ofbiz/trunk/applications/commonext/entitydef/eecas.xml (original)
+++ ofbiz/trunk/applications/commonext/entitydef/eecas.xml Fri Jun 19 05:50:13 2009
@@ -23,8 +23,9 @@
 
     <eca entity="WorkEffortPartyAssignment" operation="create-store" event="return">
         <condition field-name="statusId" operator="equals" value="PAS_ASSIGNED"/>
-        <set field-name="entityName" value="WorkEffortPartyAssign"/>
+        <set field-name="entityName" value="WorkEffortPartyAssignment"/>
         <set field-name="entityNameId" env-name="workEffortId"/>
+        <set field-name="partyId" env-name="userLogin.partyId"/>
         <action service="createSystemInfoNote" mode="sync"/>
     </eca>
 

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=786381&r1=786380&r2=786381&view=diff
==============================================================================
--- ofbiz/trunk/applications/commonext/script/org/ofbiz/SystemInfoServices.xml (original)
+++ ofbiz/trunk/applications/commonext/script/org/ofbiz/SystemInfoServices.xml Fri Jun 19 05:50:13 2009
@@ -22,7 +22,7 @@
        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"/>
         <!-- new communication events -->
         <if-compare field="parameters.entityName" value="CommunicationEvent" operator="equals">
             <entity-one entity-name="CommunicationEvent" value-field="comm">
@@ -49,16 +49,22 @@
         
         <!-- 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"/>
+            <entity-one entity-name="WorkEffort" value-field="workEffort">
+                <field-map field-name="workEffortId" from-field="parameters.entityNameId"/>
+            </entity-one>
             <make-value value-field="noteData" entity-name="NoteData"/>
-            <set field="noteData.noteParty" from-field="parameters.partyId"/>
+            <set field="noteData.noteParty" from-field="partyId"/>
             <set field="noteData.noteName" value="SYSTEMNOTE"/>
             <now-timestamp field="noteData.noteDateTime"/>
-            <set field="noteData.noteInfo" value="New task assignment '${workEffort,workEffortName}' [${parameters.workEffortId}]"/>
+            <set field="noteData.noteInfo" value="New task assignment '${workEffort.workEffortName}' [${workEffort.workEffortId}]"/>
             <sequenced-id sequence-name="NoteData" field="noteData.noteId"/>
             <set field="noteData.moreInfoPortletId" value="mytasks"/>
             <create-value value-field="noteData"/>
         </if-compare>
+        
+        <if-empty field="noteData">
+            <log level="error" message="No logic to create system note for entity name: ${parameters.entityName} "/>
+        </if-empty>
     
     </simple-method>
 

Modified: ofbiz/trunk/applications/commonext/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/servicedef/services.xml?rev=786381&r1=786380&r2=786381&view=diff
==============================================================================
--- ofbiz/trunk/applications/commonext/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/commonext/servicedef/services.xml Fri Jun 19 05:50:13 2009
@@ -26,10 +26,11 @@
 
     <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</description>        
+        <description>Create a system info note realted to a certain entityId</description>        
         <auto-attributes mode="IN" optional="true"/>
-        <attribute name="entityName" type="String" mode="IN" optional="true"/>
-        <attribute name="entityNameId" type="String" mode="IN" optional="true"/>
+        <attribute name="partyId" type="String" mode="IN"/>
+        <attribute name="entityName" type="String" mode="IN"/>
+        <attribute name="entityNameId" type="String" mode="IN"/>
     </service>
     <service name="deleteAllSystemNotes" engine="simple" auth="true"
         location="component://commonext/script/org/ofbiz/SystemInfoServices.xml" invoke="deleteAllSystemNotes">

Modified: ofbiz/trunk/themes/flatgrey/includes/header.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/flatgrey/includes/header.ftl?rev=786381&r1=786380&r2=786381&view=diff
==============================================================================
--- ofbiz/trunk/themes/flatgrey/includes/header.ftl (original)
+++ ofbiz/trunk/themes/flatgrey/includes/header.ftl Fri Jun 19 05:50:13 2009
@@ -141,9 +141,9 @@
           <li class=h4>
           <div class="divHidden">
           <center>${layoutSettings.middleTopHeader?if_exists}</center>
-          <a href="/myportal/control/showPortlet?portalPortletId=${layoutSettings.middleTopLink1?if_exists}">${layoutSettings.middleTopMessage1?if_exists}</a><br/>
-          <a href="/myportal/control/showPortlet?portalPortletId=${layoutSettings.middleTopLink2?if_exists}">${layoutSettings.middleTopMessage2?if_exists}</a><br/>
-          <a href="/myportal/control/showPortlet?portalPortletId=${layoutSettings.middleTopLink3?if_exists}">${layoutSettings.middleTopMessage3?if_exists}</a>
+          <a href="/myportal/control/showPortletDecorator?portalPortletId=${layoutSettings.middleTopLink1?if_exists}">${layoutSettings.middleTopMessage1?if_exists}</a><br/>
+          <a href="/myportal/control/showPortletDecorator?portalPortletId=${layoutSettings.middleTopLink2?if_exists}">${layoutSettings.middleTopMessage2?if_exists}</a><br/>
+          <a href="/myportal/control/showPortletDecorator?portalPortletId=${layoutSettings.middleTopLink3?if_exists}">${layoutSettings.middleTopMessage3?if_exists}</a>
           </div>
           </li>
         </#if>