You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ar...@apache.org on 2017/07/09 06:30:21 UTC
svn commit: r1801349 - in
/ofbiz/ofbiz-framework/trunk/applications/workeffort:
config/WorkEffortUiLabels.xml
minilang/workeffort/WorkEffortSimpleServices.xml servicedef/services.xml
widget/WorkEffortForms.xml
Author: arunpatidar
Date: Sun Jul 9 06:30:21 2017
New Revision: 1801349
URL: http://svn.apache.org/viewvc?rev=1801349&view=rev
Log:
Fixed: Error displayed while adding WorkEffort Contact Mechs.(OFBIZ-9316)
Applied slightly modified patch. Thanks Jagpreet for your contribution.
Modified:
ofbiz/ofbiz-framework/trunk/applications/workeffort/config/WorkEffortUiLabels.xml
ofbiz/ofbiz-framework/trunk/applications/workeffort/minilang/workeffort/WorkEffortSimpleServices.xml
ofbiz/ofbiz-framework/trunk/applications/workeffort/servicedef/services.xml
ofbiz/ofbiz-framework/trunk/applications/workeffort/widget/WorkEffortForms.xml
Modified: ofbiz/ofbiz-framework/trunk/applications/workeffort/config/WorkEffortUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/workeffort/config/WorkEffortUiLabels.xml?rev=1801349&r1=1801348&r2=1801349&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/workeffort/config/WorkEffortUiLabels.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/workeffort/config/WorkEffortUiLabels.xml Sun Jul 9 06:30:21 2017
@@ -5433,4 +5433,7 @@
<property key="WorkEffortRequiredFieldMissingWorkEffortTypeId">
<value xml:lang="en">Required Field Missing : WorkEffort Type Id.</value>
</property>
+ <property key="WorkEffortRequiredFieldMissingContactMechIdOrContactMechTypeId">
+ <value xml:lang="en">Required Field Missing : At least one field is required from Contact Mech Id or Contact Mech Type Id.</value>
+ </property>
</resource>
Modified: ofbiz/ofbiz-framework/trunk/applications/workeffort/minilang/workeffort/WorkEffortSimpleServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/workeffort/minilang/workeffort/WorkEffortSimpleServices.xml?rev=1801349&r1=1801348&r2=1801349&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/workeffort/minilang/workeffort/WorkEffortSimpleServices.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/workeffort/minilang/workeffort/WorkEffortSimpleServices.xml Sun Jul 9 06:30:21 2017
@@ -401,6 +401,13 @@ under the License.
<simple-method method-name="createWorkEffortContactMech" short-description="Create a WorkEffortContactMech">
<make-value value-field="newValue" entity-name="WorkEffortContactMech"/>
<if-empty field="parameters.contactMechId">
+ <if-empty field="parameters.contactMechTypeId">
+ <add-error>
+ <fail-property resource="WorkEffortUiLabels" property="WorkEffortRequiredFieldMissingContactMechIdOrContactMechTypeId"/>
+ </add-error>
+ </if-empty>
+ <check-errors/>
+
<if-not-empty field="parameters.partyId">
<set-service-fields service-name="createPartyContactMech" map="parameters" to-map="context"/>
<call-service service-name="createPartyContactMech" in-map-name="context">
Modified: ofbiz/ofbiz-framework/trunk/applications/workeffort/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/workeffort/servicedef/services.xml?rev=1801349&r1=1801348&r2=1801349&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/workeffort/servicedef/services.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/workeffort/servicedef/services.xml Sun Jul 9 06:30:21 2017
@@ -762,11 +762,7 @@ under the License.
<auto-attributes entity-name="WorkEffortContactMech" mode="IN" include="nonpk" optional="true"/>
<auto-attributes entity-name="PartyContactMech" include="all" mode="IN" optional="true"/>
<attribute name="workEffortId" mode="IN" type="String" optional="false"></attribute>
- <attribute name="contactMechTypeId" mode="IN" type="String" optional="false">
- <type-validate>
- <fail-property resource="WorkEffortUiLabels" property="WorkEffortRequiredFieldMissingContactMechTypeId"/>
- </type-validate>
- </attribute>
+ <attribute name="contactMechTypeId" mode="IN" type="String" optional="true"/>
<attribute name="infoString" mode="IN" type="String" optional="true"></attribute>
<attribute name="contactMechPurposeTypeId" type="String" mode="IN" optional="true"/>
<attribute name="contactMechId" type="String" mode="INOUT" optional="true"/>
Modified: ofbiz/ofbiz-framework/trunk/applications/workeffort/widget/WorkEffortForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/workeffort/widget/WorkEffortForms.xml?rev=1801349&r1=1801348&r2=1801349&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/workeffort/widget/WorkEffortForms.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/workeffort/widget/WorkEffortForms.xml Sun Jul 9 06:30:21 2017
@@ -1186,6 +1186,12 @@ under the License.
header-row-style="header-row" default-table-style="basic-table">
<field name="workEffortId"><hidden value="${parameters.workEffortId}"/></field>
<field name="contactMechId"><lookup target-form-name="LookupContactMech"/></field>
+ <field name="contactMechTypeId" event="onchange" action="javascript:ajaxUpdateAreas('contactMechContainer,ContactMechTypeOnly,contactMechTypeId=' + this.value);">
+ <drop-down>
+ <option key="" description="${uiLabelMap.CommonNone}"/>
+ <entity-options entity-name="ContactMechType" key-field-name="contactMechTypeId"/>
+ </drop-down>
+ </field>
<field name="comments"><text size="50"/></field>
<field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field>
</form>