Author: hansbak
Date: Tue Sep 9 20:38:03 2008 New Revision: 693691 URL: http://svn.apache.org/viewvc?rev=693691&view=rev Log: implemented a more generic view for projectAndPhase which can also be used for PhaseAndTask: WorkEffortAndChild Modified: ofbiz/trunk/applications/workeffort/entitydef/entitymodel_view.xml ofbiz/trunk/specialpurpose/projectmgr/entitydef/entitymodel.xml ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml Modified: ofbiz/trunk/applications/workeffort/entitydef/entitymodel_view.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/entitydef/entitymodel_view.xml?rev=693691&r1=693690&r2=693691&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/entitydef/entitymodel_view.xml (original) +++ ofbiz/trunk/applications/workeffort/entitydef/entitymodel_view.xml Tue Sep 9 20:38:03 2008 @@ -28,6 +28,25 @@ <copyright>Copyright 2001-2008 The Apache Software Foundation</copyright> <author>None</author> <version>1.0</version> + <view-entity entity-name="WorkEffortAndChild" + package-name="org.ofbiz.workeffort.workEffort" + title="WorkEffort for use in tree relationships"> + <member-entity entity-alias="WEP" entity-name="WorkEffort"/><!--project --> + <member-entity entity-alias="WEPH" entity-name="WorkEffort"/><!-- phase --> + <alias entity-alias="WEP" name="workEffortId"/> + <alias entity-alias="WEP" name="workEffortName"/> + <alias entity-alias="WEP" name="workEffortTypeId"/> + <alias entity-alias="WEP" name="workEffortParentId"/> + <alias entity-alias="WEP" name="currentStatusId"/> + <alias entity-alias="WEPH" field="workEffortId" name="childWorkEffortId"/> + <alias entity-alias="WEPH" field="workEffortName" name="childWorkEffortName"/> + <alias entity-alias="WEPH" field="workEffortTypeId" name="childWorkEffortTypeId"/> + <alias entity-alias="WEPH" field="currentStatusId" name="childCurrentStatusId"/> + <view-link entity-alias="WEP" rel-entity-alias="WEPH"> + <key-map field-name="workEffortId" rel-field-name="workEffortParentId"/> + </view-link> + </view-entity> + <view-entity entity-name="WorkEffortAndFulfillment" package-name="org.ofbiz.workeffort.workeffort" title="WorkEffort Requirement View Entity"> Modified: ofbiz/trunk/specialpurpose/projectmgr/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/entitydef/entitymodel.xml?rev=693691&r1=693690&r2=693691&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/entitydef/entitymodel.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/entitydef/entitymodel.xml Tue Sep 9 20:38:03 2008 @@ -155,23 +155,6 @@ </relation> </view-entity> - <view-entity entity-name="ProjectAndPhase" - package-name="org.ofbiz.workeffort.project" - title="WorkEffort for use in project -> phase"> - <member-entity entity-alias="WEP" entity-name="WorkEffort"/><!--project --> - <member-entity entity-alias="WEPH" entity-name="WorkEffort"/><!-- phase --> - <alias-all entity-alias="WEP"/> - <alias entity-alias="WEP" field="workEffortId" name="projectId"/> - <alias entity-alias="WEP" field="workEffortName" name="projectName"/> - <alias entity-alias="WEP" field="currentStatusId" name="projectStatusId"/> - <alias entity-alias="WEPH" field="workEffortId" name="phaseId"/> - <alias entity-alias="WEPH" field="workEffortName" name="phaseName"/> - <alias entity-alias="WEPH" field="currentStatusId" name="phaseStatusId"/> - <view-link entity-alias="WEP" rel-entity-alias="WEPH"> - <key-map field-name="workEffortId" rel-field-name="workEffortParentId"/> - </view-link> - </view-entity> - <view-entity entity-name="TimesheetAndTimeEntry" package-name="org.ofbiz.workeffort.project" title="Time entry for Timesheets, time entries always have a timesheet and are always for one day only and recording the hours for one person which is defined on the timesheet. A timesheet will always have at least one time entry."> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml?rev=693691&r1=693690&r2=693691&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml Tue Sep 9 20:38:03 2008 @@ -629,11 +629,14 @@ <field name="taskDescription" parameter-name="description" title="${uiLabelMap.CommonDescription}"><text default-value="${custRequest.description}"/></field> <field name="workEffortParentId" title="${uiLabelMap.ProjectMgrProjectAndPhaseName}*" parameter-name="workEffortParentId"> <drop-down allow-empty="false"> - <entity-options entity-name="ProjectAndPhaseAndTask" description="${projectName} : ${phaseName}"> - <entity-order-by field-name="workEffortParentId"/> - </entity-options> - </drop-down> - </field> + <entity-options entity-name="WorkEffortAndChild" description="${workEffortName} -- ${childWorkEffortName}" key-field-name="workEffortId"> + <entity-constraint name="workEffortTypeId" value="PROJECT"/> + <entity-constraint name="childWorkEffortTypeId" value="PHASE"/> + <entity-order-by field-name="workEffortName"/> + <entity-order-by field-name="childWorkEffortName"/> + </entity-options> + </drop-down> + </field> <field name="taskPriority" parameter-name="priority" title="${uiLabelMap.CommonPriority}"> <drop-down allow-empty="true" current="selected"> <option key="1" description="1 (${uiLabelMap.WorkEffortPriorityHigh})"/> @@ -655,14 +658,6 @@ </entity-options> </drop-down> </field> - <field name="workEffortParentId" title="${uiLabelMap.ProjectMgrProjectAndPhaseName}*"> - <drop-down allow-empty="false"> - <entity-options entity-name="ProjectAndPhase" description="${projectName} : ${phaseName}" key-field-name="phaseId"> - <entity-order-by field-name="projectName"/> - <entity-order-by field-name="phaseName"/> - </entity-options> - </drop-down> - </field> <field name="estimatedStartDate" title="${uiLabelMap.FormFieldTitle_estimatedStartDate}"><date-time type="date"/></field> <field name="estimatedCompletionDate" title="${uiLabelMap.FormFieldTitle_estimatedCompletionDate}"><date-time type="date"/></field> <field name="save" title="${uiLabelMap.CommonSave}"><submit/></field> |
Free forum by Nabble | Edit this page |