Author: hansbak
Date: Fri Dec 26 02:27:58 2008 New Revision: 729475 URL: http://svn.apache.org/viewvc?rev=729475&view=rev Log: now show correct nbr of hours on project overview for used resources Modified: ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml Modified: ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml?rev=729475&r1=729474&r2=729475&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml Fri Dec 26 02:27:58 2008 @@ -777,106 +777,6 @@ </if-not-empty> </simple-method> - <simple-method method-name="getPartiesByProject" short-description="get Project information" login-required="true"> - <!-- list of actual hours by party --> - <entity-condition entity-name="ProjectPhaseTaskAndTimeEntryTimeSheet" list-name="tasks"> - <condition-list combine="and"> - <condition-expr field-name="projectId" operator="equals" env-name="parameters.projectId" ignore-if-empty="true"/> - <condition-expr field-name="timesheetPartyId" operator="equals" env-name="parameters.partyId" ignore-if-empty="true"/> - <condition-expr field-name="timesheetPartyId" operator="not-equals" env-name="null"/> - </condition-list> - <order-by field-name="projectId"/> - <order-by field-name="timesheetPartyId"/> - </entity-condition> - <if-not-empty field="tasks"> - <iterate entry-name="task" list-name="tasks"> - <if> - <condition> - <and> - <not><if-empty field="projectParty"/></not> - <if-compare-field field="projectParty.partyId" operator="not-equals" to-field="task.timesheetPartyId"/> - </and> - </condition> - <then> - <entity-one entity-name="PartyNameView" value-name="partyNameView"> - <field-map field-name="partyId" env-name="projectParty.partyId"/> - </entity-one> - <if-not-empty field="partyNameView"> - <set field="projectParty.partyName" value="${partyNameView.lastName},${partyNameView.firstName} ${partyNameView.middleName}${partyNameView.groupName}"/> - </if-not-empty> - <entity-and entity-name="WorkEffortPartyAssignment" list-name="resources" filter-by-date="true"> - <field-map field-name="workEffortId" env-name="task.projectId"/> - <field-map field-name="partyId" env-name="projectParty.partyId"/> - </entity-and> - <if-not-empty field="resources"> - <iterate list-name="resources" entry-name="resource"> - <set field="projectParty.roleTypeId" from-field="resource.roleTypeId"/> - <set field="projectParty.fromDate" from-field="resource.fromDate"/> - <set field="projectParty.thruDate" from-field="resource.thruDate"/> - </iterate> - </if-not-empty> - <field-to-list field-name="projectParty" list-name="projectParties"/> - <clear-field field-name="projectParty"/> - </then> - </if> - <set field="projectParty.projectId" from-field="task.projectId"/> - <set field="projectParty.partyId" from-field="task.timesheetPartyId"/> - <calculate field-name="projectParty.actualHours"> - <calcop operator="get" field-name="projectParty.actualHours"/> - <calcop operator="add" field-name="task.hours"/> - </calculate> - </iterate> - <if-not-empty field="projectParty"> - <entity-one entity-name="PartyNameView" value-name="partyNameView"> - <field-map field-name="partyId" env-name="projectParty.partyId"/> - </entity-one> - <if-not-empty field="partyNameView"> - <set field="projectParty.partyName" value="${partyNameView.lastName},${partyNameView.firstName} ${partyNameView.middleName}${partyNameView.groupName}"/> - </if-not-empty> - <entity-and entity-name="WorkEffortPartyAssignment" list-name="resources" filter-by-date="true"> - <field-map field-name="workEffortId" env-name="projectParty.projectId"/> - <field-map field-name="partyId" env-name="projectParty.partyId"/> - </entity-and> - <if-not-empty field="resources"> - <first-from-list entry-name="resource" list-name="resources"/> - <set field="projectParty.roleTypeId" from-field="resource.roleTypeId"/> - <set field="projectParty.fromDate" from-field="resource.fromDate"/> - <set field="projectParty.thruDate" from-field="resource.thruDate"/> - </if-not-empty> - <field-to-list field-name="projectParty" list-name="projectParties"/> - </if-not-empty> - </if-not-empty> - <entity-condition entity-name="WorkEffortPartyAssignment" list-name="resources" filter-by-date="true"> - <condition-expr field-name="workEffortId" operator="equals" env-name="parameters.projectId" ignore-if-empty="true"/> - <order-by field-name="roleTypeId"/> - </entity-condition> - <!-- now add all project parties who did not yet register time --> - <iterate entry-name="resource" list-name="resources"> - <entity-condition entity-name="ProjectPhaseTaskAndTimeEntryTimeSheet" list-name="tasks"> - <condition-list combine="and"> - <condition-expr field-name="projectId" operator="equals" env-name="resource.workEffortId" ignore-if-empty="true"/> - <condition-expr field-name="timesheetPartyId" operator="equals" env-name="resource.partyId"/> - </condition-list> - </entity-condition> - <if-empty field="tasks"> - <clear-field field-name="projectParty"/> - <set field="projectParty.partyId" from-field="resource.partyId"/> - <entity-one entity-name="PartyNameView" value-name="partyNameView"> - <field-map field-name="partyId" env-name="resource.partyId"/> - </entity-one> - <if-not-empty field="partyNameView"> - <set field="projectParty.partyName" value="${partyNameView.lastName},${partyNameView.firstName} ${partyNameView.middleName}${partyNameView.groupName}"/> - </if-not-empty> - <set field="projectParty.roleTypeId" from-field="resource.roleTypeId"/> - <set field="projectParty.fromDate" from-field="resource.fromDate"/> - <set field="projectParty.thruDate" from-field="resource.thruDate"/> - <field-to-list field-name="projectParty" list-name="projectParties"/> - </if-empty> - </iterate> - <order-value-list list-name="projectParties" order-by-list-name="partyName"/> - <field-to-result field-name="projectParties"/> - </simple-method> - <simple-method method-name="getTasksByParties" short-description="get task information by party member" login-required="true"> <!-- get the list of tasks optionaly selected for a party --> <if-empty field="parameters.partyId"> Modified: ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml?rev=729475&r1=729474&r2=729475&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml Fri Dec 26 02:27:58 2008 @@ -206,15 +206,6 @@ <attribute name="projectParties" type="List" mode="OUT" optional="true"/> </service> - <service name="getPartiesByProject" engine="simple" - location="org/ofbiz/project/ProjectServices.xml" invoke="getPartiesByProject"> - <description>Get project information</description> - <permission-service service-name="projectMgrPermission" main-action="VIEW"/> - <attribute name="projectId" type="String" mode="INOUT" optional="true"/> - <attribute name="partyId" type="String" mode="INOUT" optional="true"/> - <attribute name="projectParties" type="List" mode="OUT" optional="true"/> - </service> - <service name="getTasksByParties" engine="simple" location="org/ofbiz/project/ProjectServices.xml" invoke="getTasksByParties"> <description>Get project information by party</description> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml?rev=729475&r1=729474&r2=729475&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml Fri Dec 26 02:27:58 2008 @@ -578,27 +578,10 @@ </screen> <screen name="PartiesInfo"> <section> - <actions> - <service service-name="getPartiesByProject" result-map-name="result"> - <field-map field-name="projectId" env-name="projectId"/> - </service> - <set field="parties" from-field="result.projectParties"/> - </actions> - <widgets> - <container style="screenlet"> - <container style="screenlet-title-bar"> - <container style="h3"> - <label text="${uiLabelMap.ProjectMgrResources}"/> - </container> - </container> - <container style="screenlet-body"> - <section> - <widgets> - <include-form name="ListProjectParties" location="component://projectmgr/widget/forms/ProjectForms.xml"/> - </widgets> - </section> - </container> - </container> + <widgets> + <screenlet title="${uiLabelMap.ProjectMgrResources}"> + <include-form name="ListProjectParties" location="component://projectmgr/widget/forms/ProjectForms.xml"/> + </screenlet> </widgets> </section> </screen> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml?rev=729475&r1=729474&r2=729475&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml Fri Dec 26 02:27:58 2008 @@ -329,16 +329,33 @@ <field name="plannedHours"><display/></field> <field name="actualHours"><display/></field> </form> - <form name="ListProjectParties" type="list" list-name="parties" + <form name="ListProjectParties" type="list" list-name="assigns" odd-row-style="alternate-row" default-table-style="basic-table hover-bar"> + <actions> + <entity-condition entity-name="WorkEffortPartyAssignView" list-name="assigns" distinct="true"> + <condition-expr field-name="workEffortId" env-name="parameters.projectId"/> + <select-field field-name="partyId"/> + <select-field field-name="firstName"/> + <select-field field-name="lastName"/> + <select-field field-name="middleName"/> + <select-field field-name="groupName"/> + <order-by field-name="lastName"/> + <order-by field-name="firstName"/> + <order-by field-name="groupName"/> + </entity-condition> + </actions> + <row-actions> + <service service-name="getProject" result-map-name="result"> + <field-map field-name="projectId" env-name="parameters.projectId"/> + <field-map field-name="partyId" env-name="partyId"/> + </service> + </row-actions> <field name="projectId"><hidden/></field> <field name="partyName" title="${uiLabelMap.CommonName}"> - <hyperlink target="viewprofile?partyId=${partyId}" description="${partyName}"/> + <hyperlink target="viewprofile?partyId=${partyId}" description="${lastName}, ${firstName} ${middleName} ${groupName} [${partyId}]"/> </field> - <field name="actualHours"><display/></field> - <field name="roleTypeId" title="${uiLabelMap.ProjectMgrPartyRoleTypeId}"><display-entity entity-name="RoleType" description="${description}"/></field> - <field name="fromDate" title="${uiLabelMap.CommonFromDate}"><display type="date"/></field> - <field name="thruDate" title="${uiLabelMap.CommonThruDate}"><display type="date"/></field> + <field name="actualHours" entry-name="actualHours" map-name="result.projectInfo"><display/></field> + <field name="nonBilledHours" entry-name="actualNonBilledHours" map-name="result.projectInfo"><display/></field> </form> <form name="EditProjectSkills" type="list" target="updateProjectSkillStandard" list-name="workEffortSkillStandardList" paginate-target="EditProjectSkills" odd-row-style="alternate-row" default-table-style="basic-table hover-bar"> |
Free forum by Nabble | Edit this page |