svn commit: r1709271 - in /ofbiz/trunk/applications/humanres: script/org/ofbiz/humanres/HumanResServices.xml servicedef/services.xml

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

svn commit: r1709271 - in /ofbiz/trunk/applications/humanres: script/org/ofbiz/humanres/HumanResServices.xml servicedef/services.xml

jleroux@apache.org
Author: jleroux
Date: Sun Oct 18 12:26:15 2015
New Revision: 1709271

URL: http://svn.apache.org/viewvc?rev=1709271&view=rev
Log:
Completes r1709192 for Changes for "SalaryStep entity missing From and Thru dates" https://issues.apache.org/jira/browse/OFBIZ-5758

The dateModified field was not modified (not even before auto-engine was used). I found that while changing updateSalaryStep from auto-engine to simple for lastModifiedByUserLogin and setting the createdByUserLogin field in createalaryStep services. It's now fixed
     




Modified:
    ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml
    ofbiz/trunk/applications/humanres/servicedef/services.xml

Modified: ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml?rev=1709271&r1=1709270&r2=1709271&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml (original)
+++ ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml Sun Oct 18 12:26:15 2015
@@ -226,9 +226,19 @@
         <make-value entity-name="SalaryStep" value-field="newEntity"/>
         <set-pk-fields map="parameters" value-field="newEntity"/>
         <set-nonpk-fields map="parameters" value-field="newEntity"/>
+        <set field="newEntity.createdByUserLogin" from-field="parameters.userLogin.userLoginId"/>
         <sequenced-id sequence-name="SalaryStep" field="newEntity.salaryStepSeqId"/>
         <field-to-result field="salaryStepSeqId" result-name="salaryStepSeqId"/>
         <create-value value-field="newEntity"/>
-    </simple-method>    
+    </simple-method>
+    
+    <simple-method method-name="updateSalaryStep" short-description="Update Salary Step">
+        <entity-one entity-name="SalaryStep" value-field="lookedUpValue"/>
+        <set-nonpk-fields value-field="lookedUpValue" map="parameters"/>
+        <set field="lookedUpValue.lastModifiedByUserLogin" from-field="parameters.userLogin.userLoginId"/>
+        <now field="fromDate"/>
+        <set field="lookedUpValue.dateModified" from-field="fromDate"/>
+        <store-value value-field="lookedUpValue"/>
+    </simple-method>
 
 </simple-methods>

Modified: ofbiz/trunk/applications/humanres/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/servicedef/services.xml?rev=1709271&r1=1709270&r2=1709271&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/humanres/servicedef/services.xml Sun Oct 18 12:26:15 2015
@@ -292,7 +292,8 @@ under the License.
         <override type="String" mode="IN" name="salaryStepSeqId" optional="true"/>
     </service>
 
-    <service name="updateSalaryStep" engine="entity-auto" default-entity-name="SalaryStep" invoke="update" auth="true">
+    <service name="updateSalaryStep" engine="simple" default-entity-name="SalaryStep"
+             location="component://humanres/script/org/ofbiz/humanres/HumanResServices.xml" invoke="updateSalaryStep" auth="true">
         <description>Update Salary Step</description>
         <permission-service service-name="humanResManagerPermission" main-action="UPDATE"/>
         <auto-attributes mode="IN" include="pk" optional="false"/>