svn commit: r788597 - /ofbiz/trunk/applications/commonext/script/org/ofbiz/SystemInfoServices.xml

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

svn commit: r788597 - /ofbiz/trunk/applications/commonext/script/org/ofbiz/SystemInfoServices.xml

hansbak-2
Author: hansbak
Date: Fri Jun 26 05:58:15 2009
New Revision: 788597

URL: http://svn.apache.org/viewvc?rev=788597&view=rev
Log:
only generate system notes for parties who have a userlogin

Modified:
    ofbiz/trunk/applications/commonext/script/org/ofbiz/SystemInfoServices.xml

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=788597&r1=788596&r2=788597&view=diff
==============================================================================
--- ofbiz/trunk/applications/commonext/script/org/ofbiz/SystemInfoServices.xml (original)
+++ ofbiz/trunk/applications/commonext/script/org/ofbiz/SystemInfoServices.xml Fri Jun 26 05:58:15 2009
@@ -36,10 +36,10 @@
                     <if-compare field="role.statusId" value="COM_ROLE_CREATED" operator="equals">
                         <set field="partyId" from-field="role.partyId"/>
                         <call-simple-method method-name="getPortletAttributeMap"/>
-                        <log level="always" message="==========allNotificationsattrib: ${attributeMap.allNotifications}"></log>
                         <if>
                             <condition>
                                 <and>
+                                    <if-compare field="haveUserLogin" value="true" operator="equals"/>
                                     <if-compare field="attributeMap.allNotifications" value="Y" operator="not-equals"/>
                                     <or>
                                         <and>
@@ -75,22 +75,23 @@
                 </iterate>
             </if-not-empty>
         </if-compare>
-        
         <!-- new task assignments for the logged on user -->
         <if-compare field="parameters.entityName" value="WorkEffortPartyAssignment" operator="equals">
             <call-simple-method method-name="getPortletAttributeMap"/>
-            <if-compare field="attributeMap.taskAssignment" value="Y" operator="not-equals">
-                <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="partyId"/>
-                <set field="noteData.noteName" value="SYSTEMNOTE"/>
-                <now-timestamp field="noteData.noteDateTime"/>
-                <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 field="haveUserLogin" value="true" operator="equals">
+                <if-compare field="attributeMap.taskAssignment" value="Y" operator="not-equals">
+                    <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="partyId"/>
+                    <set field="noteData.noteName" value="SYSTEMNOTE"/>
+                    <now-timestamp field="noteData.noteDateTime"/>
+                    <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-compare>
         </if-compare>
         
@@ -101,12 +102,15 @@
         <entity-and entity-name="UserLogin" list="ulList">
             <field-map field-name="partyId" from-field="partyId"/>
         </entity-and>
-        <first-from-list entry="userLogin" list="ulList"/>
-        <set field="paMap.ownerUserLoginId" from-field="userLogin.userLoginId"/>
-        <set field="paMap.portalPortletId" value="SystemInfoNotes"/>
-        <call-service service-name="getPortletAttributes" in-map-name="paMap">
-            <result-to-field result-name="attributeMap" field="attributeMap"/>
-        </call-service>
+        <if-not-empty field="ulList">
+            <set field="haveUserLogin" value="true"/>
+            <first-from-list entry="userLogin" list="ulList"/>
+            <set field="paMap.ownerUserLoginId" from-field="userLogin.userLoginId"/>
+            <set field="paMap.portalPortletId" value="SystemInfoNotes"/>
+            <call-service service-name="getPortletAttributes" in-map-name="paMap">
+                <result-to-field result-name="attributeMap" field="attributeMap"/>
+            </call-service>
+        </if-not-empty>
     </simple-method>
 
     <simple-method method-name="deleteAllSystemNotes" short-description="delete all system notes from a particular user">