You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2012/07/13 09:10:55 UTC

svn commit: r1361057 - in /ofbiz/branches/release12.04: ./ applications/humanres/script/org/ofbiz/humanres/HumanResEvents.xml applications/humanres/webapp/humanres/WEB-INF/controller.xml

Author: jleroux
Date: Fri Jul 13 07:10:54 2012
New Revision: 1361057

URL: http://svn.apache.org/viewvc?rev=1361057&view=rev
Log:
"Applied fix from trunk for revision: 1361056" 
------------------------------------------------------------------------
r1361056 | jleroux | 2012-07-13 09:09:43 +0200 (ven., 13 juil. 2012) | 10 lines

A patch from Tom Burns for "HR Public Holiday Accepts Blank in Required Field "https://issues.apache.org/jira/browse/OFBIZ-4965

To Reproduce:
1. Navigate to HR > Global HR Settings > Public Holiday
2. Enter a From Date
3. Click Submit

Expected: Alert like "Required field Holiday Name missing"
Actual: New record created without required Holiday Name

------------------------------------------------------------------------


Modified:
    ofbiz/branches/release12.04/   (props changed)
    ofbiz/branches/release12.04/applications/humanres/script/org/ofbiz/humanres/HumanResEvents.xml
    ofbiz/branches/release12.04/applications/humanres/webapp/humanres/WEB-INF/controller.xml

Propchange: ofbiz/branches/release12.04/
------------------------------------------------------------------------------
  Merged /ofbiz/trunk:r1361056

Modified: ofbiz/branches/release12.04/applications/humanres/script/org/ofbiz/humanres/HumanResEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/humanres/script/org/ofbiz/humanres/HumanResEvents.xml?rev=1361057&r1=1361056&r2=1361057&view=diff
==============================================================================
--- ofbiz/branches/release12.04/applications/humanres/script/org/ofbiz/humanres/HumanResEvents.xml (original)
+++ ofbiz/branches/release12.04/applications/humanres/script/org/ofbiz/humanres/HumanResEvents.xml Fri Jul 13 07:10:54 2012
@@ -55,6 +55,12 @@
     
     <!-- Public Holiday -->
     <simple-method method-name="createPublicHoliday" short-description="Create Public Holiday">
+        <if-empty field="parameters.workEffortName">            
+            <add-error>
+                <fail-message message="The Holiday Name is missing."/>
+            </add-error>
+            <check-errors/>
+        </if-empty>     
         <if-empty field="parameters.estimatedStartDate">
             <add-error>
                 <fail-message message="The FromDate is missing"/>

Modified: ofbiz/branches/release12.04/applications/humanres/webapp/humanres/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/humanres/webapp/humanres/WEB-INF/controller.xml?rev=1361057&r1=1361056&r2=1361057&view=diff
==============================================================================
--- ofbiz/branches/release12.04/applications/humanres/webapp/humanres/WEB-INF/controller.xml (original)
+++ ofbiz/branches/release12.04/applications/humanres/webapp/humanres/WEB-INF/controller.xml Fri Jul 13 07:10:54 2012
@@ -1082,7 +1082,7 @@ under the License.
         <security https="true" auth="true"/>
         <event type="simple" path="component://humanres/script/org/ofbiz/humanres/HumanResEvents.xml" invoke="createPublicHoliday"/>
         <response name="success" type="request-redirect-noparam" value="PublicHoliday"/>
-        <response name="error" type="view-last"/>
+        <response name="error" type="view" value="PublicHoliday"/>
     </request-map>
     <request-map uri="updatePublicHoliday">
         <security https="true" auth="true"/>