From 589afc753f2cadd9688715b4e5fe54075600060b Mon Sep 17 00:00:00 2001 From: imamSidero Date: Tue, 14 Feb 2023 14:10:25 +0000 Subject: [PATCH] Bug fix for tosca function map values in property assignment page Disabled add/edit/delete operations of property when overall checkbox is checked and fixed for integer key values Issue-ID: SDC-4392 Signed-off-by: Imam hussain Change-Id: I3d299195ecc6215b1b99eb159391cdb79f59cb86 --- .../sdc/be/components/impl/ComponentInstanceBusinessLogic.java | 3 ++- .../properties-table/dynamic-property/dynamic-property.component.html | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java index d87549f4d1..142969aa4a 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java @@ -1986,7 +1986,8 @@ public class ComponentInstanceBusinessLogic extends BaseBusinessLogic { property.setValue(property.getToscaFunction().getValue()); } if (CollectionUtils.isNotEmpty(property.getSubPropertyToscaFunctions())) { - if (StringUtils.isNumeric(property.getSubPropertyToscaFunctions().iterator().next().getSubPropertyPath().get(0))) { + ToscaPropertyType type = ToscaPropertyType.isValidType(property.getType()); + if (type.equals(ToscaPropertyType.LIST)) { final JSONArray jsonArray = property.getValue() == null ? new JSONArray() : new JSONArray(property.getValue()); property.getSubPropertyToscaFunctions().stream().forEach(subToscaFunction -> { addE(jsonArray, subToscaFunction.getSubPropertyPath(), subToscaFunction.getToscaFunction().getValue()); diff --git a/catalog-ui/src/app/ng2/components/logic/properties-table/dynamic-property/dynamic-property.component.html b/catalog-ui/src/app/ng2/components/logic/properties-table/dynamic-property/dynamic-property.component.html index e19986416f..959ed36625 100644 --- a/catalog-ui/src/app/ng2/components/logic/properties-table/dynamic-property/dynamic-property.component.html +++ b/catalog-ui/src/app/ng2/components/logic/properties-table/dynamic-property/dynamic-property.component.html @@ -68,8 +68,8 @@ - Add value to list - Add value to map + Add value to list + Add value to map -- 2.16.6