Author: hansbak
Date: Thu Oct 16 19:37:51 2008 New Revision: 705448 URL: http://svn.apache.org/viewvc?rev=705448&view=rev Log: correction of project resource overview Modified: ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.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=705448&r1=705447&r2=705448&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml Thu Oct 16 19:37:51 2008 @@ -757,67 +757,49 @@ </simple-method> <simple-method method-name="getPartiesByProject" short-description="get Project information" login-required="true"> - <entity-condition entity-name="ProjectAndPhaseAndTaskParty" 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="partyId" operator="equals" env-name="parameters.partyId" ignore-if-empty="true"/> - </condition-list> - <order-by field-name="projectId"/> - <order-by field-name="partyId"/> - </entity-condition> - <entity-condition entity-name="WorkEffortPartyAssignView" list-name="resources"> + <entity-condition entity-name="WorkEffortPartyAssignView" list-name="resources" filter-by-date="true"> <condition-expr field-name="workEffortId" operator="equals" env-name="parameters.projectId"/> <order-by field-name="roleTypeId"/> </entity-condition> <if-not-empty field="resources"> - <if-not-empty field="tasks"> - <iterate entry-name="resource" list-name="resources"> + <iterate entry-name="resource" list-name="resources"> + <clear-field field-name="projectParty"/> + <clear-field field-name="highInfo"/> + <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"/> + <entity-condition entity-name="ProjectAndPhaseAndTaskParty" list-name="tasks"> + <condition-list combine="and"> + <condition-expr field-name="projectId" operator="equals" env-name="parameters.projectId"/> + <condition-expr field-name="partyId" operator="equals" env-name="parameters.partyId"/> + </condition-list> + <order-by field-name="partyId"/> + </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="resource.partyId" to-field="projectParty.partyId" operator="not-equals"/> - </and> - </condition> - <then> - <field-to-list field-name="projectParty" list-name="projectParties"/> - <clear-field field-name="projectParty"/> - <clear-field field-name="highInfo"/> - </then> - </if> - <if-empty field="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.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"/> - </if-empty> - <if-compare-field field="task.partyId" operator="equals" to-field="resource.partyId"> - <!-- get the planned/actual hours --> - <set field="lowInfo" from-field="task"/> - <set field="parameters.hoursPartyId" from-field="task.partyId"/> - <call-simple-method method-name="getHours"/> - <set field="projectParty.plannedHours" from-field="highInfo.plannedHours"/> - <set field="projectParty.actualHours" from-field="highInfo.actualHours"/> - </if-compare-field> + <!-- get the planned/actual hours --> + <set field="lowInfo" from-field="task"/> + <set field="parameters.hoursPartyId" from-field="task.partyId"/> + <call-simple-method method-name="getHours"/> + <set field="projectParty.plannedHours" from-field="highInfo.plannedHours"/> + <set field="projectParty.actualHours" from-field="highInfo.actualHours"/> </iterate> - </iterate> - <if-not-empty field="projectParty"> - <field-to-list field-name="projectParty" list-name="projectParties"/> </if-not-empty> - <if-not-empty field="projectParties"> - <field-to-result field-name="projectParties"/> - </if-not-empty> - </if-not-empty> + <field-to-list field-name="projectParty" list-name="projectParties"/> + </iterate> + <field-to-result field-name="projectParties"/> </if-not-empty> </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"> |
Free forum by Nabble | Edit this page |