svn commit: r1142915 [10/28] - in /ofbiz/trunk/specialpurpose: ./ scrum/ scrum/config/ scrum/data/ scrum/data/helpdata/ scrum/data/hookscripts/ scrum/documents/ scrum/dtd/ scrum/entitydef/ scrum/lib/ scrum/patches/ scrum/script/ scrum/script/org/ scrum...

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

svn commit: r1142915 [10/28] - in /ofbiz/trunk/specialpurpose: ./ scrum/ scrum/config/ scrum/data/ scrum/data/helpdata/ scrum/data/hookscripts/ scrum/documents/ scrum/dtd/ scrum/entitydef/ scrum/lib/ scrum/patches/ scrum/script/ scrum/script/org/ scrum...

hansbak-2
Added: ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/test/SprintTests.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/test/SprintTests.xml?rev=1142915&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/test/SprintTests.xml (added)
+++ ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/test/SprintTests.xml Tue Jul  5 08:15:32 2011
@@ -0,0 +1,162 @@
+<?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.
+-->
+
+<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd">
+
+    <simple-method method-name="testUpdateSprintBacklog" short-description="Update Sprint Backlog" login-required="false">
+        <entity-one value-field="userLogin" entity-name="UserLogin">
+            <field-map field-name="userLoginId" value="system"/>
+        </entity-one>
+        <set field="parameters.custRequestId" value="DEMO-PRODBACKLOG-1"/>
+        <set field="parameters.estimatedMilliSeconds" value="36000000"/>
+        <set field="parameters.userLogin" from-field="userLogin"/>
+        <set-service-fields service-name="updateCustRequest" to-map="inMap" map="parameters"/>
+        <call-service service-name="updateCustRequest" in-map-name="inMap"/>
+    </simple-method>
+    
+    <simple-method method-name="testCreateSprintByScrummaster" short-description="Test Create Sprint By Scrummaster" login-required="false">
+        <entity-one value-field="userLogin" entity-name="UserLogin">
+            <field-map field-name="userLoginId" value="scrummaster"/>
+        </entity-one>
+        <set-current-user-login value-field="userLogin"/>
+        <set field="parameters.userLogin" from-field="userLogin"/>
+        <set field="parameters.maxNum" value="20"/>
+        <set field="parameters.projectId" value="DEMO-PROJECT-1"/>
+        <set field="parameters.sprintName" value="SprintTest"/>
+        <set field="parameters.sprintDescription" value="SprintDescription"/>
+        <set field="parameters.sprintEstimatedStart" value="2010-07-23 11:44:08.418" type="Timestamp"/>
+        <set field="parameters.sprintEstimatedEnd" value="2010-08-23 11:44:08.418" type="Timestamp"/>
+        <set field="parameters.sprintBacklogs" value="1"/>
+        <set field="parameters.custRequestName" value="TestSprint"/>
+        <call-simple-method method-name="createSprint" xml-resource="component://scrum/script/org/ofbiz/scrum/ScrumEvents.xml"/>
+    </simple-method>
+    
+    <simple-method method-name="testUpdateSprintByScrummaster" short-description="Test Update Sprint By Scrummaster" login-required="false">
+        
+        <call-simple-method method-name="testCreateSprintByScrummaster" xml-resource="component://scrum/script/org/ofbiz/scrum/test/SprintTests.xml"/>
+        
+        <set field="parameters.workEffortId" from-field="parameters.sprintId"/>
+        <set field="parameters.currentStatusId" value="SPRINT_ACTIVE"/>
+        <call-simple-method method-name="updateSprintInfo" xml-resource="component://scrum/script/org/ofbiz/scrum/ScrumEvents.xml"/>
+    </simple-method>
+    
+    <simple-method method-name="testCreateSprintByScrumTeam" short-description="Test Create Sprint By ScrumTeam" login-required="false">
+        <entity-one value-field="userLogin" entity-name="UserLogin">
+            <field-map field-name="userLoginId" value="scrumteam1"/>
+        </entity-one>
+        <set-current-user-login value-field="userLogin"/>
+        <set field="parameters.userLogin" from-field="userLogin"/>
+        <set field="parameters.maxNum" value="20"/>
+        <set field="parameters.projectId" value="DEMO-PROJECT-1"/>
+        <set field="parameters.sprintName" value="SprintTest"/>
+        <set field="parameters.sprintDescription" value="SprintDescription"/>
+        <set field="parameters.sprintEstimatedStart" value="2010-07-23 11:44:08.418" type="Timestamp"/>
+        <set field="parameters.sprintEstimatedEnd" value="2010-08-23 11:44:08.418" type="Timestamp"/>
+        <set field="parameters.sprintBacklogs" value="1"/>
+        <call-simple-method method-name="createSprint" xml-resource="component://scrum/script/org/ofbiz/scrum/ScrumEvents.xml"/>
+    </simple-method>
+    
+    <simple-method method-name="testUpdateSprintByScrumTeam" short-description="Test Update Sprint By ScrumTeam" login-required="false">
+        
+        <call-simple-method method-name="testCreateSprintByScrumTeam" xml-resource="component://scrum/script/org/ofbiz/scrum/test/SprintTests.xml"/>
+        
+        <set field="parameters.workEffortId" from-field="parameters.sprintId"/>
+        <set field="parameters.currentStatusId" value="SPRINT_ACTIVE"/>
+        <call-simple-method method-name="updateSprintInfo" xml-resource="component://scrum/script/org/ofbiz/scrum/ScrumEvents.xml"/>
+    </simple-method>
+    
+    <simple-method method-name="testCreateSprintByProductOwner" short-description="Test Create Sprint By ProductOwner" login-required="false">
+        <entity-one value-field="userLogin" entity-name="UserLogin">
+            <field-map field-name="userLoginId" value="productowner"/>
+        </entity-one>
+        <set-current-user-login value-field="userLogin"/>
+        <set field="parameters.userLogin" from-field="userLogin"/>
+        <set field="parameters.maxNum" value="20"/>
+        <set field="parameters.projectId" value="DEMO-PROJECT-1"/>
+        <set field="parameters.sprintName" value="SprintTest"/>
+        <set field="parameters.sprintDescription" value="SprintDescription"/>
+        <set field="parameters.sprintEstimatedStart" value="2010-07-23 11:44:08.418" type="Timestamp"/>
+        <set field="parameters.sprintEstimatedEnd" value="2010-08-23 11:44:08.418" type="Timestamp"/>
+        <set field="parameters.sprintBacklogs" value="2"/>
+        <set field="parameters.custRequestName" value="TestSprint"/>
+        <call-simple-method method-name="createSprint" xml-resource="component://scrum/script/org/ofbiz/scrum/ScrumEvents.xml"/>
+    </simple-method>
+    
+    <simple-method method-name="testUpdateSprintByProductOwner" short-description="Test Update Sprint By ProductOwner" login-required="false">
+        
+        <call-simple-method method-name="testCreateSprintByProductOwner" xml-resource="component://scrum/script/org/ofbiz/scrum/test/SprintTests.xml"/>
+        
+        <set field="parameters.workEffortId" from-field="parameters.sprintId"/>
+        <set field="parameters.currentStatusId" value="SPRINT_ACTIVE"/>
+        <call-simple-method method-name="updateSprintInfo" xml-resource="component://scrum/script/org/ofbiz/scrum/ScrumEvents.xml"/>
+    </simple-method>
+    
+    <simple-method method-name="testCreateSprintByAdmin" short-description="Test Create Sprint By Admin" login-required="false">
+        <entity-one value-field="userLogin" entity-name="UserLogin">
+            <field-map field-name="userLoginId" value="admin"/>
+        </entity-one>
+        <set-current-user-login value-field="userLogin"/>
+        <set field="parameters.userLogin" from-field="userLogin"/>
+        <set field="parameters.maxNum" value="20"/>
+        <set field="parameters.projectId" value="DEMO-PROJECT-1"/>
+        <set field="parameters.sprintName" value="SprintTest"/>
+        <set field="parameters.sprintDescription" value="SprintDescription"/>
+        <set field="parameters.sprintEstimatedStart" value="2010-07-23 11:44:08.418" type="Timestamp"/>
+        <set field="parameters.sprintEstimatedEnd" value="2010-08-23 11:44:08.418" type="Timestamp"/>
+        <set field="parameters.sprintBacklogs" value="2"/>
+        <set field="parameters.custRequestName" value="TestSprint"/>
+        <call-simple-method method-name="createSprint" xml-resource="component://scrum/script/org/ofbiz/scrum/ScrumEvents.xml"/>
+    </simple-method>
+    
+    <simple-method method-name="testUpdateSprintByAdmin" short-description="Test Update Sprint By Admin" login-required="false">
+        
+        <call-simple-method method-name="testCreateSprintByAdmin" xml-resource="component://scrum/script/org/ofbiz/scrum/test/SprintTests.xml"/>
+        
+        <set field="parameters.workEffortId" from-field="parameters.sprintId"/>
+        <set field="parameters.currentStatusId" value="SPRINT_ACTIVE"/>
+        <call-simple-method method-name="updateSprintInfo" xml-resource="component://scrum/script/org/ofbiz/scrum/ScrumEvents.xml"/>
+    </simple-method>
+    
+    <simple-method method-name="testAddSprintMember" short-description="Test add Sprint member" login-required="false">
+        <entity-one value-field="userLogin" entity-name="UserLogin">
+            <field-map field-name="userLoginId" value="scrummaster"/>
+        </entity-one>
+        <set field="parameters.workEffortId" value="DEMO-SPRINT-1"/>
+        <set field="parameters.roleTypeId" value="SCRUM_TEAM"/>
+        <set field="parameters.statusId" value="PRTYASGN_ASSIGNED"/>
+        <set field="parameters.partyId" value="DemoCustomer-1"/>
+        <set field="parameters.fromDate" value="2010-07-30 00:00:00.000"/>
+        <set field="parameters.userLogin" from-field="userLogin"/>
+        <call-service service-name="assignPartyToWorkEffort" in-map-name="parameters"/>
+    </simple-method>
+    
+    <simple-method method-name="testRemoveSprintMember" short-description="Test remove Sprint member" login-required="false">
+        <entity-one value-field="userLogin" entity-name="UserLogin">
+            <field-map field-name="userLoginId" value="scrummaster"/>
+        </entity-one>
+        <set field="parameters.workEffortId" value="DEMO-SPRINT-1"/>
+        <set field="parameters.roleTypeId" value="SCRUM_TEAM"/>
+        <set field="parameters.partyId" value="DemoCustomer-1"/>
+        <set field="parameters.fromDate" value="2010-07-30 00:00:00.000"/>
+        <set field="parameters.userLogin" from-field="userLogin"/>
+        <call-service service-name="unassignPartyFromWorkEffort" in-map-name="parameters"/>
+    </simple-method>
+</simple-methods>
\ No newline at end of file

Propchange: ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/test/SprintTests.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/test/SprintTests.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/test/SprintTests.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/test/TaskTests.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/test/TaskTests.xml?rev=1142915&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/test/TaskTests.xml (added)
+++ ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/test/TaskTests.xml Tue Jul  5 08:15:32 2011
@@ -0,0 +1,78 @@
+<?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.
+-->
+
+<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd">
+        
+        <simple-method method-name="testViewScrumRevision" short-description="Test View Scrum Revision" login-required="false" user-login-name="userLogin">
+            <entity-one value-field="userLogin" entity-name="UserLogin">
+                <field-map field-name="userLoginId" value="system"/>
+            </entity-one>
+            <set-current-user-login value-field="userLogin"/>
+            <set field="serviceCtx.userLogin" from-field="userLogin"/>
+            <set field="serviceCtx.repository" value="https://www.antwebsystems.com/svn/"/>
+            <set field="serviceCtx.revision" value="7"/>
+            <call-service service-name="viewScrumRevision" in-map-name="serviceCtx">
+                    <results-to-map map-name="result"/>
+            </call-service>
+            <assert>
+                <and>
+                    <not><if-empty field="result.repository"/></not>
+                    <not><if-empty field="result.revision"/></not>
+                </and>
+            </assert>
+            <check-errors/>
+        </simple-method>
+        <simple-method method-name="testRetrieveMissingScrumRevision" short-description="Test Retrieve Missing Scrum Revision" login-required="false" user-login-name="userLogin">
+            <entity-one value-field="userLogin" entity-name="UserLogin">
+                <field-map field-name="userLoginId" value="system"/>
+            </entity-one>
+            <set-current-user-login value-field="userLogin"/>
+            <set field="serviceCtx.userLogin" from-field="userLogin"/>
+            <set field="serviceCtx.repositoryRoot" value="https://www.antwebsystems.com/svn/scrum"/>
+            <set field="serviceCtx.latestRevision" value="7"/>
+            <call-service service-name="retrieveMissingScrumRevision" in-map-name="serviceCtx">
+                    <results-to-map map-name="result"/>
+            </call-service>
+            <assert>
+                <and>
+                    <if-compare field="result.responseMessage" operator="equals" value="success" />
+                </and>
+            </assert>
+            <check-errors/>
+        </simple-method>
+        <simple-method method-name="testRemoveDuplicateScrumRevision" short-description="Test Remove Duplicate Scrum Revision" login-required="false" user-login-name="userLogin">
+            <entity-one value-field="userLogin" entity-name="UserLogin">
+                <field-map field-name="userLoginId" value="system"/>
+            </entity-one>
+            <set-current-user-login value-field="userLogin"/>
+            <set field="serviceCtx.userLogin" from-field="userLogin"/>
+            <set field="serviceCtx.repositoryRoot" value="https://www.antwebsystems.com/svn/scrum"/>
+            <call-service service-name="removeDuplicateScrumRevision" in-map-name="serviceCtx">
+                    <results-to-map map-name="result"/>
+            </call-service>
+            <assert>
+                <and>
+                    <if-compare field="result.responseMessage" operator="equals" value="success" />
+                </and>
+            </assert>
+            <check-errors/>
+        </simple-method>
+</simple-methods>

Propchange: ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/test/TaskTests.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/test/TaskTests.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/test/TaskTests.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/test/TimesheetTests.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/test/TimesheetTests.xml?rev=1142915&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/test/TimesheetTests.xml (added)
+++ ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/test/TimesheetTests.xml Tue Jul  5 08:15:32 2011
@@ -0,0 +1,41 @@
+<?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.
+-->
+
+<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd">
+
+    <simple-method method-name="testTimesheetToComplete" short-description="Test set timesheet status to complete" login-required="false" user-login-name="userLogin">
+        <entity-one value-field="userLogin" entity-name="UserLogin">
+            <field-map field-name="userLoginId" value="scrumteam2"/>
+        </entity-one>
+        <set-current-user-login value-field="userLogin"/>
+        <set field="inMap.timesheetId" value="DEMO-TIMESHEET1"/>
+        <set field="inMap.statusId" value="TIMESHEET_COMPLETED"/>
+        <call-service service-name="updateTimesheet" in-map-name="inMap"></call-service>
+    </simple-method>
+    <simple-method method-name="testTimesheetToInProcess" short-description="Test set timesheet status to In Process" login-required="false" user-login-name="userLogin">
+        <entity-one value-field="userLogin" entity-name="UserLogin">
+            <field-map field-name="userLoginId" value="scrumteam2"/>
+        </entity-one>
+        <set-current-user-login value-field="userLogin"/>
+        <set field="inMap.timesheetId" value="DEMO-TIMESHEET1"/>
+        <call-service service-name="updateTimesheetToInProcess" in-map-name="inMap"></call-service>
+    </simple-method>
+</simple-methods>
\ No newline at end of file

Propchange: ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/test/TimesheetTests.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/test/TimesheetTests.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/test/TimesheetTests.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: ofbiz/trunk/specialpurpose/scrum/servicedef/permissionServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/scrum/servicedef/permissionServices.xml?rev=1142915&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/scrum/servicedef/permissionServices.xml (added)
+++ ofbiz/trunk/specialpurpose/scrum/servicedef/permissionServices.xml Tue Jul  5 08:15:32 2011
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
+    <description>scrum Services</description>
+    <vendor></vendor>
+    <version>1.0</version>
+    
+    <service name="projectUpdateMemberPermission" engine="simple" invoke="projectUpdateMemberPermission" location="component://scrum/script/org/ofbiz/scrum/ScrumPermissionServices.xml">
+        <implements service="permissionInterface"/>
+        <attribute name="projectId" mode="IN" type="String" optional="false"/>
+    </service>
+    <service name="taskUpdateMemberPermission" engine="simple" invoke="taskUpdateMemberPermission" location="component://scrum/script/org/ofbiz/scrum/ScrumPermissionServices.xml">
+        <implements service="permissionInterface"/>
+        <attribute name="projectId" mode="IN" type="String" optional="false"/>
+    </service>
+    <service name="sprintAddPermission" engine="simple" invoke="sprintAddPermission" location="component://scrum/script/org/ofbiz/scrum/ScrumPermissionServices.xml">
+        <implements service="permissionInterface"/>
+        <attribute name="projectId" mode="IN" type="String"></attribute>
+    </service>
+    <service name="sprintViewPermission" engine="simple" invoke="sprintViewPermission" location="component://scrum/script/org/ofbiz/scrum/ScrumPermissionServices.xml">
+        <implements service="permissionInterface"/>
+        <attribute name="projectId" mode="IN" type="String"></attribute>
+        <attribute name="sprintId" mode="IN" type="String"></attribute>
+    </service>
+    <service name="sprintUpdatePermission" engine="simple" invoke="sprintUpdatePermission" location="component://scrum/script/org/ofbiz/scrum/ScrumPermissionServices.xml">
+        <implements service="permissionInterface"/>
+        <attribute name="projectId" mode="IN" type="String"></attribute>
+        <attribute name="sprintId" mode="IN" type="String"></attribute>
+    </service>
+    <service name="sprintDeletePermission" engine="simple" invoke="sprintDeletePermission" location="component://scrum/script/org/ofbiz/scrum/ScrumPermissionServices.xml">
+        <implements service="permissionInterface"/>
+        <attribute name="projectId" mode="IN" type="String"></attribute>
+        <attribute name="sprintId" mode="IN" type="String"></attribute>
+    </service>
+    <service name="sprintBacklogDeletePermission" engine="simple" invoke="sprintBacklogDeletePermission" location="component://scrum/script/org/ofbiz/scrum/ScrumPermissionServices.xml">
+        <implements service="permissionInterface"/>
+        <attribute name="projectId" mode="IN" type="String"></attribute>
+        <attribute name="sprintId" mode="IN" type="String"></attribute>
+    </service>
+    <service name="projectTaskCreatePermission" engine="simple" invoke="projectTaskCreatePermission" location="component://scrum/script/org/ofbiz/scrum/ScrumPermissionServices.xml">
+        <implements service="permissionInterface"/>
+        <attribute name="projectId" mode="IN" type="String" optional="false"/>
+    </service>
+    <service name="projectTaskDeletePermission" engine="simple" invoke="projectTaskDeletePermission" location="component://scrum/script/org/ofbiz/scrum/ScrumPermissionServices.xml">
+        <implements service="permissionInterface"/>
+        <attribute name="projectId" mode="IN" type="String" optional="false"/>
+    </service>
+    
+    <!-- SCRUM Permission Check-->
+    <service name="scrumPermissionCheck" engine="simple"
+            location="component://scrum/script/org/ofbiz/scrum/ScrumPermissionServices.xml" invoke="scrumPermissionCheck">
+        <description>Scrum Basic Permission Checking Logic</description>
+        <implements service="permissionInterface"/>
+        <attribute name="projectId" type="String" mode="IN" optional="true"/>
+        <attribute name="sprintId" type="String" mode="IN" optional="true"/>
+        <attribute name="productId" type="String" mode="IN" optional="true"/>
+        <attribute name="custRequestId" type="String" mode="IN" optional="true"/>
+        <attribute name="taskId" type="String" mode="IN" optional="true"/>
+        <attribute name="partyId" type="String" mode="IN" optional="true"/>
+        <attribute name="timesheetId" type="String" mode="IN" optional="true"/>
+        <attribute name="timeEntryId" type="String" mode="IN" optional="true"/>
+    </service>
+</services>
\ No newline at end of file

Propchange: ofbiz/trunk/specialpurpose/scrum/servicedef/permissionServices.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/scrum/servicedef/permissionServices.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/scrum/servicedef/permissionServices.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: ofbiz/trunk/specialpurpose/scrum/servicedef/secas.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/scrum/servicedef/secas.xml?rev=1142915&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/scrum/servicedef/secas.xml (added)
+++ ofbiz/trunk/specialpurpose/scrum/servicedef/secas.xml Tue Jul  5 08:15:32 2011
@@ -0,0 +1,77 @@
+<?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">
+    <eca service="updateWorkEffort" event="commit">
+        <condition operator="equals" field-name="currentStatusId" value="STS_COMPLETED"/>
+        <set field-name="webSiteId" env-name="webSiteId"/>
+        <action mode="sync" service="autoCompleteBacklog"/>
+    </eca>
+    <eca service="createWorkEffort" event="commit">
+        <condition operator="equals" field-name="currentStatusId" value="SPRINT_ACTIVE"/>
+        <set field-name="sprintId" env-name="workEffortId"/>
+        <set field-name="sprintStatusId" env-name="currentStatusId"/>
+        <set field-name="webSiteId" env-name="webSiteId"/>
+        <action mode="sync" service="autoScrumNotification"/>
+    </eca>
+    <eca service="updateWorkEffort" event="commit">
+        <condition operator="equals" field-name="currentStatusId" value="SPRINT_CLOSED"/>
+        <set field-name="sprintId" env-name="workEffortId"/>
+        <set field-name="sprintStatusId" env-name="currentStatusId"/>
+        <set field-name="webSiteId" env-name="webSiteId"/>
+        <action mode="sync" service="autoScrumNotification"/>
+    </eca>
+    <eca service="createCustRequest" event="commit">
+        <condition operator="equals" field-name="statusId" value="CRQ_ACCEPTED"/>
+        <set field-name="custRequestStatusId" value="CRQ_ACCEPTED"/>
+        <set field-name="webSiteId" env-name="webSiteId"/>
+        <action mode="sync" service="autoScrumNotification"/>
+    </eca>
+    <eca service="setCustRequestStatus" event="commit">
+        <condition field-name="oldStatusId" operator="equals" value="CRQ_REVIEWED"/>
+        <condition operator="equals" field-name="statusId" value="CRQ_ACCEPTED"/>
+        <set field-name="custRequestStatusId" value="CRQ_ACCEPTED"/>
+        <set field-name="webSiteId" env-name="webSiteId"/>
+        <action mode="sync" service="autoScrumNotification"/>
+    </eca>
+    <eca service="setCustRequestStatus" event="commit">
+        <condition operator="equals" field-name="statusId" value="CRQ_REVIEWED"/>
+        <set field-name="custRequestStatusId" value="CRQ_REVIEWED"/>
+        <set field-name="webSiteId" env-name="webSiteId"/>
+        <action mode="sync" service="autoScrumNotification"/>
+    </eca>
+    <eca service="setCustRequestStatus" event="commit">
+        <condition operator="equals" field-name="statusId" value="CRQ_COMPLETED"/>
+        <set field-name="custRequestStatusId" value="CRQ_COMPLETED"/>
+        <set field-name="webSiteId" env-name="webSiteId"/>
+        <action mode="sync" service="autoScrumNotification"/>
+    </eca>
+    <eca service="setCustRequestStatus" event="commit">
+        <condition operator="equals" field-name="statusId" value="CRQ_CANCELLED"/>
+        <set field-name="custRequestStatusId" value="CRQ_CANCELLED"/>
+        <set field-name="webSiteId" env-name="webSiteId"/>
+        <action mode="sync" service="autoScrumNotification"/>
+    </eca>
+    <!-- when a communcation event is created check the subject for a PD# string, if found link the email to the certain product-->
+    <eca service="createCommunicationEvent" event="commit">
+        <action service="linkToProduct" mode="sync"/>
+    </eca>
+</service-eca>

Propchange: ofbiz/trunk/specialpurpose/scrum/servicedef/secas.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/scrum/servicedef/secas.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/scrum/servicedef/secas.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: ofbiz/trunk/specialpurpose/scrum/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/scrum/servicedef/services.xml?rev=1142915&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/scrum/servicedef/services.xml (added)
+++ ofbiz/trunk/specialpurpose/scrum/servicedef/services.xml Tue Jul  5 08:15:32 2011
@@ -0,0 +1,303 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
+    <description>scrum Services</description>
+    <vendor></vendor>
+    <version>1.0</version>
+    
+    <service name="updateSprintBacklogseq" engine="simple" default-entity-name="CustRequest" auth="true"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" invoke="updateSprintBacklogseq" transaction-timeout="0">
+        <auto-attributes mode="IN" include="pk"/>
+        <auto-attributes include="nonpk" mode="IN" optional="true"/>
+        <attribute name="mode" type="String" mode="IN"/><!-- possible values: TOP, BOTTOM, UP, DOWN -->
+        <attribute name="custRequestItemSeqId" type="String" mode="INOUT" optional="true"/>
+        <attribute name="productId" type="String" mode="INOUT" optional="true"/>
+        <attribute name="custRequestId" type="String" mode="INOUT" optional="true"/>
+        <attribute name="statusId" type="String" mode="INOUT" optional="true"/>
+        <attribute name="searchOption_custRequestId" type="String" mode="INOUT" optional="true"/>
+        <attribute name="searchOption_description" type="String" mode="IN" optional="true"/>
+        <attribute name="searchOption_custRequestId_op" type="String" mode="IN" optional="true"/>
+        <attribute name="searchOption_description_op" type="String" mode="IN" optional="true"/>
+        <attribute name="searchOption_custRequestId_ic" type="String" mode="IN" optional="true"/>
+        <attribute name="searchOption_description_ic" type="String" mode="IN" optional="true"/>
+        <attribute name="searchOption_parentCustRequestId" type="String" mode="IN" optional="true"/>
+        <attribute name="searchOption_statusId" type="String" mode="IN" optional="true"/>
+        <attribute name="custRequestId_op" type="String" mode="OUT" optional="true"/>
+        <attribute name="custRequestId_ic" type="String" mode="OUT" optional="true"/>
+        <attribute name="description" type="String" mode="OUT" optional="true"/>
+        <attribute name="description_op" type="String" mode="OUT" optional="true"/>
+        <attribute name="description_ic" type="String" mode="OUT" optional="true"/>
+        <attribute name="parentCustRequestId" type="String" mode="OUT" optional="true"/>
+    </service>
+    
+    <service name="getProjectInfoFromTask" engine="simple"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" invoke="getProjectInfoFromTask">
+        <description>Get the projectId and Name when a sprint backlog or task is provided.</description>
+        <attribute name="taskId" type="String" mode="INOUT" optional="true"/>
+        <attribute name="sprintId" 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="sprintId" type="String" mode="OUT" optional="true"/>
+        <attribute name="sprintName" type="String" mode="OUT" optional="true"/>
+        <attribute name="backlogId" type="String" mode="OUT" optional="true"/>
+        <attribute name="backlogName" type="String" mode="OUT" optional="true"/>
+        <attribute name="taskName" type="String" mode="OUT" optional="true"/>
+        <attribute name="taskWbsId" type="String" mode="OUT" optional="true"/>
+    </service>
+    
+    <service name="updateTimesheetEntryByWorkeffort" engine="simple"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" invoke="updateTimesheetEntryByWorkeffort">
+        <description>Update workeffort by workeffortId and timesheetId </description>
+        <permission-service service-name="projectMgrPermission" main-action="UPDATE"/>
+        <attribute name="timesheetId" type="String" mode="INOUT" optional="false"/>
+        <attribute name="workEffortId" type="String" mode="INOUT" optional="true"/><!-- when empty will be ignored -->
+        <attribute name="fromDate" type="Timestamp" mode="INOUT" optional="true"/>
+        <attribute name="rateTypeId" type="String" mode="IN" optional="true"/>
+        <attribute name="roleTypeId" type="String" mode="IN" optional="true"/>
+        <attribute name="hoursDay0" type="Double" mode="IN" optional="true"/>
+        <attribute name="hoursDay1" type="Double" mode="IN" optional="true"/>
+        <attribute name="hoursDay2" type="Double" mode="IN" optional="true"/>
+        <attribute name="hoursDay3" type="Double" mode="IN" optional="true"/>
+        <attribute name="hoursDay4" type="Double" mode="IN" optional="true"/>
+        <attribute name="hoursDay5" type="Double" mode="IN" optional="true"/>
+        <attribute name="hoursDay6" type="Double" mode="IN" optional="true"/>
+        <attribute name="planHoursDay0" type="Double" mode="IN" optional="true"/>
+        <attribute name="planHoursDay1" type="Double" mode="IN" optional="true"/>
+        <attribute name="planHoursDay2" type="Double" mode="IN" optional="true"/>
+        <attribute name="planHoursDay3" type="Double" mode="IN" optional="true"/>
+        <attribute name="planHoursDay4" type="Double" mode="IN" optional="true"/>
+        <attribute name="planHoursDay5" type="Double" mode="IN" optional="true"/>
+        <attribute name="planHoursDay6" type="Double" mode="IN" optional="true"/>
+        <attribute name="planHours" type="Double" mode="IN" optional="true"/>
+        <attribute name="actualHours" type="Double" mode="IN" optional="true"/>
+        <attribute name="checkComplete" type="String" mode="IN" optional="true"/>
+        <attribute name="webSiteId" type="String" mode="IN" optional="true"/><!-- for notification services -->
+    </service>
+    
+    <service name="getScrumActualHour" engine="simple" auth="true"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" invoke="getScrumActualHour">
+        
+        <attribute name="projectId" type="String" mode="IN" optional="true"/>
+        <attribute name="sprintId" type="String" mode="IN" optional="true"/>
+        <attribute name="custRequestId" type="String" mode="IN" optional="true"/>
+        <attribute name="taskId" type="String" mode="IN" optional="true"/>
+        <attribute name="actualHours" type="Double" mode="OUT" optional="false"/>
+        <attribute name="actualHoursNotBillYet" type="Double" mode="OUT" optional="true"/>
+        <attribute name="partyId" mode="IN" type="String" optional="true"/>
+    </service>
+    
+    <service name="getScrumActualHourByTimesheet" engine="simple" auth="true"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" invoke="getScrumActualHourByTimesheet">
+        
+        <attribute name="timesheetId" type="String" mode="IN" optional="false"/>
+        <attribute name="actualHours" type="Double" mode="OUT" optional="false"/>
+    </service>
+    
+    <service name="updateScrumTaskAssigment" default-entity-name="WorkEffortPartyAssignment" engine="simple"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" invoke="updateScrumTaskAssigment" auth="true">
+        <description>Update a WorkEffortPartyAssignment Entity, including set enddate and create new</description>
+        <required-permissions join-type="OR">
+            <check-permission permission="SCRUM" action="_ADMIN"/>
+            <check-permission permission="SCRUM" action="TASK_UPDATE"/>
+        </required-permissions>
+        <attribute name="workEffortId" type="String" mode="INOUT"/>
+        <attribute name="newPartyId" type="String" mode="IN" optional="true"/>
+        <attribute name="partyId" type="String" mode="IN"/>
+        <attribute name="newRoleTypeId" type="String" mode="IN" optional="true"/>
+        <attribute name="roleTypeId" type="String" mode="IN" optional="false"/>
+        <attribute name="statusId" type="String" mode="IN"/>
+        <attribute name="fromDate" type="Timestamp" mode="INOUT" optional="true"/>
+        <attribute name="thruDate" type="Timestamp" mode="IN" optional="true"/>
+        <attribute name="delegateReasonEnumId" type="String" mode="IN" optional="true"/>
+        <attribute name="comments" type="String" mode="IN" optional="true"/>
+        <attribute name="webSiteId" type="String" mode="IN" optional="true"/><!-- for notification services -->
+    </service>
+    <service name="addProductTimeToNewInvoice" engine="simple" auth="true"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" invoke="addProductTimeToNewInvoice">
+        <description>Add Product Time to a new Invoice</description>
+        <required-permissions join-type="AND">
+            <check-permission permission="SCRUM_BILLING" action="_CREATE"/>
+        </required-permissions>
+        <attribute name="productId" type="String" mode="IN" optional="false"/>
+        <attribute name="partyIdFrom" type="String" mode="IN" optional="true"/>
+        <attribute name="partyId" type="String" mode="IN" optional="true"/>
+        <attribute name="fromDate" type="Timestamp" mode="IN" optional="true"/>
+        <attribute name="thruDate" type="Timestamp" mode="IN" optional="true"/>
+        <attribute name="invoiceId" type="String" mode="INOUT" optional="true"/>
+        <attribute name="invoiceDate" type="Timestamp" mode="IN" optional="true"/>
+        <attribute name="reCreate" type="String" mode="IN" optional="true"/>
+        <attribute name="includeMeeting" type="String" mode="IN" optional="true"/>
+    </service>
+    <service name="removeInvoiceInTimeEntry" engine="simple" auth="true"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" invoke="removeInvoiceInTimeEntry">
+        <description>Remove invoiceId in TimeEntry</description>
+        <attribute name="invoiceId" type="String" mode="IN" optional="false"/>
+    </service>
+    
+    <service name="getScrumPlanHour" engine="simple" invoke="getScrumPlanHour"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" auth="true">
+        <description>Get Scrum Plan Hours from Backlog or Task : TimeEntry--> Task--> Backlog</description>
+        <attribute name="taskId" type="String" mode="IN" optional="true"/>
+        <attribute name="custRequestId" type="String" mode="IN" optional="true"/>
+        <attribute name="sprintId" type="String" mode="IN" optional="true"/>
+        <attribute name="projectId" type="String" mode="IN" optional="true"/>
+        <attribute name="planHours" type="Double" mode="OUT" optional="false"/>
+        <attribute name="initPlanHours" mode="OUT" type="Double" optional="true"/>
+        <attribute name="partyId" mode="IN" type="String" optional="true"/>
+    </service>
+    
+    <service name="getProductBacklogSize" engine="simple"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" invoke="getProductBacklogSize">
+        <description>Get project information and related backlog and task info.</description>
+        <attribute name="productId" type="String" mode="IN" optional="false"/>
+        <attribute name="statusId" type="String" mode="IN" optional="true"/>
+        <attribute name="parentCustRequestId" type="String" mode="IN" optional="true"/>
+        <attribute name="productBacklogSize" type="Long" mode="OUT" optional="true"/>
+    </service>
+    
+    <service name="getScrumProject" engine="simple"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" invoke="getScrumProject">
+        <description>Get project information and related backlog and task info.</description>
+        <attribute name="projectId" type="String" mode="INOUT" optional="true"/>
+        <attribute name="partyId" type="String" mode="INOUT" optional="true"/>
+        <attribute name="projectInfo" type="java.util.Map" mode="OUT" optional="true"/>
+    </service>
+    
+    <service name="getScrumTaskInfo" engine="simple" invoke="getScrumTaskInfo"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" auth="true">
+        <description>Get task info and others related to task</description>
+        <attribute name="taskId" type="String" mode="IN" optional="true"/>
+        <attribute name="partyId" mode="IN" type="String" optional="true"/>
+        <attribute name="planHours" type="Double" mode="OUT" optional="true"/>
+    </service>
+    
+    <!-- For emplLeave : Get party leave hours for date -->
+    <service name="getPartyLeaveHoursForDate" engine="simple" invoke="getPartyLeaveHoursForDate" default-entity-name="EmplLeave"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" auth="true">
+        <description>Get party leave hours for date</description>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
+        <attribute name="hours" type="Double" mode="OUT" optional="true"/>
+    </service>
+    
+    <!-- upgrade conversion programs -->
+    <service name="upgradeScrumR425" engine="simple" invoke="upgradeScrumR425"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" auth="true">
+    </service>
+    <service name="upgradeScrumR445" engine="simple" invoke="upgradeScrumR445"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" auth="true">
+    </service>
+    
+    <service name="createDefaultTask" engine="simple" invoke="createDefaultTask" auth="true"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml">
+        <attribute name="custRequestId" type="String" mode="IN" optional="false"/>
+    </service>
+    <service name="checkSprintStatus" engine="simple" auth="true"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" invoke="checkSprintStatus">
+    </service>
+
+    <service name="checkScrumPlanHour" engine="simple" auth="true"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" invoke="checkScrumPlanHour">
+        <attribute name="workEffortId" type="String" mode="IN" optional="true"/>
+        <attribute name="custRequestId" type="String" mode="IN" optional="true"/>
+        <attribute name="planHours" type="Double" mode="IN" optional="true"/>
+        <attribute name="allow" type="Boolean" mode="OUT" optional="false"/>
+    </service>
+    <service name="reOrderProductBacklogItemSequenceNumber" engine="simple" auth="true"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" invoke="reOrderProductBacklogItemSequenceNumber">
+        <attribute name="productId" type="String" mode="IN" optional="false"/>
+    </service>
+    <service name="cleanProductBacklogItems" engine="simple" auth="true"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" invoke="cleanProductBacklogItems">
+        <attribute name="productId" type="String" mode="IN" optional="false"/>
+    </service>
+    <service name="upgradeScrumR637" engine="simple" auth="true"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" invoke="upgradeScrumR637">
+    </service>
+    <service name="autoCompleteBacklog" engine="simple" auth="true"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" invoke="autoCompleteBacklog">
+        <attribute name="workEffortId" mode="IN" type="String" optional="false"/>
+        <attribute name="webSiteId" type="String" mode="IN" optional="true"/><!-- for notification services -->
+    </service>
+    <service name="autoScrumNotification" engine="simple" auth="true"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" invoke="autoScrumNotification">
+        <attribute name="sprintId" mode="IN" type="String" optional="true"/>
+        <attribute name="sprintStatusId" mode="IN" type="String" optional="true"/>
+        <attribute name="custRequestId" mode="IN" type="String" optional="true"/>
+        <attribute name="custRequestStatusId" mode="IN" type="String" optional="true"/>
+        <attribute name="webSiteId" mode="IN" type="String" optional="true"/><!-- for notification services -->
+    </service>
+    <service name="updateTimesheetToInProcess" default-entity-name="Timesheet" engine="simple" auth="true"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" invoke="updateTimesheetToInProcess">
+        <description>Updates the Timesheet status back to in process to be able to correct errors</description>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
+    </service>
+    
+    <service name="updateScrumRevision" engine="soap" export="true"
+        location="http://www.antwebsystems.com/webtools/control/SOAPService" invoke="updateScrumRevisionChange">
+        <implements service="updateScrumRevisionChange"/>
+    </service>
+    <service name="updateScrumRevisionChange" engine="simple" export="true" validate="false" require-new-transaction="true"
+            location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" invoke="updateScrumRevisionChange">
+        <description>Update Scrum Revision Change</description>
+        <attribute name="taskId" type="String" mode="IN" optional="false"/>
+        <attribute name="hours" type="String" mode="IN" optional="true"/>
+        <attribute name="user" type="String" mode="IN" optional="true"/>
+        <attribute name="revisionNumber" type="String" mode="IN" optional="true"/>
+        <attribute name="revisionLink" type="String" mode="IN" optional="true"/>
+        <attribute name="revisionDescription" type="String" mode="IN" optional="true"/>
+    </service>
+    <service name="viewScrumRevision" engine="java" auth="true"
+        location="org.ofbiz.scrum.ScrumServices" invoke="viewScrumRevision">
+        <description>view Scrum Revision</description>
+        <attribute name="revision" type="String" mode="INOUT" optional="false"/>
+        <attribute name="repository" type="String" mode="INOUT" optional="false"/>
+        <attribute name="logMessage" type="String" mode="OUT" optional="true"/>
+        <attribute name="diffMessage" type="String" mode="OUT" optional="true"/>
+    </service>
+    <service name="retrieveMissingScrumRevision" engine="java" auth="true"
+        location="org.ofbiz.scrum.ScrumServices" invoke="retrieveMissingScrumRevision">
+        <description>Retrieve Missing Scrum Revision</description>
+        <attribute name="latestRevision" type="String" mode="IN" optional="false"/>
+        <attribute name="repositoryRoot" type="String" mode="IN" optional="false"/>
+    </service>
+    <service name="removeDuplicateScrumRevision" engine="java" auth="true"
+        location="org.ofbiz.scrum.ScrumServices" invoke="removeDuplicateScrumRevision">
+        <description>Remove Duplicate Scrum Revision</description>
+        <attribute name="repositoryRoot" type="String" mode="IN" optional="false"/>
+    </service>
+    
+    <service name="upgradeScrumR801" engine="simple" auth="true"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" invoke="upgradeScrumR801">
+    </service>
+    
+    <service name="linkToProduct" engine="java" auth="true"
+        location="org.ofbiz.scrum.ScrumServices" invoke="linkToProduct">
+        <description>check when a comunication event is created if the subject contains the PD# string, if so
+                try to find the customer request and link it to the communication event..
+        </description>
+        <attribute name="communicationEventId" type="String" mode="IN" optional="false"/>
+    </service>
+    
+    <service name="upgradeScrumR1027" engine="simple" auth="true"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" invoke="upgradeScrumR1027">
+    </service>
+    
+    <service name="upgradeScrumR1320" engine="simple" auth="true"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" invoke="upgradeScrumR1320">
+    </service>
+    <service name="upgradeScrumR1476" engine="simple" auth="true"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" invoke="upgradeScrumR1476">
+        <attribute name="productId" type="String" mode="IN" optional="false"/>
+    </service>
+    
+    <service name="createWorkEffortConvert" engine="simple" auth="true" default-entity-name="WorkEffortConvert"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" invoke="createWorkEffortConvert">
+        <auto-attributes include="pk" mode="IN" optional="true"/>
+        <auto-attributes include="nonpk" mode="IN" optional="true"/>
+    </service>
+    <service name="upgradeScrumR1547" engine="simple" auth="true"
+        location="component://scrum/script/org/ofbiz/scrum/ScrumServices.xml" invoke="upgradeScrumR1547">
+        <description> The upgradeScrumR1547 service is using for convert the old data with the productId problem of
+            workeffort entity in scrum by copy the old data to existing entity name "WorkEffortGoodStandard" </description>
+    </service>
+</services>

Propchange: ofbiz/trunk/specialpurpose/scrum/servicedef/services.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/scrum/servicedef/services.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/scrum/servicedef/services.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: ofbiz/trunk/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumEvents.java?rev=1142915&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumEvents.java (added)
+++ ofbiz/trunk/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumEvents.java Tue Jul  5 08:15:32 2011
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.ofbiz.scrum;
+
+import java.io.IOException;
+import java.sql.Timestamp;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import javolution.util.FastList;
+import javolution.util.FastMap;
+
+import org.ofbiz.base.util.Debug;
+import org.ofbiz.base.util.UtilDateTime;
+import org.ofbiz.base.util.UtilHttp;
+import org.ofbiz.base.util.UtilMisc;
+import org.ofbiz.base.util.UtilProperties;
+import org.ofbiz.base.util.UtilValidate;
+import org.ofbiz.entity.Delegator;
+import org.ofbiz.entity.GenericEntityException;
+import org.ofbiz.entity.GenericValue;
+import org.ofbiz.entity.condition.EntityCondition;
+import org.ofbiz.entity.condition.EntityConditionList;
+import org.ofbiz.entity.condition.EntityExpr;
+import org.ofbiz.entity.condition.EntityOperator;
+
+/**
+ * ScrumEvents - Check The Warning Message.
+ */
+public class ScrumEvents {
+
+    public static final String module = ScrumEvents.class.getName();
+
+    public static String timeSheetChecker(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        HttpSession session = request.getSession();
+        Delegator delegator = (Delegator) session.getAttribute("delegator");
+        GenericValue userLogin = (GenericValue) session.getAttribute("userLogin");
+        List<Map<String, Object>> noTimeEntryList = FastList.newInstance();
+        String partyId = userLogin.getString("partyId");
+        Timestamp now = UtilDateTime.nowTimestamp();
+        Timestamp weekStart = UtilDateTime.getWeekStart(now);
+        
+        if (UtilValidate.isEmpty(delegator)) {
+            delegator = (Delegator) request.getAttribute("delegator");
+        }
+        
+        try {
+            // should be scrum team or scrum master.
+            EntityConditionList<EntityExpr> exprOrs = EntityCondition.makeCondition(UtilMisc.toList(
+                    EntityCondition.makeCondition("roleTypeId", EntityOperator.EQUALS, "SCRUM_TEAM"),
+                    EntityCondition.makeCondition("roleTypeId", EntityOperator.EQUALS, "SCRUM_MASTER")), EntityOperator.OR);
+            EntityConditionList<EntityCondition> exprAnds = EntityCondition.makeCondition(UtilMisc.toList(
+                    exprOrs,
+                    EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, partyId)),
+                    EntityOperator.AND);
+            List<GenericValue> partyRoleList = delegator.findList("PartyRole", exprAnds, null, null, null, false);
+            if (UtilValidate.isNotEmpty(partyRoleList)) {
+                List<GenericValue> timesheetList = delegator.findByAndCache("Timesheet", UtilMisc.toMap("partyId" , partyId, "statusId", "TIMESHEET_IN_PROCESS"));
+                if (UtilValidate.isNotEmpty(timesheetList)) {
+                    for (GenericValue timesheetMap : timesheetList) {
+                        String timesheetId = timesheetMap.getString("timesheetId");
+                        Timestamp timesheetDate = timesheetMap.getTimestamp("fromDate");
+                        //check monday - friday
+                        for (int i = 0; i < 5; i++) {
+                            Timestamp realTimeDate = UtilDateTime.addDaysToTimestamp(timesheetDate, i);
+                            Timestamp nowStartDate = UtilDateTime.getDayStart(now);
+                            //compare week and compare date
+                            if ((timesheetDate.compareTo(weekStart) <= 0) && (realTimeDate.compareTo(nowStartDate) < 0)) {
+                                //check time entry
+                                List<GenericValue> timeEntryList = timesheetMap.getRelatedByAnd("TimeEntry"
+                                        , UtilMisc.toMap("partyId", partyId, "timesheetId",timesheetId, "fromDate",realTimeDate));
+                                //check EmplLeave
+                                List<GenericValue> emplLeaveList = delegator.findByAndCache("EmplLeave"
+                                        , UtilMisc.toMap("partyId", partyId, "fromDate",realTimeDate));
+                                if (UtilValidate.isEmpty(timeEntryList) && UtilValidate.isEmpty(emplLeaveList)) {
+                                    Map<String, Object> noEntryMap = FastMap.newInstance();
+                                    noEntryMap.put("timesheetId", timesheetId);
+                                    noTimeEntryList.add(noEntryMap);
+                                    break;
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        } catch (GenericEntityException EntEx) {
+            EntEx.printStackTrace();
+            Debug.log(EntEx.getMessage(), module);
+        }
+        if (UtilValidate.isNotEmpty(noTimeEntryList)) {
+            String warningData = "";
+            int size = noTimeEntryList.size();
+            for (Map<String, Object> dataMap : noTimeEntryList) {
+                if (--size == 0) {
+                    warningData += dataMap.get("timesheetId");
+                } else {
+                    warningData += dataMap.get("timesheetId") + ", ";
+                }
+            }
+            Debug.logInfo("The following time sheet no time entry: [" + warningData + "]", module);
+            request.setAttribute("_ERROR_MESSAGE_", UtilProperties.getMessage("scrumUiLabels", "ScrumTimesheetWarningMessage"
+                    ,UtilMisc.toMap("warningMessage", warningData), UtilHttp.getLocale(request)));
+        }
+        return "success";
+    }
+}

Propchange: ofbiz/trunk/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumEvents.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumEvents.java
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumEvents.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumServices.java?rev=1142915&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumServices.java (added)
+++ ofbiz/trunk/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumServices.java Tue Jul  5 08:15:32 2011
@@ -0,0 +1,292 @@
+package org.ofbiz.scrum;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.sql.Timestamp;
+import com.ibm.icu.util.Calendar;
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
+import javolution.util.FastList;
+import javolution.util.FastMap;
+import javolution.util.FastSet;
+
+import org.ofbiz.base.util.Debug;
+import org.ofbiz.base.util.UtilMisc;
+import org.ofbiz.base.util.UtilProperties;
+import org.ofbiz.base.util.UtilValidate;
+import org.ofbiz.entity.Delegator;
+import org.ofbiz.entity.GenericEntityException;
+import org.ofbiz.entity.GenericValue;
+import org.ofbiz.entity.condition.EntityCondition;
+import org.ofbiz.entity.condition.EntityConditionList;
+import org.ofbiz.entity.condition.EntityExpr;
+import org.ofbiz.entity.condition.EntityOperator;
+import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.service.DispatchContext;
+import org.ofbiz.service.GenericServiceException;
+import org.ofbiz.service.LocalDispatcher;
+import org.ofbiz.service.ServiceUtil;
+/**
+ * Scrum Services
+ */
+public class ScrumServices {
+
+    public static final String module = ScrumServices.class.getName();
+
+    public static Map<String, Object> linkToProduct(DispatchContext ctx, Map<String, ? extends Object> context) {
+        Delegator delegator = ctx.getDelegator();
+        LocalDispatcher dispatcher = ctx.getDispatcher();
+        String communicationEventId = (String) context.get("communicationEventId");
+        // Debug.logInfo("==== Processing Commevent: " +  communicationEventId, module);
+
+        if (UtilValidate.isNotEmpty(communicationEventId)) {
+            try {
+                GenericValue communicationEvent = delegator.findByPrimaryKey("CommunicationEvent", UtilMisc.toMap("communicationEventId", communicationEventId));
+                if (UtilValidate.isNotEmpty(communicationEvent)) {
+                    String subject = communicationEvent.getString("subject");
+                    if (UtilValidate.isNotEmpty(subject)) {
+                        int pdLocation = subject.indexOf("PD#");
+                        if (pdLocation > 0) {
+                            // scan until the first non digit character
+                            int nonDigitLocation = pdLocation + 3;
+                            while (nonDigitLocation < subject.length() && Character.isDigit(subject.charAt(nonDigitLocation))) {
+                                nonDigitLocation++;
+                            }
+                            String productId = subject.substring(pdLocation + 3, nonDigitLocation);
+                            // Debug.logInfo("=======================Product id found in subject: >>" + custRequestId + "<<", module);
+                            GenericValue product = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", productId));
+                            if (UtilValidate.isNotEmpty(product)) {
+                                GenericValue communicationEventProductMap = delegator.findByPrimaryKey("CommunicationEventProduct", UtilMisc.toMap("productId", productId, "communicationEventId", communicationEventId));
+                                if (UtilValidate.isEmpty(communicationEventProductMap)) {
+                                    GenericValue communicationEventProduct = delegator.makeValue("CommunicationEventProduct", UtilMisc.toMap("productId", productId, "communicationEventId", communicationEventId));
+                                    communicationEventProduct.create();
+                                }
+                                try {
+                                    List<GenericValue> productRoleList = delegator.findByAnd("ProductRole", UtilMisc.toMap("productId",productId, "partyId", communicationEvent.getString("partyIdFrom"), "roleTypeId","PRODUCT_OWNER"));
+                                    GenericValue productRoleMap = EntityUtil.getFirst(productRoleList);
+                                    GenericValue userLogin = (GenericValue) context.get("userLogin");
+                                    // also close the incoming communication event
+                                    if (UtilValidate.isNotEmpty(productRoleMap)) {
+                                        dispatcher.runSync("setCommunicationEventStatus", UtilMisc.<String, Object>toMap("communicationEventId", communicationEvent.getString("communicationEventId"), "statusId", "COM_COMPLETE", "userLogin", userLogin));
+                                    }
+                                } catch (GenericServiceException e1) {
+                                    Debug.logError(e1, "Error calling updating commevent status", module);
+                                    return ServiceUtil.returnError("Error calling updating commevent status:" + e1.toString());
+                                }
+                            } else {
+                                Debug.logInfo("Product id " + productId + " found in subject but not in database", module);
+                            }
+                        }
+                    }
+                }
+                
+            } catch (GenericEntityException e) {
+                return ServiceUtil.returnError("find by primary key error:" + e.toString());
+            }
+            
+            Map<String, Object> result = ServiceUtil.returnSuccess();
+            return result;
+        } else {
+            Map<String, Object> result = ServiceUtil.returnError("A communication event id is required");
+            return result;
+        }
+    }
+    
+    /**
+     * viewScrumRevision
+     * <p>
+     * Use for view Scrum Revision
+     *
+     * @param   revision         Revision number
+     * @param   repository       Repository url
+     * @return Map with the result of the service, the output parameters.
+     */
+    public static Map<String, Object> viewScrumRevision(DispatchContext ctx, Map<String, ? extends Object> context) {
+        Delegator delegator = ctx.getDelegator();
+        LocalDispatcher dispatcher = ctx.getDispatcher();
+        String revision = (String) context.get("revision");
+        String repository = (String) context.get("repository");
+        Map<String, Object> result = ServiceUtil.returnSuccess();
+        String logMessage = "";
+        String diffMessage = "";
+        try {
+            if (UtilValidate.isNotEmpty(repository) && UtilValidate.isNotEmpty(revision)) {
+               String logline = null;
+               String logCommand = "svn log -r"+revision+" "+repository;
+               Process logProcess = Runtime.getRuntime().exec(logCommand);
+               BufferedReader logIn = new BufferedReader(new InputStreamReader(logProcess.getInputStream()));
+                while ((logline = logIn.readLine()) != null) {  
+                    logMessage += logline + "\n";
+                }
+               String diffline = null;
+               String diffCommand = "svn diff -r"+Integer.toString((Integer.parseInt(revision.trim()) - 1))+":"+revision+" "+repository;
+               Process diffProcess = Runtime.getRuntime().exec(diffCommand);
+               BufferedReader diffIn = new BufferedReader(new InputStreamReader(diffProcess.getInputStream()));
+               while ((diffline = diffIn.readLine()) != null) {  
+                   diffMessage += diffline + "\n";
+               }
+            }
+            result.put("revision", revision);
+            result.put("repository", repository);
+            result.put("logMessage", logMessage);
+            result.put("diffMessage", diffMessage);
+        } catch (IOException e) {  
+            e.printStackTrace();
+            return ServiceUtil.returnError(e.getMessage());
+        }
+        return result;
+    }
+    
+    /**
+     * retrieveMissingScrumRevision
+     * <p>
+     * Use for retrieve the missing data of the Revision
+     *
+     * @param   latestRevision       The latest revision number
+     * @param   repositoryRoot       The repository root url
+     * @return Map with the result of the service, the output parameters.
+     */
+    public static Map<String, Object> retrieveMissingScrumRevision(DispatchContext ctx, Map<String, ? extends Object> context) {
+        Delegator delegator = ctx.getDelegator();
+        LocalDispatcher dispatcher = ctx.getDispatcher();
+        GenericValue userLogin = (GenericValue) context.get("userLogin");
+        String latestRevision = (String) context.get("latestRevision");
+        String repositoryRoot = (String) context.get("repositoryRoot");
+        Map<String, Object> result = ServiceUtil.returnSuccess();
+        try {
+            if (UtilValidate.isNotEmpty(repositoryRoot) && UtilValidate.isNotEmpty(latestRevision)) {
+               Integer revision = Integer.parseInt(latestRevision.trim());
+               for (int i = 1; i <= revision; i++) {
+                   String logline = null;
+                   List<String> logMessageList = FastList.newInstance();
+                   String logCommand = "svn log -r"+i+" "+repositoryRoot;
+                   Process logProcess = Runtime.getRuntime().exec(logCommand);
+                   BufferedReader logIn = new BufferedReader(new InputStreamReader(logProcess.getInputStream()));
+                    while ((logline = logIn.readLine()) != null) {  
+                        logMessageList.add(logline.toString().trim());
+                    }
+                    if (UtilValidate.isNotEmpty(logMessageList)) {
+                        String userInfo = logMessageList.get(1).replace(" | ", ",");
+                        String taskInfo = logMessageList.get(3);
+                        // get user information
+                        String[] versionInfoTemp = userInfo.split(",");
+                        String user = versionInfoTemp[1];
+                        // get task information
+                        String taskId = null;
+                        char[] taskInfoList = taskInfo.toCharArray();
+                        int count = 0;
+                        for(int j = 0; j < taskInfoList.length;j++) {
+                            if(Character.isDigit(taskInfoList[j])) {
+                                count = count + 1;
+                            } else {
+                                count = 0;
+                            }
+                            if (count == 5) {
+                                taskId = taskInfo.substring(j-4, j+1);
+                            }
+                        }
+                        String revisionLink = repositoryRoot.substring(repositoryRoot.lastIndexOf("svn/") + 4, repositoryRoot.length()) + "&revision=" + i;
+                        Debug.logInfo("Revision Link ============== >>>>>>>>>>> "+ revisionLink, module);
+                        if (UtilValidate.isNotEmpty(taskId)) {
+                            String version = "R" + i;
+                            List <GenericValue> workeffContentList = delegator.findByAnd("WorkEffortAndContentDataResource", UtilMisc.toMap("contentName",version.trim() ,"drObjectInfo", revisionLink.trim()));
+                            List<EntityCondition> exprsAnd = FastList.newInstance();
+                            exprsAnd.add(EntityCondition.makeCondition("workEffortId", EntityOperator.EQUALS, taskId));
+                            
+                            List<EntityCondition> exprsOr = FastList.newInstance();
+                            exprsOr.add(EntityCondition.makeCondition("workEffortTypeId", EntityOperator.EQUALS, "SCRUM_TASK_ERROR"));
+                            exprsOr.add(EntityCondition.makeCondition("workEffortTypeId", EntityOperator.EQUALS, "SCRUM_TASK_TEST"));
+                            exprsOr.add(EntityCondition.makeCondition("workEffortTypeId", EntityOperator.EQUALS, "SCRUM_TASK_IMPL"));
+                            exprsOr.add(EntityCondition.makeCondition("workEffortTypeId", EntityOperator.EQUALS, "SCRUM_TASK_INST"));
+                            exprsAnd.add(EntityCondition.makeCondition(exprsOr, EntityOperator.OR));
+                            
+                            List<GenericValue> workEffortList = delegator.findList("WorkEffort", EntityCondition.makeCondition(exprsAnd, EntityOperator.AND), null, null, null, false);
+                            if (UtilValidate.isEmpty(workeffContentList) && UtilValidate.isNotEmpty(workEffortList)) {
+                                Map inputMap = FastMap.newInstance();
+                                inputMap.put("taskId", taskId);
+                                inputMap.put("user", user);
+                                inputMap.put("revisionNumber", Integer.toString(i));
+                                inputMap.put("revisionLink", revisionLink);
+                                inputMap.put("revisionDescription", taskInfo);
+                                inputMap.put("userLogin", userLogin);
+                                Debug.logInfo("inputMap ============== >>>>>>>>>>> "+ inputMap, module);
+                                dispatcher.runSync("updateScrumRevision", inputMap);
+                            }
+                        }
+                    }
+               }
+            }
+        } catch (IOException e) {  
+            e.printStackTrace();
+            return ServiceUtil.returnError(e.getMessage());
+        } catch (GenericEntityException entityEx) {
+            entityEx.printStackTrace();
+            return ServiceUtil.returnError(entityEx.getMessage());
+        } catch (GenericServiceException serviceEx) {
+            serviceEx.printStackTrace();
+            return ServiceUtil.returnError(serviceEx.getMessage());
+        }
+        
+        return result;
+    }
+    
+    /**
+     * removeDuplicateScrumRevision
+     * <p>
+     * Use for remove duplicate scrum revision
+     *
+     * @param   repositoryRoot       The repository root url
+     * @return Map with the result of the service.
+     */
+    public static Map<String, Object> removeDuplicateScrumRevision(DispatchContext ctx, Map<String, ? extends Object> context) {
+        Delegator delegator = ctx.getDelegator();
+        LocalDispatcher dispatcher = ctx.getDispatcher();
+        String repositoryRoot = (String) context.get("repositoryRoot");
+        Map<String, Object> result = ServiceUtil.returnSuccess();
+        try {
+            List<EntityCondition> exprsAnd = FastList.newInstance();
+            String revisionLink = repositoryRoot.substring(repositoryRoot.lastIndexOf("svn/") + 4, repositoryRoot.length()) + "&revision=";
+            exprsAnd.add(EntityCondition.makeCondition("workEffortContentTypeId", EntityOperator.EQUALS, "TASK_SUB_INFO"));
+            exprsAnd.add(EntityCondition.makeCondition("contentTypeId", EntityOperator.EQUALS, "DOCUMENT"));
+            exprsAnd.add(EntityCondition.makeCondition("drObjectInfo", EntityOperator.LIKE, revisionLink + "%"));
+            List<GenericValue> workEffortDataResourceList = delegator.findList("WorkEffortAndContentDataResource", EntityCondition.makeCondition(exprsAnd, EntityOperator.AND), null, null, null, false);
+            if (UtilValidate.isNotEmpty(workEffortDataResourceList)) {
+                Debug.logInfo("Total Content Size ============== >>>>>>>>>>> "+ workEffortDataResourceList.size(), module);
+                Set<String> keys = FastSet.newInstance();
+                Set<GenericValue> exclusions = FastSet.newInstance();
+                for (GenericValue workEffort : workEffortDataResourceList) {
+                    String drObjectInfo = workEffort.getString("drObjectInfo");
+                    if (keys.contains(drObjectInfo)) {
+                        exclusions.add(workEffort);
+                    } else {
+                        keys.add(drObjectInfo);
+                    }
+                }
+                // remove the duplicate entry
+                Debug.logInfo("Remove size ============== >>>>>>>>>>> "+ exclusions.size(), module);
+                if (UtilValidate.isNotEmpty(exclusions)) {
+                    for (GenericValue contentResourceMap : exclusions) {
+                        Debug.logInfo("Remove contentId ============== >>>>>>>>>>> "+ contentResourceMap.getString("contentId"), module);
+                        GenericValue dataResourceMap = delegator.findByPrimaryKey("DataResource", UtilMisc.toMap("dataResourceId", contentResourceMap.getString("dataResourceId")));
+                        GenericValue contentMap = delegator.findByPrimaryKey("Content", UtilMisc.toMap("contentId", contentResourceMap.getString("contentId")));
+                        contentMap.removeRelated("WorkEffortContent");
+                        contentMap.removeRelated("ContentRole");
+                        contentMap.remove();
+                        dataResourceMap.removeRelated("DataResourceRole");
+                        dataResourceMap.remove();
+                    }
+                }
+            }
+        } catch (GenericEntityException entityEx) {
+            entityEx.printStackTrace();
+            return ServiceUtil.returnError(entityEx.getMessage());
+        }
+        return result;
+    }
+}

Propchange: ofbiz/trunk/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumServices.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumServices.java
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumServices.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/specialpurpose/scrum/templates/AcceptedBacklogNotification.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/scrum/templates/AcceptedBacklogNotification.ftl?rev=1142915&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/scrum/templates/AcceptedBacklogNotification.ftl (added)
+++ ofbiz/trunk/specialpurpose/scrum/templates/AcceptedBacklogNotification.ftl Tue Jul  5 08:15:32 2011
@@ -0,0 +1,39 @@
+<#--
+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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+        <title>${title}</title>
+    </head>
+    <body>
+        <p>Hello ${person.firstName?if_exists} ${person.lastName?if_exists},</p>
+        <p>Your backlog: <b>${custRequest.description?if_exists} [${custRequest.custRequestId}]
+        <#if informationMap.workEffortId?has_content><br />in sprint: <b>${informationMap.workEffortName?if_exists} [${informationMap.workEffortId?if_exists}]</b></#if>
+        <#if informationMap.productId?has_content><br />of the product: <b>${informationMap.internalName?if_exists} [${informationMap.productId?if_exists}]</b></#if>
+        <#if removedFromSprint = true> has been removed from sprint. <#else> has been received.</#if>
+        <br />
+        <br />
+        <#if custRequest.fromPartyId == partyIdTo>
+        The complete information of this backlog/request can be found <a href="${StringUtil.wrapString(baseSecureUrl?if_exists)}/scrum/control/ViewProdBacklogItem?custRequestId=${custRequest.custRequestId?if_exists}">here.....</a>
+        <br /><br />
+        </#if>
+        Regards.<br /><br />
+        Thank you for your business.
+    </body>
+</html>

Propchange: ofbiz/trunk/specialpurpose/scrum/templates/AcceptedBacklogNotification.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/scrum/templates/AcceptedBacklogNotification.ftl
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/scrum/templates/AcceptedBacklogNotification.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/specialpurpose/scrum/templates/ActiveSprintNotification.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/scrum/templates/ActiveSprintNotification.ftl?rev=1142915&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/scrum/templates/ActiveSprintNotification.ftl (added)
+++ ofbiz/trunk/specialpurpose/scrum/templates/ActiveSprintNotification.ftl Tue Jul  5 08:15:32 2011
@@ -0,0 +1,35 @@
+<#--
+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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+        <title>${title}</title>
+    </head>
+    <body>
+        <p>Hello ${person.firstName?if_exists} ${person.lastName?if_exists},</p>
+        <p>Your Sprint <b>${sprint.workEffortName?if_exists} [${sprint.workEffortId?if_exists}]</b> in project <b>${project.workEffortName?if_exists} [${project.workEffortId?if_exists}]</b>
+            of the product <b>${prodcut.internalName?if_exists} [${prodcut.productId?if_exists}]</b> has been started.
+        <br />
+        <br />
+        The complete information about this sprint can be found <a href="${StringUtil.wrapString(baseSecureUrl?if_exists)}/scrum/control/ViewSprint?sprintId=${sprint.workEffortId?if_exists}">here.....</a>
+        <br /><br />
+        Regards.<br /><br />
+        Thank you for your business.
+    </body>
+</html>

Propchange: ofbiz/trunk/specialpurpose/scrum/templates/ActiveSprintNotification.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/scrum/templates/ActiveSprintNotification.ftl
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/scrum/templates/ActiveSprintNotification.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/specialpurpose/scrum/templates/CancelledBacklogNotification.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/scrum/templates/CancelledBacklogNotification.ftl?rev=1142915&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/scrum/templates/CancelledBacklogNotification.ftl (added)
+++ ofbiz/trunk/specialpurpose/scrum/templates/CancelledBacklogNotification.ftl Tue Jul  5 08:15:32 2011
@@ -0,0 +1,22 @@
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+        <title>${title}</title>
+    </head>
+    <body>
+        <p>Hello ${person.firstName?if_exists} ${person.lastName?if_exists},</p>
+        <p>Your Customer Request <b>${custRequest.custRequestName?if_exists} [${custRequest.custRequestId}] </b> <#if informationMap.workEffortId?has_content>in sprint <b>${informationMap.workEffortName?if_exists} [${informationMap.workEffortId?if_exists}]</b></#if>
+            <#if informationMap.productId?has_content>of the product <b>${informationMap.internalName?if_exists} [${informationMap.productId?if_exists}]</#if></b> has been CANCELLED.
+        <p>Your Reference: ${custRequest.requesterId?if_exists}</p>
+        <p>Reason for Cancellation: ${custRequest.reason?if_exists}</p>
+        <br />
+        <br />
+        <#if custRequest.fromPartyId == partyIdTo>
+        The complete information about this request can be found <a href="${StringUtil.wrapString(baseSecureUrl?if_exists)}/scrum/control/ViewProdBacklogItem?custRequestId=${custRequest.custRequestId?if_exists}">here.....</a>
+        <br /><br />
+        </#if>
+        Regards.<br /><br />
+        Thank you for your business.
+    </body>
+</html>

Propchange: ofbiz/trunk/specialpurpose/scrum/templates/CancelledBacklogNotification.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/scrum/templates/CancelledBacklogNotification.ftl
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/scrum/templates/CancelledBacklogNotification.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/specialpurpose/scrum/templates/ClosedSprintNotification.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/scrum/templates/ClosedSprintNotification.ftl?rev=1142915&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/scrum/templates/ClosedSprintNotification.ftl (added)
+++ ofbiz/trunk/specialpurpose/scrum/templates/ClosedSprintNotification.ftl Tue Jul  5 08:15:32 2011
@@ -0,0 +1,18 @@
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+        <title>${title}</title>
+    </head>
+    <body>
+        <p>Hello ${person.firstName?if_exists} ${person.lastName?if_exists},</p>
+        <p>Your Sprint <b>${sprint.workEffortName?if_exists} [${sprint.workEffortId}]</b> in the project <b>${project.workEffortName?if_exists} [${project.workEffortId?if_exists}]</b>
+            of the product <b>${prodcut.internalName?if_exists} [${prodcut.productId?if_exists}]</b> has been Closed.
+        <br />
+        <br />
+        The complete information about this sprint can be found <a href="${StringUtil.wrapString(baseSecureUrl?if_exists)}/scrum/control/ViewSprint?sprintId=${sprint.workEffortId}">here.....</a>
+        <br /><br />
+        Regards.<br /><br />
+        Thank you for your business.
+    </body>
+</html>
\ No newline at end of file

Propchange: ofbiz/trunk/specialpurpose/scrum/templates/ClosedSprintNotification.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/scrum/templates/ClosedSprintNotification.ftl
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/scrum/templates/ClosedSprintNotification.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain