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 2020/05/31 06:52:28 UTC
[ofbiz-framework] 16/28: Improved: All the service level error
messages for missing required field for humanares component. (OFBIZ-8716)
Thanks Jagpreet for reporting and Prasheel for providing the initial patch
This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
commit 36b48372ea2d8687a387b7bf143f8e5572e96ac1
Author: Suraj Khurana <su...@apache.org>
AuthorDate: Sat May 23 17:06:18 2020 +0530
Improved: All the service level error messages for missing required field for humanares component.
(OFBIZ-8716)
Thanks Jagpreet for reporting and Prasheel for providing the initial patch
---
.../humanres/config/HumanResErrorUiLabels.xml | 29 +++++++-
applications/humanres/servicedef/services.xml | 78 ++++++++++++++++++----
2 files changed, 93 insertions(+), 14 deletions(-)
diff --git a/applications/humanres/config/HumanResErrorUiLabels.xml b/applications/humanres/config/HumanResErrorUiLabels.xml
index 4eda749..f521936 100644
--- a/applications/humanres/config/HumanResErrorUiLabels.xml
+++ b/applications/humanres/config/HumanResErrorUiLabels.xml
@@ -21,7 +21,34 @@
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
<property key="HumanResRequiredFieldMissingTrainingClassTypeId">
- <value xml:lang="de">benötigter Eintrag fehlt: Weiterbildungsklasse Typ ID.</value>
+ <value xml:lang="de">benötigter Eintrag fehlt: Weiterbildungsklasse Typ ID.</value>
+ <value xml:lang="en">Required Field Missing : Training Class Type Id.</value>
+ </property>
+ <property key="HRRequiredFieldMissingDescription">
+ <value xml:lang="en">Required Field Missing : Description.</value>
+ </property>
+ <property key="HRRequiredFieldMissingEmployeePartyId">
+ <value xml:lang="en">Required Field Missing : Employee Party Id.</value>
+ </property>
+ <property key="HRRequiredFieldMissingEmployeeRoleTypeId">
+ <value xml:lang="en">Required Field Missing : Employee Role Type Id.</value>
+ </property>
+ <property key="HRRequiredFieldMissingPartyId">
+ <value xml:lang="en">Required Field Missing : Party Id.</value>
+ </property>
+ <property key="HRRequiredFieldMissingPartyQualTypeId">
+ <value xml:lang="en">Required Field Missing : Party Qual Type Id.</value>
+ </property>
+ <property key="HRRequiredFieldMissingPeriodTypeId">
+ <value xml:lang="en">Required Field Missing : Period Type Id.</value>
+ </property>
+ <property key="HRRequiredFieldMissingPostalAddContactMechPurpTypeId">
+ <value xml:lang="en">Required Field Missing : Postal Address Contact Mech Purpose.</value>
+ </property>
+ <property key="HRRequiredFieldMissingPrefReviewID">
+ <value xml:lang="en">Required Field Missing : Pref Review Id.</value>
+ </property>
+ <property key="HRRequiredFieldMissingTrainingClassTypeId">
<value xml:lang="en">Required Field Missing : Training Class Type Id.</value>
</property>
</resource>
\ No newline at end of file
diff --git a/applications/humanres/servicedef/services.xml b/applications/humanres/servicedef/services.xml
index d47bc17..e5340ad 100644
--- a/applications/humanres/servicedef/services.xml
+++ b/applications/humanres/servicedef/services.xml
@@ -28,8 +28,16 @@ under the License.
<description>Create a Party Qualification entry</description>
<permission-service service-name="humanResManagerPermission" main-action="CREATE"/>
<auto-attributes mode="IN" include="nonpk" optional="true"/>
- <attribute name="partyId" mode="IN" type="String"/>
- <attribute name="partyQualTypeId" mode="IN" type="String"/>
+ <attribute name="partyId" mode="IN" type="String">
+ <type-validate>
+ <fail-property property="HRRequiredFieldMissingPartyId" resource="HumanResErrorUiLabels"/>
+ </type-validate>
+ </attribute>
+ <attribute name="partyQualTypeId" mode="IN" type="String">
+ <type-validate>
+ <fail-property property="HRRequiredFieldMissingPartyQualTypeId" resource="HumanResErrorUiLabels"/>
+ </type-validate>
+ </attribute>
<attribute name="fromDate" mode="INOUT" type="Timestamp" optional="true"/>
</service>
@@ -91,9 +99,21 @@ under the License.
<permission-service service-name="humanResManagerPermission" main-action="CREATE"/>
<auto-attributes mode="IN" include="nonpk" optional="true"/>
<attribute mode="IN" type="String" name="perfReviewId" optional="true"/>
- <attribute mode="OUT" type="String" name="perfReviewId" optional="false"/>
- <attribute mode="INOUT" type="String" name="employeePartyId" optional="false"/>
- <attribute mode="INOUT" type="String" name="employeeRoleTypeId" optional="false"/>
+ <attribute mode="OUT" type="String" name="perfReviewId" optional="false">
+ <type-validate>
+ <fail-property property="NoPrefReviewId" resource="HumanResErrorUiLabels"/>
+ </type-validate>
+ </attribute>
+ <attribute mode="INOUT" type="String" name="employeePartyId" optional="false">
+ <type-validate>
+ <fail-property property="HRRequiredFieldMissingEmployeePartyId" resource="HumanResErrorUiLabels"/>
+ </type-validate>
+ </attribute>
+ <attribute mode="INOUT" type="String" name="employeeRoleTypeId" optional="false">
+ <type-validate>
+ <fail-property property="HRRequiredFieldMissingEmployeeRoleTypeId" resource="HumanResErrorUiLabels"/>
+ </type-validate>
+ </attribute>
</service>
<service name="updatePerfReview" engine="entity-auto" default-entity-name="PerfReview" invoke="update" auth="true">
@@ -113,9 +133,21 @@ under the License.
<description>Create Performance Review Item</description>
<permission-service service-name="humanResManagerPermission" main-action="CREATE"/>
<auto-attributes mode="IN" include="nonpk" optional="true"/>
- <attribute mode="IN" type="String" name="employeePartyId" optional="false"/>
- <attribute mode="IN" type="String" name="employeeRoleTypeId" optional="false"/>
- <attribute mode="IN" type="String" name="perfReviewId" optional="false"/>
+ <attribute mode="IN" type="String" name="employeePartyId" optional="false">
+ <type-validate>
+ <fail-property property="HRRequiredFieldMissingEmployeePartyId" resource="HumanResErrorUiLabels"/>
+ </type-validate>
+ </attribute>
+ <attribute mode="IN" type="String" name="employeeRoleTypeId" optional="false">
+ <type-validate>
+ <fail-property property="HRRequiredFieldMissingEmployeeRoleTypeId" resource="HumanResErrorUiLabels"/>
+ </type-validate>
+ </attribute>
+ <attribute mode="IN" type="String" name="perfReviewId" optional="false">
+ <type-validate>
+ <fail-property property="HRRequiredFieldMissingPrefReviewID" resource="HumanResErrorUiLabels"/>
+ </type-validate>
+ </attribute>
<attribute mode="OUT" type="String" name="perfReviewItemSeqId" optional="false"/>
</service>
@@ -501,7 +533,11 @@ under the License.
</auto-attributes>
<attribute name="emailAddress" type="String" mode="IN" optional="true"/>
<attribute name="fromDate" type="String" mode="IN" optional="true"/>
- <attribute name="postalAddContactMechPurpTypeId" type="String" mode="IN" optional="false"/>
+ <attribute name="postalAddContactMechPurpTypeId" type="String" mode="IN" optional="false">
+ <type-validate>
+ <fail-property property="HRRequiredFieldMissingPostalAddContactMechPurpTypeId" resource="HumanResErrorUiLabels"/>
+ </type-validate>
+ </attribute>
<attribute name="partyId" type="String" mode="OUT"/>
</service>
@@ -575,7 +611,11 @@ under the License.
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<attribute name="rateAmount" type="BigDecimal" mode="IN" optional="true"/>
<attribute name="rateCurrencyUomId" type="String" mode="IN" optional="true"/>
- <attribute name="periodTypeId" type="String" mode="IN"/>
+ <attribute name="periodTypeId" type="String" mode="IN">
+ <type-validate>
+ <fail-property property="HRRequiredFieldMissingPeriodTypeId" resource="HumanResErrorUiLabels"/>
+ </type-validate>
+ </attribute>
<override name="fromDate" optional="true"/>
</service>
@@ -655,7 +695,11 @@ under the License.
location="component://humanres/minilang/HumanResServices.xml" invoke="getCurrentPartyEmploymentData" auth="true">
<description>Delete Valid LeaveType</description>
<permission-service service-name="humanResManagerPermission" main-action="VIEW"/>
- <attribute name="partyId" type="String" mode="IN"/>
+ <attribute name="partyId" type="String" mode="IN">
+ <type-validate>
+ <fail-property property="HRRequiredFieldMissingPartyId" resource="HumanResErrorUiLabels"/>
+ </type-validate>
+ </attribute>
<attribute name="partyBenefitTypes" type="java.util.List" mode="OUT" optional="true"/>
<attribute name="employment" type="org.apache.ofbiz.entity.GenericValue" mode="OUT" optional="true"/>
<attribute name="emplPosition" type="org.apache.ofbiz.entity.GenericValue" mode="OUT" optional="true"/>
@@ -812,9 +856,17 @@ under the License.
<service name="createTrainingTypes" engine="entity-auto" default-entity-name="TrainingClassType" invoke="create" auth="true">
<description>Create a New Training type</description>
<permission-service service-name="humanResManagerPermission" main-action="CREATE"/>
- <attribute name="trainingClassTypeId" mode="IN" type="String" optional="false"/>
+ <attribute name="trainingClassTypeId" mode="IN" type="String" optional="false">
+ <type-validate>
+ <fail-property property="HRRequiredFieldMissingTrainingClassTypeId" resource="HumanResErrorUiLabels"/>
+ </type-validate>
+ </attribute>
<attribute name="parentTypeId" mode="IN" type="String" optional="true"/>
- <attribute name="description" mode="IN" type="String" optional="false"/>
+ <attribute name="description" mode="IN" type="String" optional="false">
+ <type-validate>
+ <fail-property property="HRRequiredFieldMissingDescription" resource="HumanResErrorUiLabels"/>
+ </type-validate>
+ </attribute>
</service>
<service name="updateTrainingTypes" engine="entity-auto" default-entity-name="TrainingClassType" invoke="update" auth="true">