svn commit: r788977 - in /ofbiz/trunk: applications/commonext/entitydef/ applications/commonext/script/org/ofbiz/ specialpurpose/projectmgr/data/ specialpurpose/projectmgr/widget/ specialpurpose/projectmgr/widget/forms/

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

svn commit: r788977 - in /ofbiz/trunk: applications/commonext/entitydef/ applications/commonext/script/org/ofbiz/ specialpurpose/projectmgr/data/ specialpurpose/projectmgr/widget/ specialpurpose/projectmgr/widget/forms/

hansbak-2
Author: hansbak
Date: Sat Jun 27 14:25:56 2009
New Revision: 788977

URL: http://svn.apache.org/viewvc?rev=788977&view=rev
Log:
new portlet: view a particular project task, when clicked on system info note that a project task has been assigned to the logged on person, the specific task info will be shown

Modified:
    ofbiz/trunk/applications/commonext/entitydef/eecas.xml
    ofbiz/trunk/applications/commonext/entitydef/entitymodel.xml
    ofbiz/trunk/applications/commonext/script/org/ofbiz/SystemInfoServices.xml
    ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrPortletData.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml

Modified: ofbiz/trunk/applications/commonext/entitydef/eecas.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/entitydef/eecas.xml?rev=788977&r1=788976&r2=788977&view=diff
==============================================================================
--- ofbiz/trunk/applications/commonext/entitydef/eecas.xml (original)
+++ ofbiz/trunk/applications/commonext/entitydef/eecas.xml Sat Jun 27 14:25:56 2009
@@ -21,11 +21,10 @@
 <entity-eca xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entity-eca.xsd">
 
-    <eca entity="WorkEffortPartyAssignment" operation="create-store" event="return">
+    <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="partyId" env-name="userLogin.partyId"/>
         <action service="createSystemInfoNote" mode="sync"/>
     </eca>
 

Modified: ofbiz/trunk/applications/commonext/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/entitydef/entitymodel.xml?rev=788977&r1=788976&r2=788977&view=diff
==============================================================================
--- ofbiz/trunk/applications/commonext/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/commonext/entitydef/entitymodel.xml Sat Jun 27 14:25:56 2009
@@ -26,10 +26,11 @@
     <author>None</author>
     <version>1.0</version>
 
+<!-- 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="moreInfoItemId" type="value"><description>The id of the item to be displayed i.e. custRequestId, inoiceId etc</description></field>
-    <index name="systemInfo">
+    <field name="moreInfoItemId" type="value"><description>The id 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>
   </extend-entity>

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=788977&r1=788976&r2=788977&view=diff
==============================================================================
--- ofbiz/trunk/applications/commonext/script/org/ofbiz/SystemInfoServices.xml (original)
+++ ofbiz/trunk/applications/commonext/script/org/ofbiz/SystemInfoServices.xml Sat Jun 27 14:25:56 2009
@@ -80,16 +80,20 @@
             <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-one entity-name="WorkEffort" value-field="workEffort">
+                    <entity-and entity-name="WorkEffortPartyAssignment" list="assigns" filter-by-date="true">
                         <field-map field-name="workEffortId" from-field="parameters.entityNameId"/>
-                    </entity-one>
+                        <order-by field-name="-fromDate"/>
+                    </entity-and>
+                    <first-from-list entry="assign" list="assigns"/>
+                    <get-related-one value-field="assign" relation-name="WorkEffort" to-value-field="workEffort"/>
                     <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="role.partyId"/>
+                    <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="mytasks"/>
+                    <set field="noteData.moreInfoPortletId" value="ViewProjectTask"/>
+                    <set field="noteData.moreInfoItemId" from-field="workEffort.workEffortId"/>
                     <create-value value-field="noteData"/>
                 </if-compare>
             </if-compare>

Modified: ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrPortletData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrPortletData.xml?rev=788977&r1=788976&r2=788977&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrPortletData.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrPortletData.xml Sat Jun 27 14:25:56 2009
@@ -41,6 +41,13 @@
         screenLocation="component://projectmgr/widget/ProjectScreens.xml"
         description="List Projects For a certain Customer" securityServiceName="portalPermissionIsCustomer" securityMainAction="VIEW"/>
     <PortletPortletCategory portalPortletId="ListCustomerProjects" portletCategoryId="PROJECTMANAGER"/>
-
-
+    
+    <PortalPortlet portalPortletId="ViewProjectTask"
+        portletName="View a specific task of a project"
+        screenName="ViewProjectTask"
+        screenLocation="component://projectmgr/widget/TaskScreens.xml"
+        description="View a specific task of a project" securityServiceName="projectMgrPermission" securityMainAction="VIEW"/>
+    <PortletPortletCategory portalPortletId="ViewProjectTask" portletCategoryId="PROJECTMANAGER"/>
+    
+    
 </entity-engine-xml>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml?rev=788977&r1=788976&r2=788977&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml Sat Jun 27 14:25:56 2009
@@ -305,12 +305,11 @@
             </widgets>
         </section>
     </screen>
-    <screen name="TaskView">
+    
+    <screen name="ViewProjectTask">
         <section>
             <actions>
-                <set field="titleProperty" value="ProjectMgrTaskSummary"/>
-                <set field="tabButtonItem" value="taskView"/>
-                <set field="workEffortId" from-field="parameters.workEffortId"/>
+                <set field="workEffortId" from-field="parameters.workEffortId" default-value="${parameters.id}"/>
                 <set field="projectId" from-field="parameters.workEffortId"/>
                 <set field="isReadable" value="true"/>
                 <service service-name="getProjectTask" result-map="taskResult">
@@ -322,20 +321,32 @@
                 </service>
             </actions>
             <widgets>
+                <container style="lefthalf">
+                    <include-screen name="taskInfo"/>
+                    <include-screen name="taskBefore"/>
+                    <include-screen name="taskAfter"/>
+                </container>
+                <container style="righthalf">
+                    <include-screen name="TaskTeamInfo"/>
+                    <include-screen name="ListTaskContent"/>
+                    <include-screen name="NoteInfo"/>
+                    <include-screen name="ListWorkEffortRequests"/>
+                    <include-screen name="ListWorkEffortSurveyAppls"/>
+                </container>
+            </widgets>
+        </section>
+    </screen>
+    
+    <screen name="TaskView">
+        <section>
+            <actions>
+                <set field="titleProperty" value="ProjectMgrTaskSummary"/>
+                <set field="tabButtonItem" value="taskView"/>
+            </actions>
+            <widgets>
                 <decorator-screen name="Common${parameters.my}TaskDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
-                        <container style="lefthalf">
-                            <include-screen name="taskInfo"/>
-                            <include-screen name="taskBefore"/>
-                            <include-screen name="taskAfter"/>
-                        </container>
-                        <container style="righthalf">
-                            <include-screen name="TaskTeamInfo"/>
-                            <include-screen name="ListTaskContent"/>
-                            <include-screen name="NoteInfo"/>
-                            <include-screen name="ListWorkEffortRequests"/>
-                            <include-screen name="ListWorkEffortSurveyAppls"/>
-                        </container>
+                        <include-screen name="ProjectTaskView"/>
                     </decorator-section>
                 </decorator-screen>
             </widgets>
@@ -366,8 +377,6 @@
     </screen>
     <screen name="ListTaskContent">
         <section>
-            <actions>
-            </actions>
             <widgets>
                 <screenlet title="${uiLabelMap.PageTitleListTaskContent}">
                     <include-form name="ListTaskContent" location="component://projectmgr/widget/forms/TaskForms.xml"/>
@@ -378,7 +387,6 @@
     <screen name="NoteInfo">
         <section>
             <actions>
-                <set field="workEffortId" from-field="parameters.workEffortId"/>
                 <entity-and entity-name="WorkEffortNoteAndData" list="workEffortNoteandDetails">
                     <field-map field-name="workEffortId" from-field="workEffortId"/>
                     <order-by field-name="-noteDateTime"/>
@@ -417,7 +425,6 @@
         <section>
             <actions>
                 <set field="tabButtonItem" value="taskView"/>
-                <set field="workEffortId" from-field="parameters.workEffortId"/>
             </actions>
             <widgets>
                 <screenlet title="${uiLabelMap.PageTitleRequestList}">
@@ -430,7 +437,7 @@
         <section>
             <actions>
                 <entity-and entity-name="WorkEffortAssocView" list="depList" filter-by-date="true">
-                    <field-map field-name="workEffortIdTo" from-field="parameters.workEffortId"/>
+                    <field-map field-name="workEffortIdTo" from-field="workEffortId"/>
                     <field-map field-name="workEffortAssocTypeId" value="WORK_EFF_DEPENDENCY"/>
                 </entity-and>
             </actions>
@@ -456,7 +463,7 @@
         <section>
             <actions>
                 <entity-and entity-name="WorkEffortAssocView" list="depList" filter-by-date="true">
-                    <field-map field-name="workEffortIdFrom" from-field="parameters.workEffortId"/>
+                    <field-map field-name="workEffortIdFrom" from-field="workEffortId"/>
                     <field-map field-name="workEffortAssocTypeId" value="WORK_EFF_DEPENDENCY"/>
                 </entity-and>
             </actions>
@@ -562,7 +569,6 @@
             <actions>
                 <set field="headerItem" value="task"/>
                 <set field="tabButtonItem" value="EditWorkEffortSurveyAppls"/>
-                <set field="workEffortId" from-field="parameters.workEffortId"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonTaskDecorator" location="${parameters.mainDecoratorLocation}">
@@ -579,7 +585,6 @@
     <screen name="ListWorkEffortSurveyAppls">
         <section>
             <actions>
-                <set field="workEffortId" from-field="parameters.workEffortId"/>
                 <set field="nowTimeStampString" default-value="${groovy: org.ofbiz.base.util.UtilDateTime.nowTimestamp()}"/>
                 <entity-and entity-name="WorkEffortSurveyAppl" list="workEffortSurveyAppls">
                     <field-map field-name="workEffortId" from-field="workEffortId"/>
@@ -587,9 +592,16 @@
                 </entity-and>
             </actions>
             <widgets>
-                <platform-specific>
-                    <html><html-template location="component://projectmgr/webapp/projectmgr/survey/ListSurveys.ftl"/></html>
-                </platform-specific>
+                <section>
+                    <condition>
+                        <not><if-empty field="workEffortSurveyAppls"/></not>
+                    </condition>
+                    <widgets>
+                        <platform-specific>
+                            <html><html-template location="component://projectmgr/webapp/projectmgr/survey/ListSurveys.ftl"/></html>
+                        </platform-specific>
+                    </widgets>
+                </section>
             </widgets>
         </section>
     </screen>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml?rev=788977&r1=788976&r2=788977&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml Sat Jun 27 14:25:56 2009
@@ -589,7 +589,7 @@
         odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
         <actions>
             <entity-and entity-name="WorkEffortAndContentDataResource">
-                <field-map field-name="workEffortId" from-field="parameters.workEffortId"/>
+                <field-map field-name="workEffortId" from-field="workEffortId"/>
             </entity-and>
         </actions>
         <field name="contentName" widget-style="smallSubmit">