Fix incorrect vsp version id in upgrade 97/125797/2
authorandre.schmid <andre.schmid@est.tech>
Fri, 19 Nov 2021 12:58:28 +0000 (12:58 +0000)
committerMichael Morris <michael.morris@est.tech>
Thu, 25 Nov 2021 09:50:14 +0000 (09:50 +0000)
During the upgrade of a VF through a VSP, the VSP version id passed to
the backend is always the current VF version id, not the one to
upgrade.
Even passing the correct VSP version id, the backend was not
persisting the latest version id in the metadata, keeping always the
previous one.

Change-Id: Ife2b92789d47a63ba5358c6ed8db8279db94ed46
Issue-ID: SDC-3790
Signed-off-by: andre.schmid <andre.schmid@est.tech>
Signed-off-by: krupa.nagabhushan <krupa.nagabhushan@est.tech>
catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java
catalog-ui/src/app/utils/component-factory.ts

index f7beca6..6665299 100644 (file)
@@ -3640,9 +3640,6 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
             if (oldResource.getCsarUUID() != null) {
                 newResource.setCsarUUID(oldResource.getCsarUUID());
             }
-            if (oldResource.getCsarVersionId() != null) {
-                newResource.setCsarVersionId(oldResource.getCsarVersionId());
-            }
             if (oldResource.getImportedToscaChecksum() != null) {
                 newResource.setImportedToscaChecksum(oldResource.getImportedToscaChecksum());
             }
index 2ff2af9..f2128cb 100644 (file)
@@ -84,6 +84,7 @@ export class ComponentFactory {
           oldComponent.csarUUID = csarComponent.csarUUID;
           oldComponent.csarPackageType = csarComponent.csarPackageType;
           oldComponent.csarVersion = csarComponent.csarVersion;
+          oldComponent.csarVersionId = csarComponent.csarVersionId;
           oldComponent.packageId = csarComponent.packageId;
           oldComponent.description = csarComponent.description;
           oldComponent.filterTerm = oldComponent.name +  ' '  + oldComponent.description + ' ' + oldComponent.vendorName + ' ' + oldComponent.csarVersion;