Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2017-05-04 17:08:12 +0000
committerDonald Dunne2017-05-09 18:27:47 +0000
commit4fe5d5722ca06c9e8e9bbdfd05f42f4072f5cc69 (patch)
tree51df9fa25c39c36cdb173297b306a35b609ae609
parent104b932e44fdfdcf3a20885f109f19b83f74fbd8 (diff)
downloadorg.eclipse.osee-0.25.0.v201705091917-NR.tar.gz
org.eclipse.osee-0.25.0.v201705091917-NR.tar.xz
org.eclipse.osee-0.25.0.v201705091917-NR.zip
bug[ats_ATS374774]: ATS Id not showing in workflow editor print0.25.0.v201705091917-NR
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/team/ITeamWorkflowProvider.java4
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/team/TeamWorkflowProviderAdapter.java2
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsWorkItemService.java9
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/AtsWorkItemServiceImpl.java38
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ParentIdColumn.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WfePrint.java4
6 files changed, 24 insertions, 35 deletions
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/team/ITeamWorkflowProvider.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/team/ITeamWorkflowProvider.java
index 79f9b4360a7..90d8c71d27a 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/team/ITeamWorkflowProvider.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/team/ITeamWorkflowProvider.java
@@ -24,9 +24,9 @@ public interface ITeamWorkflowProvider {
public String getRelatedTaskWorkflowDefinitionId(IAtsTeamWorkflow teamWf) throws OseeCoreException;
/**
- * Assigned or computed Id that will show at the top of the editor
+ * Assigned or computed Id that will show at the top of the editor. Default is <ATS Id> - <Legacy PCR Id (if any)>
*/
- public String getComputedPcrId(IAtsTeamWorkflow teamWf) throws OseeCoreException;
+ public String getComputedPcrId(IAtsWorkItem workItem) throws OseeCoreException;
/**
* 5-9 character short name for UI and display purposes
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/team/TeamWorkflowProviderAdapter.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/team/TeamWorkflowProviderAdapter.java
index a041535dd1a..67ca3efd4dc 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/team/TeamWorkflowProviderAdapter.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/team/TeamWorkflowProviderAdapter.java
@@ -30,7 +30,7 @@ public abstract class TeamWorkflowProviderAdapter implements ITeamWorkflowProvid
}
@Override
- public String getComputedPcrId(IAtsTeamWorkflow teamWf) throws OseeCoreException {
+ public String getComputedPcrId(IAtsWorkItem workItem) throws OseeCoreException {
return null;
}
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsWorkItemService.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsWorkItemService.java
index f815677dd23..d1bd79110b4 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsWorkItemService.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsWorkItemService.java
@@ -50,14 +50,9 @@ public interface IAtsWorkItemService {
IAtsActionableItemService getActionableItemService();
/**
- * Assigned or computed Id that will show at the top of the editor or ats.LegacyPcrId attribute, if set
+ * Assigned or Combined Id that will show at the top of the editor. Default is "<ATS Id> / <Legacy PCR Id (if set)>"
*/
- String getComputedPcrId(IAtsWorkItem workItem) throws OseeCoreException;
-
- /**
- * Join ATS Id with computedPcrId (if set)
- */
- String getCombinedPcrId(IAtsWorkItem workItem);
+ String getCombinedPcrId(IAtsWorkItem workItem) throws OseeCoreException;
IAtsWorkItemNotes getNotes(IAtsWorkItem workItem);
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/AtsWorkItemServiceImpl.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/AtsWorkItemServiceImpl.java
index b34f466e484..406d4d02244 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/AtsWorkItemServiceImpl.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/AtsWorkItemServiceImpl.java
@@ -152,32 +152,26 @@ public class AtsWorkItemServiceImpl implements IAtsWorkItemService {
}
@Override
- public String getComputedPcrId(IAtsWorkItem workItem) throws OseeCoreException {
- IAtsTeamWorkflow teamWf = workItem.getParentTeamWorkflow();
- if (teamWf != null) {
- for (ITeamWorkflowProvider provider : TeamWorkflowProviders.getTeamWorkflowProviders()) {
- if (provider.isResponsibleFor(workItem)) {
- String computedPcrId = provider.getComputedPcrId(teamWf);
- if (Strings.isValid(computedPcrId)) {
- return computedPcrId;
- }
+ public String getCombinedPcrId(IAtsWorkItem workItem) throws OseeCoreException {
+ String id = "";
+ for (ITeamWorkflowProvider provider : TeamWorkflowProviders.getTeamWorkflowProviders()) {
+ if (provider.isResponsibleFor(workItem)) {
+ String computedPcrId = provider.getComputedPcrId(workItem);
+ if (Strings.isValid(computedPcrId)) {
+ id = computedPcrId;
}
}
- return services.getAttributeResolver().getSoleAttributeValue(teamWf, AtsAttributeTypes.LegacyPcrId, "");
}
- return "";
- }
-
- /**
- * Join ATS Id with computedPcrId (if set)
- */
- @Override
- public String getCombinedPcrId(IAtsWorkItem workItem) {
- String computedPcrId = getComputedPcrId(workItem);
- if (Strings.isValid(computedPcrId)) {
- return String.format("%s / %s", workItem.getAtsId(), computedPcrId);
+ if (Strings.isInValid(id)) {
+ String legacyPcrId =
+ services.getAttributeResolver().getSoleAttributeValue(workItem, AtsAttributeTypes.LegacyPcrId, "");
+ if (Strings.isValid(legacyPcrId)) {
+ return String.format("%s - %s", workItem.getAtsId(), legacyPcrId);
+ } else {
+ id = workItem.getAtsId();
+ }
}
- return workItem.getAtsId();
+ return id;
}
@Override
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ParentIdColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ParentIdColumn.java
index 203a6ca89e4..42adfdffe91 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ParentIdColumn.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ParentIdColumn.java
@@ -51,7 +51,7 @@ public class ParentIdColumn extends XViewerAtsColumn implements IAtsXViewerPreCo
public String getText(Object element) {
try {
if (element instanceof AbstractWorkflowArtifact && ((AbstractWorkflowArtifact) element).getParentAWA() != null) {
- return AtsClientService.get().getWorkItemService().getComputedPcrId(
+ return AtsClientService.get().getWorkItemService().getCombinedPcrId(
((AbstractWorkflowArtifact) element).getParentAWA());
}
} catch (OseeCoreException ex) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WfePrint.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WfePrint.java
index 3d27a090795..d40473cdf75 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WfePrint.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WfePrint.java
@@ -98,11 +98,11 @@ public class WfePrint extends Action {
sma.getSoleAttributeValue(AtsAttributeTypes.PriorityType, "")),
AHTML.getLabelValueStr(AHTML.LABEL_FONT, "Need By: ", DeadlineColumn.getDateStr(sma))}));
- String combinedPcrId = AtsClientService.get().getWorkItemService().getComputedPcrId(sma);
+ String computedId = AtsClientService.get().getWorkItemService().getCombinedPcrId(sma);
resultData.addRaw(AHTML.addRowMultiColumnTable(new String[] {
//
AHTML.getLabelValueStr(AHTML.LABEL_FONT, "Workflow: ", sma.getArtifactTypeName()),
- AHTML.getLabelValueStr(AHTML.LABEL_FONT, "ID: ", combinedPcrId)}));
+ AHTML.getLabelValueStr(AHTML.LABEL_FONT, "ID: ", computedId)}));
resultData.addRaw(AHTML.endMultiColumnTable());
for (NoteItem note : AtsClientService.get().getWorkItemService().getNotes(sma).getNoteItems()) {
if (note.getState().equals("")) {

Back to the top