You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2008/09/23 14:37:07 UTC

svn commit: r698159 - in /ofbiz/trunk/applications/product: ./ config/ entitydef/ script/org/ofbiz/product/ script/org/ofbiz/product/storage/ servicedef/ webapp/facility/WEB-INF/ webapp/facility/facility/ widget/facility/

Author: ashish
Date: Tue Sep 23 05:37:06 2008
New Revision: 698159

URL: http://svn.apache.org/viewvc?rev=698159&view=rev
Log:
Applied patch from Surya Kusumakar from Jira Issue # OFBIZ-1963.
Added support for migrating FacilityRole to FacilityParty.

Thanks Surya Kusumakar for your contribution.
Special thanks to Mr. Pranay Pandey for his support :-).

Added:
    ofbiz/trunk/applications/product/entitydef/entitymodel_old.xml   (with props)
    ofbiz/trunk/applications/product/script/org/ofbiz/product/UpgradeServices.xml   (with props)
    ofbiz/trunk/applications/product/servicedef/services_upgrade.xml   (with props)
Modified:
    ofbiz/trunk/applications/product/config/ProductUiLabels.xml
    ofbiz/trunk/applications/product/entitydef/entitymodel.xml
    ofbiz/trunk/applications/product/ofbiz-component.xml
    ofbiz/trunk/applications/product/script/org/ofbiz/product/storage/StorageServices.xml
    ofbiz/trunk/applications/product/servicedef/services_facility.xml
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml
    ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml
    ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml
    ofbiz/trunk/applications/product/widget/facility/Menus.xml

Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.xml?rev=698159&r1=698158&r2=698159&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/config/ProductUiLabels.xml (original)
+++ ofbiz/trunk/applications/product/config/ProductUiLabels.xml Tue Sep 23 05:37:06 2008
@@ -4285,8 +4285,8 @@
         <value xml:lang="th">แก้ไขที่ตั้งคลังสินค้า</value>
         <value xml:lang="zh">编辑场所位置</value>
     </property>
-    <property key="PageTitleEditFacilityRoles">
-        <value xml:lang="en">Edit Facility Roles for ${facility.facilityName} [${facility.facilityId}]</value>
+    <property key="PageTitleEditFacilityParties">
+        <value xml:lang="en">Edit Facility Parties for ${facility.facilityName} [${facility.facilityId}]</value>
         <value xml:lang="es">Editar Roles de un Almacén</value>
         <value xml:lang="fr">Édition des rôles du lieu de stockage ${facility.facilityName} [${facility.facilityId}]</value>
         <value xml:lang="it">Aggiorna Ruoli Stabilimento</value>
@@ -9377,8 +9377,8 @@
         <value xml:lang="fr">Erreur de sécurité : pour exécuter ${resourceDescription} vous devez avoir le CATALOG_${mainAction} ou le CATALOG_ADMIN ou FACILITY_${mainAction} ou FACILITY_ADMIN permission</value>
         <value xml:lang="th">Security Error : ความปลอดภัยผิดพลาด ! ในการดำเนินการ ${resourceDescription} คุณต้องมี CATALOG_${mainAction} หรือ CATALOG_ADMIN หรือ FACILITY_${mainAction} หนือ FACILITY_ADMIN การอนุญาต</value>
     </property>
-    <property key="ProductFacilityRoleMemberMaintenance">
-        <value xml:lang="en">Facility Role Member Maintenance</value>
+    <property key="ProductFacilityPartyMemberMaintenance">
+        <value xml:lang="en">Facility Party Member Maintenance</value>
         <value xml:lang="es">Mantenimiento de roles de los miembros del Almacén</value>
         <value xml:lang="fr">Gestion des acteurs-rôle de ce lieu de stockage</value>
         <value xml:lang="it">Manutenzione Membri Ruoli Stabilimento</value>

Modified: ofbiz/trunk/applications/product/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitymodel.xml?rev=698159&r1=698158&r2=698159&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/product/entitydef/entitymodel.xml Tue Sep 23 05:37:06 2008
@@ -1138,20 +1138,27 @@
             <key-map field-name="locationTypeEnumId" rel-field-name="enumId"/>
         </relation>
     </entity>
-    <entity entity-name="FacilityRole" package-name="org.ofbiz.product.facility" title="Facility Role Entity">
-        <field name="facilityId" type="id-ne"></field>
+    <entity entity-name="FacilityParty" package-name="org.ofbiz.product.facility" title="Facility Party Entity">
+        <field name="facilityId" type="id"></field>
         <field name="partyId" type="id"></field>
         <field name="roleTypeId" type="id"></field>
+        <field name="fromDate" type="date-time"></field>
+        <field name="thruDate" type="date-time"></field>
         <prim-key field="facilityId"/>
         <prim-key field="partyId"/>
         <prim-key field="roleTypeId"/>
-        <relation type="one" fk-name="FACILITY_RLE_FAC" rel-entity-name="Facility">
+        <prim-key field="fromDate"/>
+        <relation type="one" fk-name="FACILITY_RLE_FACI" rel-entity-name="Facility">
             <key-map field-name="facilityId"/>
         </relation>
-        <relation type="one" fk-name="FACILITY_RLE_PRTY" rel-entity-name="Party">
+        <relation type="one" fk-name="FACILITY_RLE_PRT" rel-entity-name="Party">
             <key-map field-name="partyId"/>
         </relation>
-        <relation type="one" fk-name="FACILITY_RLE_ROLE" rel-entity-name="RoleType">
+        <relation type="one" fk-name="FACILITY_RLE_ROL" rel-entity-name="RoleType">
+            <key-map field-name="roleTypeId"/>
+        </relation>
+        <relation type="one" fk-name="FACILITY_PRTY_ROLE" rel-entity-name="PartyRole">
+            <key-map field-name="partyId"/>
             <key-map field-name="roleTypeId"/>
         </relation>
     </entity>

Added: ofbiz/trunk/applications/product/entitydef/entitymodel_old.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitymodel_old.xml?rev=698159&view=auto
==============================================================================
--- ofbiz/trunk/applications/product/entitydef/entitymodel_old.xml (added)
+++ ofbiz/trunk/applications/product/entitydef/entitymodel_old.xml Tue Sep 23 05:37:06 2008
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+    xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd">
+    <!-- ========================================================= -->
+    <!-- ======================== Defaults ======================= -->
+    <!-- ========================================================= -->
+    <title>Entity of an Open For Business Project Component</title>
+    <description>None</description>
+    <copyright>Copyright 2001-2008 The Apache Software Foundation</copyright>
+    <author>None</author>
+    <version>1.0</version>
+    <!-- ========================================================= -->
+    <!-- ======================== Data Model ===================== -->
+    <!-- The modules in this file are as follows:                  -->
+    <!--  - org.ofbiz.product.facility -->
+    <!-- ========================================================= -->
+
+
+    <!-- ========================================================= -->
+    <!-- org.ofbiz.product.facility -->
+    <!-- ========================================================= -->
+    
+    <entity entity-name="FacilityRole" table-name="FACILITY_ROLE"
+            package-name="org.ofbiz.product.facility"
+            title="Facility Role Entity">
+      <field name="facilityId" type="id-ne"></field>
+      <field name="partyId" type="id-ne"></field>
+      <field name="roleTypeId" type="id-ne"></field>
+      <prim-key field="facilityId"/>
+      <prim-key field="partyId"/>
+      <prim-key field="roleTypeId"/>
+      <relation type="one" fk-name="FACILITY_RLE_FAC" rel-entity-name="Facility">
+        <key-map field-name="facilityId"/>
+      </relation>
+      <relation type="one" fk-name="FACILITY_RLE_PRTY" rel-entity-name="Party">
+        <key-map field-name="partyId"/>
+      </relation>
+      <relation type="one-nofk" fk-name="FACILITY_RLE_ROLE"  rel-entity-name="RoleType">
+        <key-map field-name="roleTypeId"/>
+      </relation>
+    </entity>
+    
+</entitymodel>
\ No newline at end of file

Propchange: ofbiz/trunk/applications/product/entitydef/entitymodel_old.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/product/entitydef/entitymodel_old.xml
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/applications/product/entitydef/entitymodel_old.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: ofbiz/trunk/applications/product/ofbiz-component.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/ofbiz-component.xml?rev=698159&r1=698158&r2=698159&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/ofbiz-component.xml (original)
+++ ofbiz/trunk/applications/product/ofbiz-component.xml Tue Sep 23 05:37:06 2008
@@ -27,6 +27,7 @@
     <classpath type="jar" location="build/lib/*"/>
 
     <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel.xml"/>
+    <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel_old.xml"/>
     <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel_shipment.xml"/>
     <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel_olap.xml"/>
     <entity-resource type="group" reader-name="main" loader="main" location="entitydef/entitygroup_olap.xml"/>
@@ -60,6 +61,7 @@
     <service-resource type="eca" loader="main" location="servicedef/secas.xml"/>
     <service-resource type="eca" loader="main" location="servicedef/secas_shipment.xml"/>
     <service-resource type="eca" loader="main" location="servicedef/secas_olap.xml"/>
+    <service-resource type="model" loader="main" location="servicedef/services_upgrade.xml"/>
 
     <!-- test suite -->
     <test-suite loader="main" location="testdef/FacilityTest.xml"/>

Added: 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=698159&view=auto
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/UpgradeServices.xml (added)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/UpgradeServices.xml Tue Sep 23 05:37:06 2008
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd">
+    
+    <simple-method method-name="migrateFacilityRole" short-description="Migrate Data From FacilityRole To FacilityParty">
+        <entity-condition entity-name="FacilityRole" list-name="facilityRoles"/>
+        <now-timestamp-to-env env-name="fromDate"/>
+        <iterate list-name="facilityRoles" entry-name="facilityRole">
+            <make-value entity-name="FacilityParty" value-name="facilityParty"/>
+            <set field="facilityParty.facilityId" from-field="facilityRole.facilityId"/>
+            <set field="facilityParty.partyId" from-field="facilityRole.partyId"/>
+            <set field="facilityParty.roleTypeId" from-field="facilityRole.roleTypeId"/>
+            <set field="facilityParty.fromDate" from-field="fromDate"/>
+            <entity-one entity-name="PartyRole" value-name="partyRole" auto-field-map="false">
+                <field-map field-name="partyId" env-name="facilityParty.partyId"/>
+                <field-map field-name="roleTypeId" env-name="facilityParty.roleTypeId"/>
+            </entity-one>
+            <if-empty field="partyRole">
+                <make-value entity-name="PartyRole" value-name="partyRole"/>
+                <set field="partyRole.partyId" from-field="facilityParty.partyId"/>
+                <set field="partyRole.roleTypeId" from-field="facilityParty.roleTypeId"/>
+                <create-value value-name="partyRole"/>
+                <check-errors/>
+            </if-empty>
+            <create-value value-name="facilityParty"/>
+        </iterate>
+    </simple-method>
+    
+</simple-methods>
\ No newline at end of file

Propchange: ofbiz/trunk/applications/product/script/org/ofbiz/product/UpgradeServices.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/product/script/org/ofbiz/product/UpgradeServices.xml
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/applications/product/script/org/ofbiz/product/UpgradeServices.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/storage/StorageServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/storage/StorageServices.xml?rev=698159&r1=698158&r2=698159&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/storage/StorageServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/storage/StorageServices.xml Tue Sep 23 05:37:06 2008
@@ -183,26 +183,37 @@
         
     <!-- Facility Role / Facility Group Role Services -->
     <simple-method method-name="addPartyToFacility" short-description="Add Party to Facility">
-        <make-value value-name="newEntity" entity-name="FacilityRole"/>
+        <set from-field="parameters.partyId" field="lookupPKMap.partyId"/>
+        <set from-field="parameters.roleTypeId" field="lookupPKMap.roleTypeId"/>
+        <find-by-primary-key entity-name="PartyRole" map-name="lookupPKMap" value-name="partyRole"/>
+        <if-empty field="partyRole">
+            <make-value value-name="partyRole" entity-name="PartyRole"/>
+            <set-pk-fields map-name="lookupPKMap" value-name="partyRole"/>
+            <create-value value-name="partyRole"/>
+        </if-empty>
+        <make-value value-name="newEntity" entity-name="FacilityParty"/>
         <set-pk-fields map-name="parameters" value-name="newEntity"/>
         <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
-                      
+             <if-empty field="newEntity.fromDate">
+                 <now-timestamp-to-env env-name="newEntity.fromDate"/>
+             </if-empty>             
         <create-value value-name="newEntity"/>
     </simple-method> 
+  
     <simple-method method-name="addPartyToFacilityGroup" short-description="Add Party to FacilityGroup">
         <make-value value-name="newEntity" entity-name="FacilityGroupRole"/>
         <set-pk-fields map-name="parameters" value-name="newEntity"/>
         <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
-                      
         <create-value value-name="newEntity"/>
     </simple-method>         
     
     <simple-method method-name="removePartyFromFacility" short-description="Remove Party From Facility">
-        <make-value value-name="lookupPKMap" entity-name="FacilityRole"/>
-        <set-pk-fields map-name="parameters" value-name="lookupPKMap"/>
-        <find-by-primary-key entity-name="FacilityRole" map-name="lookupPKMap" value-name="lookedUpValue"/>
-        <remove-value value-name="lookedUpValue"/>
+        <entity-one entity-name="FacilityParty" value-name="lookedUpValue"/>
+        <now-timestamp-to-env env-name="thruDate"/>
+        <set field="lookedUpValue.thruDate" from-field="thruDate"/>
+        <store-value value-name="lookedUpValue"/>
     </simple-method>        
+    
     <simple-method method-name="removePartyFromFacilityGroup" short-description="Remove Party From FacilityGroup">
         <make-value value-name="lookupPKMap" entity-name="FacilityGroupRole"/>
         <set-pk-fields map-name="parameters" value-name="lookupPKMap"/>

Modified: ofbiz/trunk/applications/product/servicedef/services_facility.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_facility.xml?rev=698159&r1=698158&r2=698159&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/servicedef/services_facility.xml (original)
+++ ofbiz/trunk/applications/product/servicedef/services_facility.xml Tue Sep 23 05:37:06 2008
@@ -729,13 +729,13 @@
     </service>
 
     <service name="addPartyToFacility" engine="simple"
-                location="org/ofbiz/product/storage/StorageServices.xml" invoke="addPartyToFacility" auth="true">
-        <description>Add Party To Facility</description>
+                location="org/ofbiz/product/storage/StorageServices.xml" invoke="addPartyToFacility" auth="true" default-entity-name="FacilityParty">
+        <description>Create a FacilityParty record</description>
         <permission-service service-name="facilityGenericPermission" main-action="CREATE"/>
-        <attribute name="facilityId" type="String" mode="IN" optional="false"/>
-        <attribute name="partyId" type="String" mode="IN" optional="false"/>
-        <attribute name="roleTypeId" type="String" mode="IN" optional="false"/>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
+        <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
+    
     <service name="addPartyToFacilityGroup" engine="simple"
                 location="org/ofbiz/product/storage/StorageServices.xml" invoke="addPartyToFacilityGroup" auth="true">
         <description>Add Party To FacilityGroup</description>
@@ -746,13 +746,12 @@
     </service>
 
     <service name="removePartyFromFacility" engine="simple"
-                location="org/ofbiz/product/storage/StorageServices.xml" invoke="removePartyFromFacility" auth="true">
+                location="org/ofbiz/product/storage/StorageServices.xml" invoke="removePartyFromFacility" auth="true" default-entity-name="FacilityParty">
         <description>Remove Party From Facility</description>
         <permission-service service-name="facilityGenericPermission" main-action="DELETE"/>
-        <attribute name="facilityId" type="String" mode="IN" optional="false"/>
-        <attribute name="partyId" type="String" mode="IN" optional="false"/>
-        <attribute name="roleTypeId" type="String" mode="IN" optional="false"/>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
+    
     <service name="removePartyFromFacilityGroup" engine="simple"
                 location="org/ofbiz/product/storage/StorageServices.xml" invoke="removePartyFromFacilityGroup" auth="true">
         <description>Remove Party From FacilityGroup</description>

Added: ofbiz/trunk/applications/product/servicedef/services_upgrade.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_upgrade.xml?rev=698159&view=auto
==============================================================================
--- ofbiz/trunk/applications/product/servicedef/services_upgrade.xml (added)
+++ ofbiz/trunk/applications/product/servicedef/services_upgrade.xml Tue Sep 23 05:37:06 2008
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
+    <description>Product Services</description>
+    <vendor>OFBiz</vendor>
+    
+    <service name="migrateFacilityRole" engine="simple"
+            location="org/ofbiz/product/UpgradeServices.xml" invoke="migrateFacilityRole">
+        <description>
+            Migrate data from FacilityRole to FacilityParty.
+            Since revision 696295 (2008-09-17) the entity FacilityRole has been deprecated.
+            This service can be used to upgrade existing data from the FacilityRole entity to the new
+            FacilityParty entity.
+            Before running this service, load the seed data for the RoleType entity from the file:
+            party/data/PartyTypeData.xml
+        </description>
+    </service>
+    
+</services>
\ No newline at end of file

Propchange: ofbiz/trunk/applications/product/servicedef/services_upgrade.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/product/servicedef/services_upgrade.xml
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/applications/product/servicedef/services_upgrade.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml?rev=698159&r1=698158&r2=698159&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml Tue Sep 23 05:37:06 2008
@@ -367,23 +367,23 @@
     </request-map>
 
     <!-- ================ Facility Role Requests ================= -->
-    <request-map uri="EditFacilityRoles">
+    <request-map uri="EditFacilityParties">
         <security https="true" auth="true"/>
-        <response name="success" type="view" value="EditFacilityRoles"/>
+        <response name="success" type="view" value="EditFacilityParties"/>
     </request-map>
     <request-map uri="addPartyToFacility">
         <security https="true" auth="true"/>
         <event type="service" path="" invoke="addPartyToFacility"/>
-        <response name="success" type="view" value="EditFacilityRoles"/>
-        <response name="error" type="view" value="EditFacilityRoles"/>
+        <response name="success" type="view" value="EditFacilityParties"/>
+        <response name="error" type="view" value="EditFacilityParties"/>
     </request-map>
     <request-map uri="removePartyFromFacility">
         <security https="true" auth="true"/>
         <event type="service" path="" invoke="removePartyFromFacility"/>
-        <response name="success" type="view" value="EditFacilityRoles"/>
-        <response name="error" type="view" value="EditFacilityRoles"/>
+        <response name="success" type="view" value="EditFacilityParties"/>
+        <response name="error" type="view" value="EditFacilityParties"/>
     </request-map>
-
+    
     <!-- ================ Inventory Item Labels Requests ================= -->
     <request-map uri="EditInventoryItemLabelTypes">
         <security https="true" auth="true"/>
@@ -1138,7 +1138,7 @@
     <view-map name="ViewFacilityInventoryByProductReport" type="screenfop" page="component://product/widget/facility/FacilityScreens.xml#ViewFacilityInventoryByProductReport" content-type="application/pdf" encoding="none"/>
     <view-map name="ViewFacilityInventoryByProductExport" type="screenxml" page="component://product/widget/facility/FacilityScreens.xml#ViewFacilityInventoryByProductReport" content-type="text/xml"/>
     <view-map name="EditFacilityGroups" type="screen" page="component://product/widget/facility/FacilityScreens.xml#EditFacilityGroups"/>
-    <view-map name="EditFacilityRoles" type="screen" page="component://product/widget/facility/FacilityScreens.xml#EditFacilityRoles"/>
+    <view-map name="EditFacilityParties" type="screen" page="component://product/widget/facility/FacilityScreens.xml#EditFacilityParties"/>
     <view-map name="ViewContactMechs" type="screen" page="component://product/widget/facility/FacilityScreens.xml#ViewContactMechs"/>
     <view-map name="EditContactMech" type="screen" page="component://product/widget/facility/FacilityScreens.xml#EditContactMech"/>
 

Modified: ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml?rev=698159&r1=698158&r2=698159&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml (original)
+++ ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml Tue Sep 23 05:37:06 2008
@@ -521,10 +521,10 @@
         </field>
         <field name="submitButton" title="${uiLabelMap.CommonSubmit}"><submit button-type="button"/></field>
     </form>
-    <!-- FacilityRoles -->
-    <form name="EditFacilityRoles" type="list" paginate-target="EditFacilityRoles" title="" list-name="facilityRoles"
+    
+    <!-- FacilityParty -->
+    <form name="EditFacilityParties" type="list" paginate-target="EditFacilityParties" title="" list-name="facilityParties"
         header-row-style="header-row-2" odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
-        <auto-fields-entity entity-name="FacilityRole" default-field-type="display"/>
         <field name="facilityId"><hidden/></field>
         <field name="partyId">
             <display-entity description="${groupName} ${firstName} ${lastName} [${partyId}]" entity-name="PartyNameView"/>
@@ -532,14 +532,16 @@
         <field name="roleTypeId">
             <display-entity entity-name="RoleType" description="${description}"/>
         </field>
+        <field name="fromDate" title="${uiLabelMap.CommonFromDate}"><date-time/></field>
+        <field name="thruDate" title="${uiLabelMap.CommonThruDate}"><date-time/></field>
         <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext">
-            <hyperlink target="removePartyFromFacility?facilityId=${facilityId}&amp;partyId=${partyId}&amp;roleTypeId=${roleTypeId}"
+            <hyperlink target="removePartyFromFacility?facilityId=${facilityId}&amp;partyId=${partyId}&amp;roleTypeId=${roleTypeId}&amp;fromDate=${fromDate}"
                 description="${uiLabelMap.CommonDelete}" also-hidden="false"/>
         </field>
     </form>
     <form name="AddPartyToFacility" type="single" target="addPartyToFacility" title=""
         header-row-style="header-row" default-table-style="basic-table">
-        <auto-fields-entity entity-name="FacilityRole"/>
+        <auto-fields-entity entity-name="FacilityParty"/>
         <field name="facilityId"><hidden/></field>
         <field name="partyId">
             <lookup target-form-name="LookupPartyName"/>

Modified: ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml?rev=698159&r1=698158&r2=698159&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml Tue Sep 23 05:37:06 2008
@@ -682,18 +682,18 @@
         </section>
     </screen>
 
-    <screen name="EditFacilityRoles">
+    <screen name="EditFacilityParties">
         <section>
             <actions>
-                <set field="tabButtonItem" value="EditFacilityRoles"/>
+                <set field="tabButtonItem" value="EditFacilityParties"/>
                 <set field="facilityId" from-field="parameters.facilityId"/>
                 <set field="partyId" from-field="parameters.partyId"/>
                 <set field="roleTypeId" from-field="parameters.roleTypeId"/>
                 <set field="orderByList[]" value="partyId"/> 
                 <entity-one entity-name="Facility" value-name="facility"/>
-                <get-related value-name="facility" relation-name="FacilityRole" list-name="facilityRoles" order-by-list-name="orderByList"/>
+                <get-related value-name="facility" relation-name="FacilityParty" list-name="facilityParties" order-by-list-name="orderByList"/>
                 <property-map resource="ProductUiLabels" map-name="uiLabelMap"/>
-                <set field="title" value="${uiLabelMap.PageTitleEditFacilityRoles}"/>
+                <set field="title" value="${uiLabelMap.PageTitleEditFacilityParties}"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">
@@ -707,7 +707,7 @@
                         <screenlet id="add-facility-party-role" title="${uiLabelMap.ProductAddFacilityPartyRole}" collapsible="true">
                             <include-form name="AddPartyToFacility" location="component://product/webapp/facility/facility/FacilityForms.xml"/>
                         </screenlet>
-                        <include-form name="EditFacilityRoles" location="component://product/webapp/facility/facility/FacilityForms.xml"/>
+                        <include-form name="EditFacilityParties" location="component://product/webapp/facility/facility/FacilityForms.xml"/>
                     </decorator-section>
                 </decorator-screen>
             </widgets>

Modified: ofbiz/trunk/applications/product/widget/facility/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/Menus.xml?rev=698159&r1=698158&r2=698159&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/facility/Menus.xml (original)
+++ ofbiz/trunk/applications/product/widget/facility/Menus.xml Tue Sep 23 05:37:06 2008
@@ -38,8 +38,8 @@
         <menu-item name="FindFacilityLocation" title="${uiLabelMap.ProductLocations}">
             <link target="FindFacilityLocation?facilityId=${facilityId}"/>
         </menu-item>
-        <menu-item name="EditFacilityRoles" title="${uiLabelMap.PartyRoles}">
-            <link target="EditFacilityRoles?facilityId=${facilityId}"/>
+        <menu-item name="EditFacilityParties" title="${uiLabelMap.PartyRoles}">
+            <link target="EditFacilityParties?facilityId=${facilityId}"/>
         </menu-item>
         <menu-item name="ViewFacilityInventoryByProduct" title="${uiLabelMap.ProductInventory}">
             <link target="ViewFacilityInventoryByProduct?facilityId=${facilityId}"/>



Re: svn commit: r698159 - in /ofbiz/trunk/applications/product: ./ config/ entitydef/ script/org/ofbiz/product/ script/org/ofbiz/product/storage/ servicedef/ webapp/facility/WEB-INF/ webapp/facility/facility/ widget/facility/

Posted by David E Jones <jo...@apache.org>.
The "FacilityRole" entity in the "entitymodel_old.xml" file should be  
renamed "OldFacilityRole", or in other words the "Old" prefix should  
be added so that people don't use it without knowing in the future.

This would need to be changed in the entitymodel_old.xml and in the  
migration service.

-David


On Sep 23, 2008, at 6:37 AM, ashish@apache.org wrote:

> Author: ashish
> Date: Tue Sep 23 05:37:06 2008
> New Revision: 698159
>
> URL: http://svn.apache.org/viewvc?rev=698159&view=rev
> Log:
> Applied patch from Surya Kusumakar from Jira Issue # OFBIZ-1963.
> Added support for migrating FacilityRole to FacilityParty.
>
> Thanks Surya Kusumakar for your contribution.
> Special thanks to Mr. Pranay Pandey for his support :-).
>
> Added:
>    ofbiz/trunk/applications/product/entitydef/entitymodel_old.xml    
> (with props)
>    ofbiz/trunk/applications/product/script/org/ofbiz/product/ 
> UpgradeServices.xml   (with props)
>    ofbiz/trunk/applications/product/servicedef/ 
> services_upgrade.xml   (with props)
> Modified:
>    ofbiz/trunk/applications/product/config/ProductUiLabels.xml
>    ofbiz/trunk/applications/product/entitydef/entitymodel.xml
>    ofbiz/trunk/applications/product/ofbiz-component.xml
>    ofbiz/trunk/applications/product/script/org/ofbiz/product/storage/ 
> StorageServices.xml
>    ofbiz/trunk/applications/product/servicedef/services_facility.xml
>    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/ 
> controller.xml
>    ofbiz/trunk/applications/product/webapp/facility/facility/ 
> FacilityForms.xml
>    ofbiz/trunk/applications/product/widget/facility/ 
> FacilityScreens.xml
>    ofbiz/trunk/applications/product/widget/facility/Menus.xml
>

Re: svn commit: r698159 - in /ofbiz/trunk/applications/product: ./ config/ entitydef/ script/org/ofbiz/product/ script/org/ofbiz/product/storage/ servicedef/ webapp/facility/WEB-INF/ webapp/facility/facility/ widget/facility/

Posted by David E Jones <jo...@apache.org>.
The "FacilityRole" entity in the "entitymodel_old.xml" file should be  
renamed "OldFacilityRole", or in other words the "Old" prefix should  
be added so that people don't use it without knowing in the future.

This would need to be changed in the entitymodel_old.xml and in the  
migration service.

-David


On Sep 23, 2008, at 6:37 AM, ashish@apache.org wrote:

> Author: ashish
> Date: Tue Sep 23 05:37:06 2008
> New Revision: 698159
>
> URL: http://svn.apache.org/viewvc?rev=698159&view=rev
> Log:
> Applied patch from Surya Kusumakar from Jira Issue # OFBIZ-1963.
> Added support for migrating FacilityRole to FacilityParty.
>
> Thanks Surya Kusumakar for your contribution.
> Special thanks to Mr. Pranay Pandey for his support :-).
>
> Added:
>    ofbiz/trunk/applications/product/entitydef/entitymodel_old.xml    
> (with props)
>    ofbiz/trunk/applications/product/script/org/ofbiz/product/ 
> UpgradeServices.xml   (with props)
>    ofbiz/trunk/applications/product/servicedef/ 
> services_upgrade.xml   (with props)
> Modified:
>    ofbiz/trunk/applications/product/config/ProductUiLabels.xml
>    ofbiz/trunk/applications/product/entitydef/entitymodel.xml
>    ofbiz/trunk/applications/product/ofbiz-component.xml
>    ofbiz/trunk/applications/product/script/org/ofbiz/product/storage/ 
> StorageServices.xml
>    ofbiz/trunk/applications/product/servicedef/services_facility.xml
>    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/ 
> controller.xml
>    ofbiz/trunk/applications/product/webapp/facility/facility/ 
> FacilityForms.xml
>    ofbiz/trunk/applications/product/widget/facility/ 
> FacilityScreens.xml
>    ofbiz/trunk/applications/product/widget/facility/Menus.xml
>