Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2021-01-12 05:24:43 +0000
committerDonald Dunne2021-01-13 17:51:30 +0000
commitd59d1de73ac5dfe7552d77be0535441ed5b4c6a8 (patch)
tree4bcbb64d7357e956d4ddb36815bc35d1feee7447
parent8323a542a024e99370427bed0b9bc7cb29e1cd4c (diff)
downloadorg.eclipse.osee-d59d1de73ac5dfe7552d77be0535441ed5b4c6a8.tar.gz
org.eclipse.osee-d59d1de73ac5dfe7552d77be0535441ed5b4c6a8.tar.xz
org.eclipse.osee-d59d1de73ac5dfe7552d77be0535441ed5b4c6a8.zip
bug[TW18555]: Remove duplicate reload of arts after transition
-rw-r--r--plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/workflow/AtsWorkItemServiceClientImpl.java19
1 files changed, 2 insertions, 17 deletions
diff --git a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/workflow/AtsWorkItemServiceClientImpl.java b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/workflow/AtsWorkItemServiceClientImpl.java
index 4d2427a7691..d985b57f090 100644
--- a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/workflow/AtsWorkItemServiceClientImpl.java
+++ b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/workflow/AtsWorkItemServiceClientImpl.java
@@ -15,8 +15,6 @@ package org.eclipse.osee.ats.ide.workflow;
import java.util.Collection;
import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
import java.util.Set;
import org.eclipse.osee.ats.api.AtsApi;
import org.eclipse.osee.ats.api.IAtsWorkItem;
@@ -134,9 +132,9 @@ public class AtsWorkItemServiceClientImpl extends AtsWorkItemServiceImpl impleme
*/
private TransitionResults postEventAndReturn(TransitionData transData, TransitionResults results) {
Conditions.assertNotNullOrEmpty(results.getWorkItemIds(), "workItemIds");
- ArtifactQuery.reloadArtifacts(transData.getWorkItemIds());
+
if (results.isSuccess()) {
- reload(results);
+ ArtifactQuery.reloadArtifacts(transData.getWorkItemIds());
atsApi.getEventService().postAtsWorkItemTopicEvent(AtsTopicEvent.WORK_ITEM_TRANSITIONED,
transData.getWorkItems(), results.getTransaction());
} else {
@@ -146,17 +144,4 @@ public class AtsWorkItemServiceClientImpl extends AtsWorkItemServiceImpl impleme
return results;
}
- private void reload(TransitionResults transResults) {
- List<IAtsWorkItem> workItemsToReload = new LinkedList<>();
- for (IAtsWorkItem workItem : transResults.getWorkItems()) {
- boolean changed = AtsApiService.get().getStoreService().isChangedInDb(workItem);
- if (changed) {
- workItemsToReload.add(workItem);
- }
- }
- if (!workItemsToReload.isEmpty()) {
- AtsApiService.get().getStoreService().reload(workItemsToReload);
- }
- }
-
}

Back to the top