Skip to content

Commit

Permalink
Merge pull request #253 from eclipse/maierthomas/#130/export-project-…
Browse files Browse the repository at this point in the history
…mainline

feat(release): Add project mainline state to export spreadsheet (clearing status)

reviewed-by: [email protected]
tested-by: [email protected]
  • Loading branch information
maierthomas authored May 3, 2018
2 parents c2929bd + 5581b19 commit b2de39c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright Siemens AG, 2013-2017. Part of the SW360 Portal Project.
* Copyright Siemens AG, 2013-2018. Part of the SW360 Portal Project.
*
* SPDX-License-Identifier: EPL-1.0
*
Expand Down Expand Up @@ -91,6 +91,7 @@ private static List<String> makeHeaders() {
private static List<String> makeHeadersForExtendedExport() {
List<String> additionalHeaders = new ArrayList<>();
additionalHeaders.add(displayNameFor("project origin", nameToDisplayName));
additionalHeaders.add(displayNameFor("project mainline state", nameToDisplayName));

List<String> completeHeaders = new ArrayList<>();
completeHeaders.addAll(makeHeaders());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright Siemens AG, 2013-2017. Part of the SW360 Portal Project.
* Copyright Siemens AG, 2013-2018. Part of the SW360 Portal Project.
*
* SPDX-License-Identifier: EPL-1.0
*
Expand Down Expand Up @@ -135,15 +135,20 @@ private void addFieldValueToRow(List<String> row, Release._Fields field, Release
row.add(ThriftEnumUtils.enumToString(component.getComponentType()));
}

// and project origin only if wanted
// project origin and project mainline state only if wanted
if (addAdditionalData()) {
if (releaseClearingStatusDataByRelease.containsKey(release)) {
row.add(releaseClearingStatusDataByRelease.get(release).getProjectNames());
ReleaseClearingStatusData releaseClearingData = releaseClearingStatusDataByRelease.get(release);
row.add(releaseClearingData.getProjectNames());
row.add(releaseClearingData.getMainlineStates());
} else {
row.add("");
row.add("");
}
}

break;

case VENDOR:
addVendorToRow(release.getVendor(), row);
break;
Expand Down

0 comments on commit b2de39c

Please sign in to comment.