From 3de54dd30f6a567afdc79d38e43ad0283aff9604 Mon Sep 17 00:00:00 2001 From: Birgit Heydenreich Date: Thu, 29 Sep 2016 13:34:56 +0200 Subject: [PATCH] add clearing state to release details - linked releases page * closes #177 --- .../sw360/datahandler/db/ComponentDatabaseHandler.java | 9 ++++----- .../webapp/html/utils/includes/linkedReleaseDetails.jspf | 8 ++++++-- .../lib-datahandler/src/main/thrift/components.thrift | 1 + 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/backend/src-common/src/main/java/com/siemens/sw360/datahandler/db/ComponentDatabaseHandler.java b/backend/src-common/src/main/java/com/siemens/sw360/datahandler/db/ComponentDatabaseHandler.java index b71639a33..1b05f58e4 100644 --- a/backend/src-common/src/main/java/com/siemens/sw360/datahandler/db/ComponentDatabaseHandler.java +++ b/backend/src-common/src/main/java/com/siemens/sw360/datahandler/db/ComponentDatabaseHandler.java @@ -9,7 +9,6 @@ */ package com.siemens.sw360.datahandler.db; -import com.google.common.base.Strings; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.ListMultimap; import com.siemens.sw360.components.summary.SummaryType; @@ -45,9 +44,7 @@ import static com.google.common.base.Strings.isNullOrEmpty; import static com.google.common.collect.Sets.newHashSet; -import static com.siemens.sw360.datahandler.common.CommonUtils.getBestClearingReport; -import static com.siemens.sw360.datahandler.common.CommonUtils.isInProgressOrPending; -import static com.siemens.sw360.datahandler.common.CommonUtils.nullToEmptySet; +import static com.siemens.sw360.datahandler.common.CommonUtils.*; import static com.siemens.sw360.datahandler.common.Duration.durationOf; import static com.siemens.sw360.datahandler.common.SW360Assert.assertNotNull; import static com.siemens.sw360.datahandler.common.SW360Assert.fail; @@ -688,7 +685,9 @@ private ReleaseLink getReleaseLink(Release release) { final Vendor vendor = vendorRepository.get(release.getVendorId()); fullname = vendor != null ? vendor.getFullname() : ""; } - return new ReleaseLink(release.id, fullname, release.name, release.version); + ReleaseLink releaseLink = new ReleaseLink(release.id, fullname, release.name, release.version); + releaseLink.setClearingState(release.getClearingState()); + return releaseLink; } public List searchReleaseByName(String name) { diff --git a/frontend/sw360-portlet/src/main/webapp/html/utils/includes/linkedReleaseDetails.jspf b/frontend/sw360-portlet/src/main/webapp/html/utils/includes/linkedReleaseDetails.jspf index 9a68627de..1289450e9 100644 --- a/frontend/sw360-portlet/src/main/webapp/html/utils/includes/linkedReleaseDetails.jspf +++ b/frontend/sw360-portlet/src/main/webapp/html/utils/includes/linkedReleaseDetails.jspf @@ -24,7 +24,7 @@ - + @@ -32,6 +32,7 @@ + @@ -65,12 +66,15 @@ scopeGroupId="${pageContext.getAttribute('scopeGroupId')}"/> + - + diff --git a/libraries/lib-datahandler/src/main/thrift/components.thrift b/libraries/lib-datahandler/src/main/thrift/components.thrift index c9d71432b..ec9002046 100644 --- a/libraries/lib-datahandler/src/main/thrift/components.thrift +++ b/libraries/lib-datahandler/src/main/thrift/components.thrift @@ -274,6 +274,7 @@ struct ReleaseLink{ 20: optional string parentId, 21: optional list subreleases, + 31: optional ClearingState clearingState, 100: optional set licenseIds, 101: optional set licenseNames }
Linked Releases HierarchyLinked Releases Hierarchy
Release nameRelease version Release relation License namesClearing state
+ +
No linked releases No linked releases