Skip to content
This repository has been archived by the owner on Jul 25, 2018. It is now read-only.

Commit

Permalink
add clearing state to release details - linked releases page
Browse files Browse the repository at this point in the history
* closes #177
  • Loading branch information
heydenreich committed Sep 29, 2016
1 parent 8d5044e commit 3de54dd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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<Release> searchReleaseByName(String name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@
<table class="table info_table" id="LinkedReleasesInfo" title="Linked Releases Hierarchy">
<thead>
<tr>
<th colspan="5" class="headlabel">Linked Releases Hierarchy</th>
<th colspan="6" class="headlabel">Linked Releases Hierarchy</th>
</tr>
<tr>
<th>Release name</th>
<th>Vendor</th>
<th>Release version</th>
<th>Release relation</th>
<th>License names</th>
<th>Clearing state</th>
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -65,12 +66,15 @@
scopeGroupId="${pageContext.getAttribute('scopeGroupId')}"/>
</core_rt:if>
</td>
<td>
<sw360:DisplayEnum value="${releaseLink.clearingState}"/>
</td>
</tr>
</core_rt:forEach>

<core_rt:if test="${releaseList.size() < 1}">
<tr>
<td colspan="5"> No linked releases</td>
<td colspan="6"> No linked releases</td>
</tr>
</core_rt:if>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ struct ReleaseLink{
20: optional string parentId,
21: optional list<ReleaseLink> subreleases,

31: optional ClearingState clearingState,
100: optional set<string> licenseIds,
101: optional set<string> licenseNames
}
Expand Down

0 comments on commit 3de54dd

Please sign in to comment.