svn commit: r606659 - in /ofbiz/trunk/specialpurpose/projectmgr: config/ProjectMgrUiLabels.properties ofbiz-component.xml script/org/ofbiz/project/ProjectServices.xml servicedef/secas.xml widget/CommonScreens.xml widget/forms/TaskForms.xml

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

svn commit: r606659 - in /ofbiz/trunk/specialpurpose/projectmgr: config/ProjectMgrUiLabels.properties ofbiz-component.xml script/org/ofbiz/project/ProjectServices.xml servicedef/secas.xml widget/CommonScreens.xml widget/forms/TaskForms.xml

hansbak-2
Author: hansbak
Date: Sun Dec 23 19:30:09 2007
New Revision: 606659

URL: http://svn.apache.org/viewvc?rev=606659&view=rev
Log:
upon time entry check if party part of project, and check if task assigned, add when not

Added:
    ofbiz/trunk/specialpurpose/projectmgr/servicedef/secas.xml
Modified:
    ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.properties
    ofbiz/trunk/specialpurpose/projectmgr/ofbiz-component.xml
    ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml

Modified: ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.properties?rev=606659&r1=606658&r2=606659&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.properties (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.properties Sun Dec 23 19:30:09 2007
@@ -29,7 +29,7 @@
 PageTitleAddPhase=Add Phase
 PageTitleAddProjectNotes=Add Project Notes
 PageTitleAddResource=Add a Resource
-PageTitleAddSkill=Add Skill
+PageTitleAddSkill=Add Requirement
 PageTitleAddSubProject=Add Sub Project
 PageTitleAddSubTask=Add Sub Task
 PageTitleAddTask=Add Task
@@ -40,7 +40,7 @@
 PageTitleEditProject=Edit Project
 PageTitleProjectGanttChart=Project Gantt Chart
 PageTitleEditPhase=Edit Phase
-PageTitleEditSkill=Edit Skill
+PageTitleEditSkill=Edit Requirement
 PageTitleEditSubProject=Edit Sub Project
 PageTitleEditSubTask=Edit Sub Task
 PageTitleEditTask=Edit Task
@@ -70,7 +70,7 @@
 ProjectMgrCompanySubtitle=Project
 ProjectMgrCopyProject=Copy Project
 ProjectMgrDependencies=Dependencies
-ProjectMgrEditPatySkill=Edit PatySkill
+ProjectMgrEditPatySkill=Edit PartySkill
 ProjectMgrEditPoject=Edit Project
 ProjectMgrEditTask=Edit Task
 ProjectMgrEstimatedCost=Estimated Cost
@@ -101,7 +101,7 @@
 ProjectMgrResources=Resources
 ProjectMgrResourceName=Resource Name
 ProjectMgrSetOnHold=On-Hold
-ProjectMgrSkillStandards=Skill Standards
+ProjectMgrSkillStandards=Requirements
 ProjectMgrSkillType=Skill Type
 ProjectMgrSaveAsTemplate=Save As Template
 ProjectMgrSubProjectName=Sub Project Name

Modified: ofbiz/trunk/specialpurpose/projectmgr/ofbiz-component.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/ofbiz-component.xml?rev=606659&r1=606658&r2=606659&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/ofbiz-component.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/ofbiz-component.xml Sun Dec 23 19:30:09 2007
@@ -31,7 +31,8 @@
     <entity-resource type="data" reader-name="seed" loader="main" location="data/ProjectMgrSecurityData.xml"/>
     <entity-resource type="data" reader-name="demo" loader="main" location="data/ProjectMgrDemoData.xml"/>
     
-    <service-resource type="model" loader="main" location="servicedef/services.xml"/>
+    <service-resource type="model" loader="main" location="servicedef/services.xml"/>
+    <service-resource type="eca" loader="main" location="servicedef/secas.xml"/>
     
     <webapp name="projectmgr"
         title="Project"

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=606659&r1=606658&r2=606659&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml Sun Dec 23 19:30:09 2007
@@ -25,13 +25,11 @@
         <!--
                 theory behind the program
                 - - - - - - - - - - - - -
-                
+                (program under development)
                 Assumptions for tasks and resources
                 1. a workday has 8 hours.
                 2. a workweek has 40 hours and 5 days.
-                3. The default order of the Tasks is by name.
-                4. The default order of the tasks can be modified by the priority.
-                5. The default order can be changed by the workeffortassociation.
+                3. The order of the execution of the tasks is set by the workeffortassociation.
                 
                 The steps of the program are:
                 1. read all tasks into a list with the following fields:
@@ -44,15 +42,13 @@
                     
                     EF = LF task is on the critical path
                     
-                    
-                The program will allocate certain values for certain facts to indicate the importance
-                and add the values to the sequence field.
-                
-                order by name: 10 for every position
-                priority 1000 for every number
+                2. define the length of every task: skillstandard duration/persons or when zero
+                    default od a task is 3 days.
+
+                3. define the order of execution according tha workeffortAssociation
+                4. set the planned start and end date when no actual dates set yet.
+                5. store the start/end dates.
                 
-                The system will then sort the list by sequence and will insert the planned dates
-                according the startdate and sat and sundays.
         -->
         
         <!-- constants -->
@@ -136,9 +132,37 @@
         <entity-and entity-name="ProjectAndPhaseAndTask" list-name="projects">
             <field-map field-name="workEffortId" env-name="parameters.workEffortId"/>
         </entity-and>
-        <if-not-empty field-name="project">
-            <first-from-list entry-name="projects" list-name="project"/>
+        <if-not-empty field-name="projects">
+            <first-from-list entry-name="project" list-name="projects"/>
+            <else>
+                <add-error><fail-message message="WorkEffort: ${parameters.workEffortId} could not be found"/></add-error>
+                <check-errors/>
+            </else>
         </if-not-empty>
+        
+        <!-- check if party part of this project -->
+        <entity-and entity-name="WorkEffortPartyAssignment" list-name="projectAssigns" filter-by-date="true">
+            <field-map field-name="workEffortId" env-name="project.projectId"/>
+            <field-map field-name="partyId" env-name="timesheet.partyId"/>
+        </entity-and>
+        <if-empty field-name="projectAssigns">
+            <add-error><fail-message message="Party: ${timesheet.partyId} is not part of project: ${project.projectName} withe task: ${project.workEffortName}"/></add-error>
+            <check-errors/>
+        </if-empty>
+
+        <!-- check if party assigned to task, when not add with roletype of project -->
+        <entity-and entity-name="WorkEffortPartyAssignment" list-name="assigns" filter-by-date="true">
+            <field-map field-name="workEffortId" env-name="project.workEffortId"/>
+            <field-map field-name="partyId" env-name="timesheet.partyId"/>
+        </entity-and>
+        <if-empty field-name="assigns">
+            <first-from-list entry-name="projectAssign" list-name="projectAssigns"/>
+            <set field="addAssign.workEffortId" from-field="project.workEffortId"/>
+            <set field="addAssign.partyId" from-field="timesheet.partyId"/>
+            <set field="addAssign.roleTypeId" from-field="projectAssign.roleTypeId"/>
+            <set field="addAssign.statusId" value="PAS_ASSIGNED" />
+            <call-service service-name="assignPartyToWorkEffort" in-map-name="addAssign"/>
+        </if-empty>
         
         <get-related value-name="timesheet" relation-name="TimeEntry" list-name="timeEntries"/>
         

Added: ofbiz/trunk/specialpurpose/projectmgr/servicedef/secas.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/servicedef/secas.xml?rev=606659&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/servicedef/secas.xml (added)
+++ ofbiz/trunk/specialpurpose/projectmgr/servicedef/secas.xml Sun Dec 23 19:30:09 2007
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<service-eca xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/service-eca.xsd">
+  
+</service-eca>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml?rev=606659&r1=606658&r2=606659&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml Sun Dec 23 19:30:09 2007
@@ -143,8 +143,18 @@
                                         </not>
                                     </condition>
                                     <widgets>                                        
-                                        <include-menu name="TaskTabBar" location="component://projectmgr/widget/Menus.xml"/>
-                                        <include-menu name="TaskSubTabBar" location="component://projectmgr/widget/Menus.xml"/>
+                                        <include-menu name="TaskTabBar" location="component://projectmgr/widget/Menus.xml"/>
+                                        <section>
+                                            <condition>
+                                                <or>
+                                                    <if-compare field-name="tabButtonItem" operator="equals" value="taskView"/>
+                                                    <if-compare field-name="tabButtonItem" operator="equals" value="edittask"/>
+                                                </or>
+                                            </condition>
+                                            <widgets>
+                                                <include-menu name="TaskSubTabBar" location="component://projectmgr/widget/Menus.xml"/>
+                                            </widgets>
+                                        </section>
                                         <label style="head1" text="${uiLabelMap.ProjectMgrTaskCurrent}: ${workEffort.workEffortName}[${workEffort.workEffortId}] Project: ${projectName}"/>
                                         <link style="head1" text="[${projectId}]" target="projectView?projectId=${projectId}"/>
                                     </widgets>                                    

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml?rev=606659&r1=606658&r2=606659&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml Sun Dec 23 19:30:09 2007
@@ -234,7 +234,7 @@
         <field name="statusId" title="${uiLabelMap.CommonStatus}">
             <drop-down>
                 <entity-options entity-name="StatusItem" description="${description}">
-                    <entity-constraint name="statusTypeId" value="TASK_STATUS"/>
+                    <entity-constraint name="statusTypeId" value="PROJECT_ASSGN_STATUS"/>
                 </entity-options>
             </drop-down>
         </field>