Thanks Jacopo,

Is it mandatory to create a such service? It was not obvious for me reading the previous commits in the migration page as their were not referring to any services. Then I thought it was a deprecated use.

Jacques

From: <jaco...@apache.org>
Author: jacopoc
Date: Fri Apr  2 08:22:17 2010
New Revision: 930182

URL: http://svn.apache.org/viewvc?rev=930182&view=rev
Log:
Implemented upgrade script for deprecated field Facility.squareFootage

Modified:
   ofbiz/trunk/applications/product/script/org/ofbiz/product/UpgradeServices.xml
   ofbiz/trunk/applications/product/servicedef/services_upgrade.xml

Modified: 
ofbiz/trunk/applications/product/script/org/ofbiz/product/UpgradeServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/UpgradeServices.xml?rev=930182&r1=930181&r2=930182&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/product/script/org/ofbiz/product/UpgradeServices.xml 
(original)
+++ 
ofbiz/trunk/applications/product/script/org/ofbiz/product/UpgradeServices.xml 
Fri Apr  2 08:22:17 2010
@@ -45,4 +45,15 @@ under the License.
        </iterate>
    </simple-method>

+ <simple-method method-name="migrateFacilitySquareFootage" short-description="Migrate Data From from Facility.oldSquareFootage to Facility.facilitySize">
+        <entity-condition entity-name="Facility" list="facilities"/>
+        <iterate list="facilities" entry="facility">
+            <if-not-empty field="facility.oldSquareFootage">
+                <set field="facility.facilitySize" 
from-field="facility.oldSquareFootage"/>
+                <set field="facility.facilitySizeUomId" value="AREA_ft2"/>
+                <store-value value-field="facility"/>
+            </if-not-empty>
+        </iterate>
+    </simple-method>
+
</simple-methods>
\ No newline at end of file

Modified: ofbiz/trunk/applications/product/servicedef/services_upgrade.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_upgrade.xml?rev=930182&r1=930181&r2=930182&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/servicedef/services_upgrade.xml (original)
+++ ofbiz/trunk/applications/product/servicedef/services_upgrade.xml Fri Apr  2 
08:22:17 2010
@@ -34,5 +34,12 @@ under the License.
            party/data/PartyTypeData.xml
        </description>
    </service>
+    <service name="migrateFacilitySquareFootage" engine="simple"
+            location="component://product/script/org/ofbiz/product/UpgradeServices.xml" 
invoke="migrateFacilitySquareFootage">
+        <description>
+            Migrate data from Facility.oldSquareFootage to 
Facility.facilitySize.
+            The field Facility.squareFootageSince has been deprecated since 
revision 929912 (2010-04-01)
+        </description>
+    </service>

</services>
\ No newline at end of file




Reply via email to