Fineract-1043 Removed street field from address
This commit is contained in:
committed by
Michael Vorburger ⛑️
parent
6e279619a5
commit
9c3f1addd7
+1
-16
@@ -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<String> 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) {
|
||||
|
||||
-7
@@ -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;
|
||||
|
||||
+20
@@ -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';
|
||||
Reference in New Issue
Block a user