diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/serialization/AddressCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/serialization/AddressCommandFromApiJsonDeserializer.java index 2adbaa74e..4d5e12780 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/serialization/AddressCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/serialization/AddressCommandFromApiJsonDeserializer.java @@ -96,7 +96,6 @@ public class AddressCommandFromApiJsonDeserializer { enabledFieldList.add("locale"); enabledFieldList.add("dateFormat"); supportedParameters = new HashSet<>(enabledFieldList); - // enabledFieldList.add("address"); madatoryFieldsMap.put("addressTypeId", true); @@ -108,23 +107,9 @@ public class AddressCommandFromApiJsonDeserializer { madatoryFieldsMap.put("addressId", true); supportedParameters = new HashSet<>(enabledFieldList); } - // final Set supportedParameters = new - // HashSet<>(enabledFieldList); + this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, supportedParameters); - final String street = this.fromApiJsonHelper.extractStringNamed("street", element); - - if (enabledFieldsMap.get("street")) { - if (madatoryFieldsMap.get("street") && fromNewClient) { - - baseDataValidator.reset().parameter("street").value(street).notBlank(); - - } - if (!regexFieldsMap.get("street").isEmpty()) { - baseDataValidator.reset().parameter("street").value(street).matchesRegularExpression(regexFieldsMap.get("street")); - } - - } final String addressLine1 = this.fromApiJsonHelper.extractStringNamed("addressLine1", element); if (enabledFieldsMap.get("addressLine1")) { if (madatoryFieldsMap.get("addressLine1") && fromNewClient) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/AddressWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/AddressWritePlatformServiceImpl.java index a523aaf74..153c60f94 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/AddressWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/AddressWritePlatformServiceImpl.java @@ -185,13 +185,6 @@ public class AddressWritePlatformServiceImpl implements AddressWritePlatformServ final Address addobj = this.addressRepository.getOne(addressId); - if (!command.stringValueOfParameterNamed("street").isEmpty()) { - - is_address_update = true; - final String street = command.stringValueOfParameterNamed("street"); - addobj.setStreet(street); - } - if (!command.stringValueOfParameterNamed("addressLine1").isEmpty()) { is_address_update = true; diff --git a/fineract-provider/src/main/resources/sql/migrations/core_db/V359__remove_fied_from_address.sql b/fineract-provider/src/main/resources/sql/migrations/core_db/V359__remove_fied_from_address.sql new file mode 100644 index 000000000..60836047f --- /dev/null +++ b/fineract-provider/src/main/resources/sql/migrations/core_db/V359__remove_fied_from_address.sql @@ -0,0 +1,20 @@ +-- +-- 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. +-- + +DELETE FROM `m_field_configuration` WHERE field = 'street';