This is an automated email from the ASF dual-hosted git repository. jleroux pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push: new 9d44a023bc Remove old unused fields from entity [OFBIZ-12858] (#824) 9d44a023bc is described below commit 9d44a023bc45d4aab3142c931d72c820e9f4ef30 Author: Pushpraj Singh Jadoun <pushprajsinghjad...@outlook.com> AuthorDate: Thu Jul 25 21:44:29 2024 +0530 Remove old unused fields from entity [OFBIZ-12858] (#824) * Removed old unused fields: oldPickStartDate oldMaritalStatus oldSquareFootage oldInvoiceSequenceEnumId oldOrderSequenceEnumId oldQuoteSequenceEnumId from the entity. * Removed UpgradeServices.java and services_upgrade.xml files, and also removed the oldInvoiceSequenceEnumId, oldOrderSequenceEnumId, and oldQuoteSequenceEnumId references from the Groovy script. [OFBIZ-12858] * Removed the oldQuoteSequenceEnumId from QuoteServicesScript.groovy --- .../accounting/servicedef/services_admin.xml | 3 -- .../invoice/InvoiceServicesScript.groovy | 8 ---- applications/accounting/widget/GlSetupForms.xml | 45 ------------------ .../commonext/minilang/setup/SetupEvents.xml | 3 -- applications/datamodel/DATAMODEL_CHANGES.adoc | 8 ++-- .../datamodel/entitydef/accounting-entitymodel.xml | 14 ------ .../datamodel/entitydef/order-entitymodel.xml | 1 - .../datamodel/entitydef/party-entitymodel.xml | 1 - .../datamodel/entitydef/product-entitymodel.xml | 1 - .../ofbiz/order/order/OrderServicesScript.groovy | 2 - .../ofbiz/order/quote/QuoteServicesScript.groovy | 3 -- applications/party/servicedef/services_upgrade.xml | 37 --------------- .../apache/ofbiz/party/party/UpgradeServices.java | 55 ---------------------- applications/product/config/ProductUiLabels.xml | 12 ----- 14 files changed, 4 insertions(+), 189 deletions(-) diff --git a/applications/accounting/servicedef/services_admin.xml b/applications/accounting/servicedef/services_admin.xml index e18ab22bea..369e8f62ff 100644 --- a/applications/accounting/servicedef/services_admin.xml +++ b/applications/accounting/servicedef/services_admin.xml @@ -43,17 +43,14 @@ under the License. <exclude field-name="taxFormId"/> <exclude field-name="cogsMethodId"/> <exclude field-name="baseCurrencyUomId"/> - <exclude field-name="oldInvoiceSequenceEnumId"/> <exclude field-name="invoiceSeqCustMethId"/> <exclude field-name="invoiceIdPrefix"/> <exclude field-name="lastInvoiceNumber"/> <exclude field-name="lastInvoiceRestartDate"/> <exclude field-name="useInvoiceIdForReturns"/> - <exclude field-name="oldQuoteSequenceEnumId"/> <exclude field-name="quoteSeqCustMethId"/> <exclude field-name="quoteIdPrefix"/> <exclude field-name="lastQuoteNumber"/> - <exclude field-name="oldOrderSequenceEnumId"/> <exclude field-name="orderSeqCustMethId"/> <exclude field-name="orderIdPrefix"/> <exclude field-name="lastOrderNumber"/> diff --git a/applications/accounting/src/main/groovy/org/apache/ofbiz/accounting/invoice/InvoiceServicesScript.groovy b/applications/accounting/src/main/groovy/org/apache/ofbiz/accounting/invoice/InvoiceServicesScript.groovy index 47ede9c29b..1b1e8a949d 100644 --- a/applications/accounting/src/main/groovy/org/apache/ofbiz/accounting/invoice/InvoiceServicesScript.groovy +++ b/applications/accounting/src/main/groovy/org/apache/ofbiz/accounting/invoice/InvoiceServicesScript.groovy @@ -50,14 +50,6 @@ Map getNextInvoiceId() { GenericValue customMethod = partyAcctgPreference.getRelatedOne('InvoiceCustomMethod', true) if (customMethod) { customMethodName = customMethod.customMethodName - } else { - //retrieve service from deprecated enumeration see OFBIZ-3765 beware of OFBIZ-3557 - if (partyAcctgPreference.oldInvoiceSequenceEnumId == 'INVSQ_ENF_SEQ') { - customMethodName = 'invoiceSequenceEnforced' - } - if (partyAcctgPreference.oldInvoiceSequenceEnumId == 'INVSQ_RESTARTYR') { - customMethodName = 'invoiceSequenceRestart' - } } } else { logWarning("Acctg preference not defined for partyId [${parameters.partyId}]") diff --git a/applications/accounting/widget/GlSetupForms.xml b/applications/accounting/widget/GlSetupForms.xml index 715a9eb210..b50f8d49ea 100644 --- a/applications/accounting/widget/GlSetupForms.xml +++ b/applications/accounting/widget/GlSetupForms.xml @@ -229,16 +229,6 @@ under the License. (UtilProperties.getMessage('AccountingUiLabels', 'AccountingInheritedValue', locale))}"> <text maxlength="10" size="5"/> </field> - <field name="oldInvoiceSequenceEnumId" use-when="partyAcctgPreference==null" - tooltip="${groovy: import org.apache.ofbiz.base.util.UtilProperties; if(aggregatedPartyAcctgPreference!= null&&aggregatedPartyAcctgPreference.get('oldInvoiceSequenceEnumId')!=null)return - (UtilProperties.getMessage('AccountingUiLabels', 'AccountingInheritedValue', locale))}"> - <drop-down> - <entity-options entity-name="Enumeration" key-field-name="enumId"> - <entity-constraint name="enumTypeId" operator="equals" value="INVOICE_SEQMD"/> - <entity-order-by field-name="description"/> - </entity-options> - </drop-down> - </field> <field name="useInvoiceIdForReturns" use-when="partyAcctgPreference==null" tooltip="${groovy: import org.apache.ofbiz.base.util.UtilProperties; if(aggregatedPartyAcctgPreference!= null&&aggregatedPartyAcctgPreference.get('useInvoiceIdForReturns')!=null)return (UtilProperties.getMessage('AccountingUiLabels', 'AccountingInheritedValue', locale))}"> @@ -251,30 +241,10 @@ under the License. (UtilProperties.getMessage('AccountingUiLabels', 'AccountingInheritedValue', locale))}"> <text maxlength="10" size="5"/> </field> - <field name="oldQuoteSequenceEnumId" use-when="partyAcctgPreference==null" - tooltip="${groovy: import org.apache.ofbiz.base.util.UtilProperties; if(aggregatedPartyAcctgPreference!= null&&aggregatedPartyAcctgPreference.get('oldQuoteSequenceEnumId')!=null)return - (UtilProperties.getMessage('AccountingUiLabels', 'AccountingInheritedValue', locale))}"> - <drop-down> - <entity-options entity-name="Enumeration" key-field-name="enumId"> - <entity-constraint name="enumTypeId" operator="equals" value="QUOTE_SEQMD"/> - <entity-order-by field-name="description"/> - </entity-options> - </drop-down> - </field> <field name="orderIdPrefix" use-when="partyAcctgPreference==null" tooltip="${groovy: import org.apache.ofbiz.base.util.UtilProperties; if(aggregatedPartyAcctgPreference!= null&&aggregatedPartyAcctgPreference.get('orderIdPrefix')!=null)return (UtilProperties.getMessage('AccountingUiLabels', 'AccountingInheritedValue', locale))}"> <text maxlength="10" size="5"/> </field> - <field name="oldOrderSequenceEnumId" use-when="partyAcctgPreference==null" - tooltip="${groovy: import org.apache.ofbiz.base.util.UtilProperties; if(aggregatedPartyAcctgPreference!= null&&aggregatedPartyAcctgPreference.get('oldOrderSequenceEnumId')!=null)return - (UtilProperties.getMessage('AccountingUiLabels', 'AccountingInheritedValue', locale))}"> - <drop-down> - <entity-options entity-name="Enumeration" key-field-name="enumId"> - <entity-constraint name="enumTypeId" operator="equals" value="ORDER_SEQMD"/> - <entity-order-by field-name="description"/> - </entity-options> - </drop-down> - </field> <field name="createButton" use-when="partyAcctgPreference==null" title="${uiLabelMap.CommonAdd}"><submit/></field> <field name="updateButton" use-when="partyAcctgPreference!=null" title="${uiLabelMap.CommonUpdate}"><submit/></field> @@ -309,21 +279,11 @@ under the License. (UtilProperties.getMessage('AccountingUiLabels', 'AccountingInheritedValue', locale))}"> <display/> </field> - <field name="oldInvoiceSequenceEnumId" use-when="partyAcctgPreference!=null" tooltip="${groovy: import org.apache.ofbiz.base.util.UtilProperties; - if(partyAcctgPreference!= null&&partyAcctgPreference.get('oldInvoiceSequenceEnumId')==null&&aggregatedPartyAcctgPreference!= null&&aggregatedPartyAcctgPreference.get('oldInvoiceSequenceEnumId')!=null)return - (UtilProperties.getMessage('AccountingUiLabels', 'AccountingInheritedValue', locale))}"> - <display-entity entity-name="Enumeration" key-field-name="enumId"/> - </field> <field name="useInvoiceIdForReturns" use-when="partyAcctgPreference!=null" tooltip="${groovy: import org.apache.ofbiz.base.util.UtilProperties; if(partyAcctgPreference!= null&&partyAcctgPreference.get('useInvoiceIdForReturns')==null&&aggregatedPartyAcctgPreference!= null&&aggregatedPartyAcctgPreference.get('useInvoiceIdForReturns')!=null)return (UtilProperties.getMessage('AccountingUiLabels', 'AccountingInheritedValue', locale))}"> <display/> </field> - <field name="oldQuoteSequenceEnumId" use-when="partyAcctgPreference!=null" tooltip="${groovy: import org.apache.ofbiz.base.util.UtilProperties; - if(partyAcctgPreference!= null&&partyAcctgPreference.get('oldQuoteSequenceEnumId')==null&&aggregatedPartyAcctgPreference!= null&&aggregatedPartyAcctgPreference.get('oldQuoteSequenceEnumId')!=null)return - (UtilProperties.getMessage('AccountingUiLabels', 'AccountingInheritedValue', locale))}"> - <display-entity entity-name="Enumeration" key-field-name="enumId"/> - </field> <field name="quoteIdPrefix" use-when="partyAcctgPreference!=null" tooltip="${groovy: import org.apache.ofbiz.base.util.UtilProperties; if(partyAcctgPreference!= null&&partyAcctgPreference.get('quoteIdPrefix')==null&&aggregatedPartyAcctgPreference!= null&&aggregatedPartyAcctgPreference.get('quoteIdPrefix')!=null)return (UtilProperties.getMessage('AccountingUiLabels', 'AccountingInheritedValue', locale))}"> @@ -334,11 +294,6 @@ under the License. (UtilProperties.getMessage('AccountingUiLabels', 'AccountingInheritedValue', locale))}"> <display/> </field> - <field name="oldOrderSequenceEnumId" use-when="partyAcctgPreference!=null" tooltip="${groovy: import org.apache.ofbiz.base.util.UtilProperties; - if(partyAcctgPreference!= null&&partyAcctgPreference.get('oldOrderSequenceEnumId')==null&&aggregatedPartyAcctgPreference!= null&&aggregatedPartyAcctgPreference.get('oldOrderSequenceEnumId')!=null)return - (UtilProperties.getMessage('AccountingUiLabels', 'AccountingInheritedValue', locale))}"> - <display-entity entity-name="Enumeration" key-field-name="enumId"/> - </field> <field name="orderIdPrefix" use-when="partyAcctgPreference!=null" tooltip="${groovy: import org.apache.ofbiz.base.util.UtilProperties; if(partyAcctgPreference!= null&&partyAcctgPreference.get('orderIdPrefix')==null&&aggregatedPartyAcctgPreference!= null&&aggregatedPartyAcctgPreference.get('orderIdPrefix')!=null)return (UtilProperties.getMessage('AccountingUiLabels', 'AccountingInheritedValue', locale))}"> diff --git a/applications/commonext/minilang/setup/SetupEvents.xml b/applications/commonext/minilang/setup/SetupEvents.xml index 385a8ca5cc..b8287c2f18 100644 --- a/applications/commonext/minilang/setup/SetupEvents.xml +++ b/applications/commonext/minilang/setup/SetupEvents.xml @@ -300,11 +300,8 @@ <set field="acctgPreferenceCtx.taxFormId" value="US_IRS_1120"/> <set field="acctgPreferenceCtx.cogsMethodId" value="COGS_AVG_COST"/> <set field="acctgPreferenceCtx.baseCurrencyUomId" value="USD"/> - <set field="acctgPreferenceCtx.oldInvoiceSequenceEnumId" value="INVSQ_ENF_SEQ"/> <set field="acctgPreferenceCtx.invoiceIdPrefix" from-field="parameters.invoiceIdPrefix"/> - <set field="acctgPreferenceCtx.oldQuoteSequenceEnumId" value="INVSQ_ENF_SEQ"/> <set field="acctgPreferenceCtx.quoteIdPrefix" value="QU"/> - <set field="acctgPreferenceCtx.oldOrderSequenceEnumId" value="INVSQ_ENF_SEQ"/> <set field="acctgPreferenceCtx.orderIdPrefix" value="OD"/> <call-service service-name="createPartyAcctgPreference" in-map-name="acctgPreferenceCtx"/> </if-empty> diff --git a/applications/datamodel/DATAMODEL_CHANGES.adoc b/applications/datamodel/DATAMODEL_CHANGES.adoc index 0a52e11fab..190df6b2ef 100644 --- a/applications/datamodel/DATAMODEL_CHANGES.adoc +++ b/applications/datamodel/DATAMODEL_CHANGES.adoc @@ -284,7 +284,7 @@ No changes |OrderItemShipGroup |estimatedShipDate |Added |No |NA |OrderItemShipGroup |estimatedDeliveryDate |Added |No |NA |OrderItemShipGrpInvRes |priority |Added |No |NA -|OrderItemShipGrpInvRes |oldPickStartDate |Added |No |NA +|OrderItemShipGrpInvRes |oldPickStartDate |Removed |No |NA |OrderItemTypeAttr |description |Added |No |NA |OrderTermAttribute |attrDescription |Added |No |NA |OrderPaymentPreference |track2 |Added |No |NA @@ -296,9 +296,9 @@ No changes |PartyAcctgPreference |orderSequenceEnumId |Removed |No |NA |PartyAcctgPreference |quoteSequenceEnumId |Removed |No |NA |PartyAcctgPreference |invoiceSequenceEnumId |Removed |No |NA -|PartyAcctgPreference |oldOrderSequenceEnumId |Added |No |NA -|PartyAcctgPreference |oldQuoteSequenceEnumId |Added |No |NA -|PartyAcctgPreference |oldInvoiceSequenceEnumId |Added |No |NA +|PartyAcctgPreference |oldOrderSequenceEnumId |Removed |No |NA +|PartyAcctgPreference |oldQuoteSequenceEnumId |Removed |No |NA +|PartyAcctgPreference |oldInvoiceSequenceEnumId |Removed |No |NA |PartyAcctgPreference |orderSeqCustMethId |Added |No |NA |PartyQual |infoString |Removed |No |NA |PartyQual |institutionInternalId |Removed |No |NA diff --git a/applications/datamodel/entitydef/accounting-entitymodel.xml b/applications/datamodel/entitydef/accounting-entitymodel.xml index 332ddb6f5c..8e5d66623a 100644 --- a/applications/datamodel/entitydef/accounting-entitymodel.xml +++ b/applications/datamodel/entitydef/accounting-entitymodel.xml @@ -2469,10 +2469,6 @@ under the License. </description> </field> <field name="enableAccounting" type="indicator"/> - <!-- Deprecated Field since Release 17.12--> - <field name="oldInvoiceSequenceEnumId" col-name="INVOICE_SEQUENCE_ENUM_ID" type="id"/> - <field name="oldOrderSequenceEnumId" col-name="ORDER_SEQUENCE_ENUM_ID" type="id"/> - <field name="oldQuoteSequenceEnumId" col-name="QUOTE_SEQUENCE_ENUM_ID" type="id"/> <prim-key field="partyId"/> <relation type="one" rel-entity-name="Party" fk-name="ACTG_PREF_PTY"> <key-map field-name="partyId"/> @@ -2501,16 +2497,6 @@ under the License. <relation type="one" fk-name="ACTGPREF_GLJRNL" rel-entity-name="GlJournal"> <key-map field-name="errorGlJournalId" rel-field-name="glJournalId"/> </relation> - <!-- Deprecated relation since Release 17.12--> - <relation type="one" fk-name="ACTGPREF_INVSQ" title="InvoiceSequence" rel-entity-name="Enumeration"> - <key-map field-name="oldInvoiceSequenceEnumId" rel-field-name="enumId"/> - </relation> - <relation type="one" fk-name="ACTGPREF_QTESQ" title="QuoteSequence" rel-entity-name="Enumeration"> - <key-map field-name="oldQuoteSequenceEnumId" rel-field-name="enumId"/> - </relation> - <relation type="one" fk-name="ACTGPREF_ODRSQ" title="OrderSequence" rel-entity-name="Enumeration"> - <key-map field-name="oldOrderSequenceEnumId" rel-field-name="enumId"/> - </relation> </entity> <entity entity-name="PartyPrefDocTypeTpl" package-name="org.apache.ofbiz.accounting.ledger" diff --git a/applications/datamodel/entitydef/order-entitymodel.xml b/applications/datamodel/entitydef/order-entitymodel.xml index 2a4ee7856e..5ea76b1e36 100644 --- a/applications/datamodel/entitydef/order-entitymodel.xml +++ b/applications/datamodel/entitydef/order-entitymodel.xml @@ -1010,7 +1010,6 @@ under the License. <field name="currentPromisedDate" type="date-time"></field> <field name="priority" type="indicator"><description>Sets priority for Inventory Reservation</description></field> <field name="sequenceId" type="numeric"></field> - <field name="oldPickStartDate" col-name="PICK_START_DATE" type="date-time"></field> <!-- this is no longer used and is here for migration or whatever if needed --> <prim-key field="orderId"/> <prim-key field="shipGroupSeqId"/> <prim-key field="orderItemSeqId"/> diff --git a/applications/datamodel/entitydef/party-entitymodel.xml b/applications/datamodel/entitydef/party-entitymodel.xml index 683347e5ea..187062d1ec 100644 --- a/applications/datamodel/entitydef/party-entitymodel.xml +++ b/applications/datamodel/entitydef/party-entitymodel.xml @@ -2818,7 +2818,6 @@ under the License. <field name="height" type="floating-point"></field> <field name="weight" type="floating-point"></field> <field name="mothersMaidenName" type="long-varchar" encrypt="true"></field> - <field name="oldMaritalStatus" type="indicator" col-name="MARITAL_STATUS"><description>Deprecated since branch release: Upcoming branch, use martialStatusEnumId</description></field> <field name="maritalStatusEnumId" type="id"/> <field name="socialSecurityNumber" type="long-varchar" encrypt="true"></field> <field name="passportNumber" type="long-varchar" encrypt="true"></field> diff --git a/applications/datamodel/entitydef/product-entitymodel.xml b/applications/datamodel/entitydef/product-entitymodel.xml index 560d1d45ad..8895cf78aa 100644 --- a/applications/datamodel/entitydef/product-entitymodel.xml +++ b/applications/datamodel/entitydef/product-entitymodel.xml @@ -1001,7 +1001,6 @@ under the License. <field name="defaultInventoryItemTypeId" type="id"></field> <field name="facilityName" type="name"></field> <field name="primaryFacilityGroupId" type="id"></field> - <field name="oldSquareFootage" type="numeric" col-name="SQUARE_FOOTAGE"></field> <field name="facilitySize" type="fixed-point"></field> <field name="facilitySizeUomId" type="id"></field> <field name="productStoreId" type="id"></field> diff --git a/applications/order/src/main/groovy/org/apache/ofbiz/order/order/OrderServicesScript.groovy b/applications/order/src/main/groovy/org/apache/ofbiz/order/order/OrderServicesScript.groovy index 30c0532c81..41764950d6 100644 --- a/applications/order/src/main/groovy/org/apache/ofbiz/order/order/OrderServicesScript.groovy +++ b/applications/order/src/main/groovy/org/apache/ofbiz/order/order/OrderServicesScript.groovy @@ -44,8 +44,6 @@ Map getNextOrderId() { if (customMethod) { customMethodName = customMethod.customMethodName - } else if (partyAcctgPreference && partyAcctgPreference.oldOrderSequenceEnumId == 'ODRSQ_ENF_SEQ') { - customMethodName = 'orderSequence_enforced' } String orderIdTemp diff --git a/applications/order/src/main/groovy/org/apache/ofbiz/order/quote/QuoteServicesScript.groovy b/applications/order/src/main/groovy/org/apache/ofbiz/order/quote/QuoteServicesScript.groovy index 3d17446464..45f2c73f13 100644 --- a/applications/order/src/main/groovy/org/apache/ofbiz/order/quote/QuoteServicesScript.groovy +++ b/applications/order/src/main/groovy/org/apache/ofbiz/order/quote/QuoteServicesScript.groovy @@ -63,9 +63,6 @@ Map getNextQuoteId() { String customMethodName if (customMethod?.customMethodName) { customMethodName = customMethod.customMethodName - } else if (partyAcctgPreference?.oldQuoteSequenceEnumId == 'QTESQ_ENF_SEQ') { - // Retrieve service from deprecated enumeration - customMethodName = 'quoteSequenceEnforced' } String quoteId diff --git a/applications/party/servicedef/services_upgrade.xml b/applications/party/servicedef/services_upgrade.xml deleted file mode 100644 index 6930df0ee7..0000000000 --- a/applications/party/servicedef/services_upgrade.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?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="https://ofbiz.apache.org/dtds/services.xsd"> - <description>Party Component Services</description> - <vendor>OFBiz</vendor> - <version>1.0</version> - - - <service name="migrateMaritalStatusFromIndicatorToEnum" engine="java" - location="org.apache.ofbiz.party.party.UpgradeServices" invoke="migrateMaritalStatusFromIndicatorToEnum"> - <description> - Migrate Person's marital status from indicator to enumeration - Since revision 1858261(27 April 2019) field oldMaritalStatus of Person has been deprecated. - This service can be used to upgrade existing data of oldMaritalStatus field to the new maritalStatusEnumId - field of Person Entity. - </description> - </service> -</services> diff --git a/applications/party/src/main/java/org/apache/ofbiz/party/party/UpgradeServices.java b/applications/party/src/main/java/org/apache/ofbiz/party/party/UpgradeServices.java deleted file mode 100644 index ded56c9731..0000000000 --- a/applications/party/src/main/java/org/apache/ofbiz/party/party/UpgradeServices.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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. - */ - -package org.apache.ofbiz.party.party; - -import org.apache.ofbiz.base.util.Debug; -import org.apache.ofbiz.entity.Delegator; -import org.apache.ofbiz.entity.GenericEntityException; -import org.apache.ofbiz.entity.GenericValue; -import org.apache.ofbiz.entity.condition.EntityCondition; -import org.apache.ofbiz.entity.condition.EntityOperator; -import org.apache.ofbiz.entity.util.EntityQuery; -import org.apache.ofbiz.service.DispatchContext; -import org.apache.ofbiz.service.ServiceUtil; - -import java.util.List; -import java.util.Map; - -public class UpgradeServices { - - private static final String MODULE = UpgradeServices.class.getName(); - - public static Map<String, Object> migrateMaritalStatusFromIndicatorToEnum(DispatchContext dctx, Map<String, Object> context) { - Delegator delegator = dctx.getDelegator(); - try { - List<GenericValue> persons = EntityQuery.use(delegator).from("Person") - .where(EntityCondition.makeCondition("oldMaritalStatus", EntityOperator.NOT_EQUAL, null)).queryList(); - for (GenericValue person : persons) { - person.put("maritalStatusEnumId", "Y".equalsIgnoreCase(person.getString("oldMaritalStatus")) ? "MARRIED" : "SINGLE"); - person.store(); - } - } catch (GenericEntityException e) { - Debug.logError(e, MODULE); - return ServiceUtil.returnError(e.getMessage()); - } - - return ServiceUtil.returnSuccess(); - } -} diff --git a/applications/product/config/ProductUiLabels.xml b/applications/product/config/ProductUiLabels.xml index ae41fb2dce..db050fc23d 100644 --- a/applications/product/config/ProductUiLabels.xml +++ b/applications/product/config/ProductUiLabels.xml @@ -6275,18 +6275,6 @@ <value xml:lang="zh">指定的编号</value> <value xml:lang="zh-TW">指定編號</value> </property> - <property key="FormFieldTitle_oldPickStartDate"> - <value xml:lang="de">Altes Kommissionierungs-Startdatum</value> - <value xml:lang="en">Old Pick Start Date</value> - <value xml:lang="es">Antigua fecha de recogida</value> - <value xml:lang="fr">Ancienne date de départ du prélèvement</value> - <value xml:lang="it">Vecchia Data Inizio Prelievo</value> - <value xml:lang="ja">前回ピッキング開始日</value> - <value xml:lang="th">วันที่เลือกเดิม</value> - <value xml:lang="vi">Ngày bắt đầu Xử lý đặt hàng (Pick) trước đây</value> - <value xml:lang="zh">旧的分拣开始日期</value> - <value xml:lang="zh-TW">舊的揀貨開始日期</value> - </property> <property key="FormFieldTitle_oneInventoryFacility"> <value xml:lang="de">Eine Lagereinrichtung</value> <value xml:lang="en">One Inventory Facility</value>