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 2010/12/16 23:12:38 UTC

svn commit: r1050190 - in /ofbiz/trunk/applications/product: script/org/ofbiz/product/feature/ProductFeatureServices.xml servicedef/services_feature.xml

Author: jleroux
Date: Thu Dec 16 22:12:37 2010
New Revision: 1050190

URL: http://svn.apache.org/viewvc?rev=1050190&view=rev
Log:
A patch from Sascha Rodekamp "Get new sequence number for product feature type if empty" (https://issues.apache.org/jira/browse/OFBIZ-4063) - OFBIZ-4063

When creating a new product feature type with no id entered the service will create a feature type id automatically.
This improves the usability because the user does not have the responsibility to choose valid/unique feature type id.

Modified:
    ofbiz/trunk/applications/product/script/org/ofbiz/product/feature/ProductFeatureServices.xml
    ofbiz/trunk/applications/product/servicedef/services_feature.xml

Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/feature/ProductFeatureServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/feature/ProductFeatureServices.xml?rev=1050190&r1=1050189&r2=1050190&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/feature/ProductFeatureServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/feature/ProductFeatureServices.xml Thu Dec 16 22:12:37 2010
@@ -282,6 +282,16 @@ under the License.
 
         <if>
             <condition>
+                <if-empty field="parameters.productFeatureTypeId" />
+            </condition>
+            <then>
+                <sequenced-id sequence-name="ProductFeatureType" field="parameters.productFeatureTypeId"/>
+            </then>
+        </if>
+        <check-errors/>
+
+        <if>
+            <condition>
                 <not>
                     <if-regexp field="parameters.productFeatureTypeId" expr="^[a-zA-Z_0-9]+$"></if-regexp>
                 </not>

Modified: ofbiz/trunk/applications/product/servicedef/services_feature.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_feature.xml?rev=1050190&r1=1050189&r2=1050190&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/servicedef/services_feature.xml (original)
+++ ofbiz/trunk/applications/product/servicedef/services_feature.xml Thu Dec 16 22:12:37 2010
@@ -214,6 +214,7 @@ under the License.
         <description>Create a ProductFeatureType</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
+        <override name="productFeatureTypeId" mode="IN" optional="true" />
     </service>
     <service name="updateProductFeatureType" default-entity-name="ProductFeatureType" engine="simple"
                 location="component://product/script/org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="updateProductFeatureType" auth="true">