-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(licenseinfo): Reporting Improvements Part 2 #433 #433
chore(licenseinfo): Reporting Improvements Part 2 #433 #433
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to store only the compId in LicenseInfoParsingResult
and get all relevant information/data like swplatform, language... in the docxGernator
instead of saving these data directly to the LicenseInfoParisingResult
?
backend/src/src-licenseinfo/src/main/java/org/eclipse/sw360/licenseinfo/LicenseInfoHandler.java
Outdated
Show resolved
Hide resolved
backend/src/src-licenseinfo/src/main/java/org/eclipse/sw360/licenseinfo/LicenseInfoHandler.java
Outdated
Show resolved
Hide resolved
@@ -70,6 +70,10 @@ struct LicenseInfoParsingResult { | |||
31: optional string name, | |||
32: optional string version, | |||
33: optional string componentType, | |||
|
|||
42: optional set<string> componentLanguages, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe the point here, agreeing with @maierthomas is that we have this not as part of the backend service API for the license info service - it appears rather as information that is processed internally to generate the document. Thus I also propose to pull this off from the API of the license inform service.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dreh23 please have a look
057a07f
to
de7de6f
Compare
tested, works, but is conflicting |
770609e
to
de7de6f
Compare
@dreh23 I wondered in testing where is the setting for platform in the UI - was not able to test it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dreh23 seems to be conflicting, maybe because of the merge of the previous pull request PR#438 |
@dreh23 please try to resolve the conflicts |
@dreh23 signed commit? |
b198376
to
169463d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested and looks OK
@@ -70,6 +70,10 @@ struct LicenseInfoParsingResult { | |||
31: optional string name, | |||
32: optional string version, | |||
33: optional string componentType, | |||
|
|||
42: optional set<string> componentLanguages, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dreh23 please have a look
@@ -151,6 +157,8 @@ private void fillReportDocument( | |||
String projectDescription = project.getDescription(); | |||
|
|||
fillOverview3rdPartyComponentTable(document, projectLicenseInfoResults); | |||
fillDevelopmentDetailsTable(document, project, user); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this table is placed before the 3rd party table in the document then I think it would be nice to see this in the structure of the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
row.addNewTableCell().setText(langs); | ||
LOGGER.info(String.format("langs: %s", langs)); | ||
|
||
String platforms = component.getSoftwarePlatforms().isEmpty() ? "Unknown platforms" : String.join(" ", component.getSoftwarePlatforms()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least with my data, getSoftwarePlatforms() has been NULL, so I could not generate the file because of a NPE. So maybe all these isEmpty() checks should have a null check first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though I could not reproduce this I see the chance to hit a null reference due to Thirft. I added a check before accessing it.
@@ -169,10 +177,14 @@ private void fillReportDocument( | |||
|
|||
fillSpecialOSSRisksTable(document, project, obligationResults); | |||
|
|||
fillReleaseBulletList(document, projectLicenseInfoResults); | |||
fillReleaseDetailList(document, projectLicenseInfoResults, includeObligations); | |||
fillAdditionalRequirementsTable(document, obligationResults); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know, there order was also not correct before your change, but maybe you could clean this up a bit? Maybe not only the order of the method calls but also the order of the methods in the class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually those where not even supposed to be called here. Removed.
row.addNewTableCell().setText(key.topic); | ||
row.addNewTableCell().setText(licensesString); | ||
row.addNewTableCell().setText(key.text); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no clue about the meanings of the different sections, but would some divider be of help here because the release bullet list just comes next?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above
@imaykay There are tickets https://github.com/siemens/sw360/projects/1 and there is a reference documentation that was provided which describes some aspects of the features. If @mcjaeger agrees I can share this doc with you. On a side note I am not any more involved in the development of sw360. Please contact @hemarkus for any further questions. |
Code looks better now, but the latest changes do change a few things in the generated document. So maybe @mcjaeger, you want to retest if the result is still what you want it to be. @hemarkus it would be nice if you could squash your commits into a single one like it is mentioned here https://github.com/eclipse/sw360/wiki/Dev-DoD-and-Style in section "Commit style". |
Add Development Detail table and Additional Requirement table to the report document. Also order the calls to reflect the acutal documemt structure in code. Additionally refactor/fix nested loops. Signed-off-by: Markus Herpich <markus@endocode.com>
5d041b2
to
67975c2
Compare
Signed-off-by: Johannes Amorosa johannes.amorosa@endocode.com