Author: hansbak
Date: Mon Oct 27 20:36:28 2008 New Revision: 708424 URL: http://svn.apache.org/viewvc?rev=708424&view=rev Log: some corrections on the timesheet Modified: ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.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=708424&r1=708423&r2=708424&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml Mon Oct 27 20:36:28 2008 @@ -327,7 +327,6 @@ <set field="parameters.roleTypeId" from-field="projectAssign.roleTypeId"/> <set field="parameters.statusId" value="PAS_ASSIGNED"/> <call-simple-method method-name="assignPartyToWorkEffort" xml-resource="component://workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml"/> - <set field="parameters.fromDate" from-field="newEntity.fromDate"/><!-- need to be able to update status later --> </if-empty> <check-errors/> @@ -386,6 +385,10 @@ <!-- update the assignment status if required --> <if-compare field="parameters.checkComplete" value="Y" operator="equals"> + <entity-and entity-name="WorkEffortPartyAssignment" list-name="assigns" filter-by-date="true"> + <field-map field-name="workEffortId" env-name="parameters.workEffortId"/> + <field-map field-name="partyId" env-name="timesheet.partyId"/> + </entity-and> <first-from-list entry-name="alreadyAssign" list-name="assigns"/> <if-compare field="alreadyAssign.statusId" value="PAS_COMPLETED" operator="not-equals"> <set field="upStat.partyId" from-field="timesheet.partyId"/> @@ -425,6 +428,8 @@ <field-to-result field-name="project.workEffortName" result-name="projectName"/> <field-to-result field-name="phase.workEffortId" result-name="phaseId"/> <field-to-result field-name="phase.workEffortName" result-name="phaseName"/> + <field-to-result field-name="task.workEffortId" result-name="taskId"/> + <field-to-result field-name="task.workEffortName" result-name="taskName"/> </simple-method> <simple-method method-name="copyProjectToTemplate" short-description="copy a project to a workeffortType starting with 'template'"> Modified: ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml?rev=708424&r1=708423&r2=708424&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml Mon Oct 27 20:36:28 2008 @@ -160,12 +160,13 @@ location="org/ofbiz/project/ProjectServices.xml" invoke="getProjectIdAndNameFromTask"> <description>Get the projectId and Name when a phase or task is provided.</description> <permission-service service-name="projectMgrPermission" main-action="VIEW"/> - <attribute name="taskId" type="String" mode="IN" optional="true"/> + <attribute name="taskId" type="String" mode="INOUT" optional="true"/> <attribute name="phaseId" type="String" mode="IN" optional="true"/> <attribute name="projectId" type="String" mode="OUT" optional="true"/> <attribute name="projectName" type="String" mode="OUT" optional="true"/> <attribute name="phaseId" type="String" mode="OUT" optional="true"/> <attribute name="phaseName" type="String" mode="OUT" optional="true"/> + <attribute name="taskName" type="String" mode="OUT" optional="true"/> </service> <service name="getProjectPhaseList" engine="simple" Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml?rev=708424&r1=708423&r2=708424&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml Mon Oct 27 20:36:28 2008 @@ -21,19 +21,25 @@ xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd"> <form name="EditWeekTimesheet" type="multi" list-name="timeEntries" use-row-submit="true" separate-columns="true" target="update${my}Timesheet" odd-row-style="alternate-row" default-table-style="basic-table hover-bar"> + <row-actions> + <service service-name="getProjectIdAndNameFromTask" result-map-name="result"> + <field-map field-name="taskId" env-name="workEffortId"/> + </service> + </row-actions> <field name="timesheetId"><hidden/></field> <field name="roleTypeId"><hidden/></field> <field name="fromDate"><hidden/></field> <field name="workEffortId" title="${uiLabelMap.ProjectMgrTaskName}"> - <drop-down allow-empty="true"> - <entity-options entity-name="ProjectPartyAndPhaseAndTask" description="${projectName}-${phaseName}-${workEffortName}"> - <entity-constraint name="workEffortTypeId" operator="not-equals" value="TASK_TEMPLATE"/> + <drop-down allow-empty="true" current-description="${result.projectName} -- ${result.phaseName} -- ${result.taskName} ${phaseName}"> + <entity-options entity-name="ProjectPartyAndPhaseAndTask" description="${projectName} -- ${phaseName} -- ${workEffortName}"> + <entity-constraint name="workEffortTypeId" operator="equals" value="TASK"/> <entity-constraint name="partyId" env-name="timesheet.partyId"/> <entity-constraint name="currentStatusId" value="PTS_CREATED"/> <entity-order-by field-name="projectName"/> <entity-order-by field-name="phaseName"/> <entity-order-by field-name="workEffortName"/> </entity-options> + <sub-hyperlink target="taskView?workEffortId=${result.taskId}" description="[${result.taskId}]"/> </drop-down> </field> <field name="checkComplete" title="${uiLabelMap.ProjectMgrCheckComplete}"><check/></field> |
Free forum by Nabble | Edit this page |