Skip to content

Commit

Permalink
fix(UI): code modification for do not copy component ids
Browse files Browse the repository at this point in the history
Signed-off-by: Nikesh kumar <kumar.nikesh@simens.com>
  • Loading branch information
Nikesh kumar committed Sep 5, 2022
1 parent 5f5b712 commit 628fe6d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@

import java.util.*;
import java.util.Map.Entry;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Function;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -84,7 +85,7 @@ public class PortletUtils {
CommonUtils.loadProperties(PortletUtils.class, PROPERTIES_FILE_PATH);
Properties props = CommonUtils.loadProperties(PortletUtils.class, PROPERTIES_FILE_PATH);

EXTERNALID_BLOCKLIST_CLONING_RELEASE = props.getProperty("externalId.remove.while.cloning.release", "");
EXTERNALID_BLOCKLIST_CLONING_RELEASE = props.getProperty("release.externalId.to.be.removed.while.cloning", "");
}


Expand Down Expand Up @@ -300,7 +301,8 @@ public static Set<Attachment> updateAttachmentsFromRequest(PortletRequest reques
public static Release cloneRelease(String emailFromRequest, Release release) {

Release newRelease = release.deepCopy();
final Map<String, String> extIdHmap = release.getExternalIds();
Map<String, String> extIdHmap = new ConcurrentHashMap<String, String>();
extIdHmap = release.getExternalIds();
for (Entry<String, String> names : extIdHmap.entrySet()) {
if (names.getKey() != null && names.getKey().equals(EXTERNALID_BLOCKLIST_CLONING_RELEASE)) {
extIdHmap.remove(names.getKey());
Expand Down
2 changes: 1 addition & 1 deletion frontend/sw360-portlet/src/main/resources/sw360.properties
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
#key.auth.givenname=GIVENNAME
#key.auth.surname=SURNAME
#key.auth.department=DEPARTMENT
externalId.remove.while.cloning.release=com.siemens.svm.component.id
release.externalId.to.be.removed.while.cloning=

## OrganizationHelper
#match.prefix=false
Expand Down

0 comments on commit 628fe6d

Please sign in to comment.