Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormegumi.telles2017-10-09 11:21:53 -0400
committermegumi.telles2017-10-09 11:21:53 -0400
commitae879c67cb8a9a06b985e0ca7437fbd9daf58461 (patch)
treea14084154511b25799d1cc63c2d9f03cf33524e0
parent31f5ae9ba86ea0c6794ec5ced8b91db3c80ad3c5 (diff)
downloadorg.eclipse.osee-ae879c67cb8a9a06b985e0ca7437fbd9daf58461.tar.gz
org.eclipse.osee-ae879c67cb8a9a06b985e0ca7437fbd9daf58461.tar.xz
org.eclipse.osee-ae879c67cb8a9a06b985e0ca7437fbd9daf58461.zip
refinement: Fill all cells in trace reports0.25.0.v201710091531-NR
-rw-r--r--plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemToLowLevelReqTraceReport.java16
-rw-r--r--plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SystemSubsystemReport.java16
2 files changed, 19 insertions, 13 deletions
diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemToLowLevelReqTraceReport.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemToLowLevelReqTraceReport.java
index 46a3d8498da..9f9dd191db2 100644
--- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemToLowLevelReqTraceReport.java
+++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemToLowLevelReqTraceReport.java
@@ -54,7 +54,7 @@ import org.eclipse.ui.forms.widgets.FormToolkit;
* @author Ryan D. Brooks
*/
public class SubsystemToLowLevelReqTraceReport extends AbstractBlam {
- private static final String LOW_LEVEL_REQUIREMENTS = "Low Level Requirements";
+ private static final String LOW_LEVEL_REQUIREMENTS = "Lower Level Requirements";
private CharBackedInputStream charBak;
private ISheetWriter excelWriter;
private final HashMap<String, List<Artifact>> subsysToSubsysReqsMap;
@@ -129,13 +129,15 @@ public class SubsystemToLowLevelReqTraceReport extends AbstractBlam {
for (Artifact lowLevelReq : lowLevelReqs) {
row[0] = correct(lowLevelReq.getSoleAttributeValue(CoreAttributeTypes.ParagraphNumber, ""));
row[1] = lowLevelReq.getName();
+ boolean isRelated = false;
if (isLowerLevelRequirement(lowLevelReq)) {
row[2] = lowLevelReq.getAttributesToStringSorted(CoreAttributeTypes.QualificationMethod);
List<Artifact> relatedArtifacts =
lowLevelReq.getRelatedArtifacts(CoreRelationTypes.Requirement_Trace__Higher_Level);
- if (relatedArtifacts != null) {
+ if (relatedArtifacts != null && !relatedArtifacts.isEmpty()) {
ViewIdUtility.removeExcludedArtifacts(relatedArtifacts.iterator(), excludedArtifactIdMap);
+ isRelated = true;
}
for (Artifact subSysReq : relatedArtifacts) {
row[3] = getAssociatedSubSystem(subSysReq);
@@ -143,13 +145,12 @@ public class SubsystemToLowLevelReqTraceReport extends AbstractBlam {
row[5] = subSysReq.getName();
row[6] = subSysReq.getSoleAttributeValue(CoreAttributeTypes.Subsystem, "");
excelWriter.writeRow(row);
- row[0] = row[1] = row[2] = null;
}
} else {
row[2] = lowLevelReq.getArtifactTypeName();
}
- if (row[0] != null) { // if this requirement is not traced to any lower level req (i.e. the for loop didn't run)
+ if (row[0] != null && !isRelated) { // if this requirement is not traced to any lower level req (i.e. the for loop didn't run)
row[3] = row[4] = row[5] = row[6] = null;
excelWriter.writeRow(row);
}
@@ -194,18 +195,19 @@ public class SubsystemToLowLevelReqTraceReport extends AbstractBlam {
row[1] = higherLevelReq.getName();
List<Artifact> relatedArtifacts =
higherLevelReq.getRelatedArtifacts(CoreRelationTypes.Requirement_Trace__Lower_Level);
- if (relatedArtifacts != null) {
+ boolean isRelated = false;
+ if (relatedArtifacts != null && !relatedArtifacts.isEmpty()) {
ViewIdUtility.removeExcludedArtifacts(relatedArtifacts.iterator(), excludedArtifactIdMap);
+ isRelated = true;
}
for (Artifact lowerLevelReq : relatedArtifacts) {
if (lowLevelReqs.contains(lowerLevelReq)) {
row[2] = correct(lowerLevelReq.getSoleAttributeValue(CoreAttributeTypes.ParagraphNumber, ""));
row[3] = lowerLevelReq.getName();
excelWriter.writeRow(row);
- row[0] = row[1] = null;
}
}
- if (row[0] != null) { // if this requirement is not traced to any low level requirement(i.e. the for loop didn't run)
+ if (row[0] != null && !isRelated) { // if this requirement is not traced to any low level requirement(i.e. the for loop didn't run)
row[2] = row[3] = null;
excelWriter.writeRow(row);
}
diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SystemSubsystemReport.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SystemSubsystemReport.java
index 5bc000a8d49..8c37a96dc88 100644
--- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SystemSubsystemReport.java
+++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SystemSubsystemReport.java
@@ -298,18 +298,19 @@ public class SystemSubsystemReport extends AbstractBlam {
if (artifact.isOfType(CoreArtifactTypes.SubsystemRequirementMSWord)) {
+ boolean isRelated = false;
List<Artifact> relatedArtifacts = artifact.getRelatedArtifacts(CoreRelationTypes.Allocation__Component);
if (relatedArtifacts != null && !relatedArtifacts.isEmpty()) {
ViewIdUtility.removeExcludedArtifacts(relatedArtifacts.iterator(), findExcludedArtifactsByView);
+ isRelated = true;
}
for (Artifact component : relatedArtifacts) {
components.add(component);
row[2] = component.getName();
excelWriter.writeRow(row);
- row[0] = row[1] = null;
}
- if (row[0] != null) { // if this requirement has no allocated components (i.e. the for loop didn't run)
+ if (row[0] != null && !isRelated) { // if this requirement has no allocated components (i.e. the for loop didn't run)
row[2] = null;
excelWriter.writeRow(row);
}
@@ -418,19 +419,20 @@ public class SystemSubsystemReport extends AbstractBlam {
row[0] = sysReq.getSoleAttributeValue(CoreAttributeTypes.ParagraphNumber, "");
row[1] = sysReq.getName();
+ boolean isRelated = false;
List<Artifact> relatedArtifacts = sysReq.getRelatedArtifacts(CoreRelationTypes.Requirement_Trace__Lower_Level);
if (relatedArtifacts != null && !relatedArtifacts.isEmpty()) {
ViewIdUtility.removeExcludedArtifacts(relatedArtifacts.iterator(), findExcludedArtifactsByView);
+ isRelated = true;
}
for (Artifact subSysReq : relatedArtifacts) {
if (subsysReqs.contains(subSysReq)) {
row[2] = subSysReq.getSoleAttributeValue(CoreAttributeTypes.ParagraphNumber, "");
row[3] = subSysReq.getName();
excelWriter.writeRow(row);
- row[0] = row[1] = null;
}
}
- if (row[0] != null) { // if this requirement is not traced to any subsys req (i.e. the condition in the for loop didn't run)
+ if (row[0] != null && !isRelated) { // if this requirement is not traced to any subsys req (i.e. the condition in the for loop didn't run)
row[2] = row[3] = null;
excelWriter.writeRow(row);
}
@@ -466,18 +468,20 @@ public class SystemSubsystemReport extends AbstractBlam {
row[2] = "N/A: " + subsysReq.getArtifactTypeName();
}
+ boolean isRelated = false;
List<Artifact> relatedArtifacts =
subsysReq.getRelatedArtifacts(CoreRelationTypes.Requirement_Trace__Higher_Level);
if (relatedArtifacts != null && !relatedArtifacts.isEmpty()) {
ViewIdUtility.removeExcludedArtifacts(relatedArtifacts.iterator(), findExcludedArtifactsByView);
+ isRelated = true;
}
+
for (Artifact subSysReq : relatedArtifacts) {
row[3] = subSysReq.getSoleAttributeValue(CoreAttributeTypes.ParagraphNumber, "");
row[4] = subSysReq.getName();
excelWriter.writeRow(row);
- row[0] = row[1] = row[2] = null;
}
- if (row[0] != null) { // if this requirement is not traced to any sys req (i.e. the for loop didn't run)
+ if (row[0] != null && !isRelated) { // if this requirement is not traced to any sys req (i.e. the for loop didn't run)
row[3] = row[4] = null;
excelWriter.writeRow(row);
}

Back to the top