[ofbiz-plugins] branch release17.12 updated: Fixed: Error on removing scrum members (OFBIZ-7249)

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

[ofbiz-plugins] branch release17.12 updated: Fixed: Error on removing scrum members (OFBIZ-7249)

akashjain
This is an automated email from the ASF dual-hosted git repository.

akashjain pushed a commit to branch release17.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git


The following commit(s) were added to refs/heads/release17.12 by this push:
     new 39494e6  Fixed: Error on removing scrum members (OFBIZ-7249)
39494e6 is described below

commit 39494e6a5720535328ae1809ec6e7aed0a370e8d
Author: Akash Jain <[hidden email]>
AuthorDate: Tue Sep 1 15:21:14 2020 +0530

    Fixed: Error on removing scrum members (OFBIZ-7249)
   
    Thanks, Anurag Chandak for report.
---
 scrum/groovyScripts/ListScrumResource.groovy |  1 +
 scrum/minilang/ScrumEvents.xml               | 28 ++--------------------------
 2 files changed, 3 insertions(+), 26 deletions(-)

diff --git a/scrum/groovyScripts/ListScrumResource.groovy b/scrum/groovyScripts/ListScrumResource.groovy
index 33d3c1b..99cd5d5 100644
--- a/scrum/groovyScripts/ListScrumResource.groovy
+++ b/scrum/groovyScripts/ListScrumResource.groovy
@@ -31,6 +31,7 @@ inputFields.putAll(parameters)
 performFindInMap.noConditionFind = "Y"
 performFindInMap.inputFields = inputFields
 performFindInMap.orderBy = parameters.sortField
+performFindInMap.filterByDate = "Y"
 if (parameters.sortField) {
     performFindInMap.orderBy = "lastName"
 }
diff --git a/scrum/minilang/ScrumEvents.xml b/scrum/minilang/ScrumEvents.xml
index eb1cedc..e8e8c41 100644
--- a/scrum/minilang/ScrumEvents.xml
+++ b/scrum/minilang/ScrumEvents.xml
@@ -2197,31 +2197,6 @@
     </simple-method>
     
     <simple-method method-name="deleteScrumResource" short-description="remove scrum resource">
-        <entity-one entity-name="UserLogin" value-field="sysUserLogin">
-            <field-map field-name="userLoginId" value="system"/>
-        </entity-one>
-        <if-compare operator="equals" value="SCRUM_PRODUCT_OWNER" field="parameters.groupId">
-            <set field="parameters.roleTypeId" value="PRODUCT_OWNER"/>
-        </if-compare>
-        <if-compare operator="equals" value="SCRUM_MASTER" field="parameters.groupId">
-            <set field="parameters.roleTypeId" value="SCRUM_MASTER"/>
-        </if-compare>
-        <if-compare operator="equals" value="SCRUM_TEAM" field="parameters.groupId">
-            <set field="parameters.roleTypeId" value="SCRUM_TEAM"/>
-        </if-compare>
-        <!-- For special role -->
-        <if-compare operator="equals" value="SCRUM_STAKEHOLDER" field="parameters.groupId">
-            <set field="parameters.roleTypeId" value="STAKEHOLDER"/>
-        </if-compare>
-        <entity-and entity-name="PartyRole" list="partyRoles">
-            <field-map field-name="partyId" from-field="parameters.partyId"/>
-            <field-map field-name="roleTypeId" from-field="parameters.roleTypeId"/>
-        </entity-and>
-        <if-not-empty field="partyRoles">
-            <set-service-fields service-name="deletePartyRole" map="parameters" to-map="deletePartyRoleMap"/>
-            <set field="deletePartyRoleMap.userLogin" from-field="sysUserLogin"/>
-            <call-service service-name="deletePartyRole" in-map-name="deletePartyRoleMap"/>
-        </if-not-empty>
         <now-timestamp field="nowTimestamp" />
         <entity-and entity-name="UserLoginSecurityGroup" list="userLoginSecurityGroups">
             <field-map field-name="userLoginId" from-field="parameters.userLoginId"/>
@@ -2229,7 +2204,8 @@
         </entity-and>
         <if-not-empty field="userLoginSecurityGroups">
             <iterate list="userLoginSecurityGroups" entry="userLoginSecurityGroup">
-                <remove-value value-field="userLoginSecurityGroup"/>
+                <set field="userLoginSecurityGroup.thruDate" from-field="nowTimestamp"/>
+                <store-value value-field="userLoginSecurityGroup"/>
             </iterate>
         </if-not-empty>
     </simple-method>